Gary VanMatre wrote:
Another question about html views (since they are more interesting in
practical use). For example I have main.html component and profile.html
component. The both have submit buttons - but I want distinguish that
one button is for main.html and another one - for profile.html. In
rolodex example all components are specified in one config file without
any hierarchy - so I should invent some naming convention (e.g
mainPageSubmitButton,profilePageSubmitButton,
addressBookPanelNotesTabSubmitButton etc) to be sure that component ids
will not fail to conflict. It's not convenient - because if I'll change
name for mainPage I should change names for all component. Is it
possible to do by other way?
The clay component itself is a naming container. This is the same as the
subview. This means that components under it have unique clientId's. Another
consideration is a faces form will uniquely identify anything under it. Using
these two containers, you can reuse a single commandButton definition in a clay
XML config, nested under two different forms.
sory for typo - I mean jsfid ;(
so I need the same hierarchy as id
Another trick is to use the "managedBeanName" attribute. If you code your command buttons action to use the
literal "managed-bean-name", this sting will be replaced with what you specify for the
"managedBeanName" attribute of the clay component. Using this technique you could standardize that all save
buttons will invoke a "save" method on your managed bean and have the same text.
Another fun thing is that the Clay component can be nested within a clay
component. This allows you to do some pretty crazy stuff.
Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]