> >>
> >>>>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
> >>
> >>    
> >
> >The jsfid is a Clay manufactured attribute that represents a top-level 
> component.  What I mean by top-level is that it can be a root or aggregated 
> under another component.  The jsfid must be unique.
> >
> So I have to invent some naming conventions for jsfid to prevent that a child 
> from one html template won't have the same name as another child ;(
> Thanks for clarifications
> 

That is only true for things defined as "component".  Things defined as 
"component" are top-level.  That really means that they are an entry in the Map 
that caches the digested XML file.  

When you use the jsfid for an "element", it kind of works like and a java 
anonymous class.    It is assumed that you are extending a top-level component 
by that jsfid.  The attributes defined for that element will override the ones 
defined by the component and inheritance will also apply.  Elements are the 
composition glue for creating complex components.  

Another fun feature is that you can override the componentType of the 
attribute.  In effect, your morphing a component into another type.  This could 
be used if you have an outputText that you want to morph into an inputText.  

Gary 


> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to