Hi. I have page template where I defined an attribute "UserName" and it is bound to outputText on the page template header.
Now in my non page template page I have a button.
When I click the button I want to populate the attribute .
I do the following on button click:
You can't do this. The attrs attribute is only available on a page which uses the template. It makes attributes given as page attributes accessible to the page.
If you are not on the page you can use the EL which is used to set the attribute on the pagedef.