[JAVASERVERFACES_SPEC_PUBLIC-1008] Add ability for define tag to append to an existing definition Created: 22/May/11  Updated: 12/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Facelets/VDL
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: arjan tijms Assignee: Unassigned
Resolution: Unresolved Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In Facelets one can use a ui:define tag to define content in a template client. This named content can be inserted into a template by using ui:insert.

When the template client that defines the content is itself a template, its template client may also want to contribute to this content, typically by appending to it. This is currently not possible. The template needs to use a new ui:insert tag with a new name.

E.g.

template.xml

<f:view>            
    <ui:insert name="links"/>        
</f:view>

general.xml

<ui:composition template="template.xhtml">     
   <ui:define name="links">
         <h:link ... />
         <ui:insert name="links1"/>    
   </ui:define>        
 </ui:composition>

orders.xml

<ui:composition template="general.xhtml">     
   <ui:define name="links1">
      <h:link ... />
      <ui:insert name="links2"/>     
   </ui:define>        
 </ui:composition>

etc

Instead of manually 'chaining' defines and inserts in this way, Facelets could define tags or attributes for contributing to existing definitions. E.g.:

general.xml

<ui:composition template="template.xhtml">     
   <ui:append name="links">
      <h:link ... />    
   </ui:append>        
 </ui:composition>

orders.xml

<ui:composition template="general.xhtml">     
   <ui:append name="links">
      <h:link ... />    
   </ui:append>        
 </ui:composition>

Instead of introducing a new ui:append tag, a contribute="append" on ui:define could be used instead. Next to appending, prepending could be considered via a ui:contribute tag or contribute="prepend" attribute.



 Comments   
Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Generated at Tue May 05 21:53:33 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.