jsf - ui: define inside a h :form -


i have template 3 ui:insert tags's display in different places. on create userpage have this:

<ui:composition template="/template.xhtml">         <ui:define name="title">             <h:outputtext value="#{bundle.createemployeestitle}"></h:outputtext>         </ui:define>         <ui:define name="body">             <h:panelgroup id="messagepanel" layout="block">                 <h:messages errorstyle="color: red" infostyle="color: green" layout="table"/>             </h:panelgroup>             <h:form>                 <h:panelgrid columns="2">                     <h:outputlabel value="#{bundle.createemployeeslabel_businessunitid}" for="businessunitid" />                     <h:selectonemenu id="businessunitid" value="#{employeescontroller.selected.businessunitid}">                         <f:selectitems value="#{businessunitcontroller.items}" var="a" itemlabel="#{a.description}" itemvalue="#{a.id}" />                     </h:selectonemenu>                     <h:outputlabel value="#{bundle.createemployeeslabel_employeetypesid}" for="employeetypesid" />                     <h:selectonemenu id="employeetypesid" value="#{employeescontroller.selected.employeetypesid}">                         <f:selectitems value="#{employeetypescontroller.items}" var="b" itemlabel="#{b.description}" itemvalue="#{b.id}" />                     </h:selectonemenu>                     <h:outputlabel value="#{bundle.createemployeeslabel_employeemanagersemployeeno}" for="employeemanagersemployeeno" />                     <h:selectonemenu id="employeemanagersemployeeno" value="#{employeescontroller.selected.employeemanagersemployeeno}">                         <f:selectitems value="#{employeemanagerscontroller.items}" var="c" itemlabel="#{c.name}" itemvalue="#{c.employeeno}" />                     </h:selectonemenu>                 </h:panelgrid>                  <ui:define name="li1">                         <h:commandlink action="#{employeescontroller.create}" value="#{bundle.createemployeessavelink}" styleclass="auto-style4" />             </ui:define>                 <ui:define name="li2">                         <h:commandlink action="#{employeescontroller.preparelist}" value="#{bundle.createemployeesshowalllink}" immediate="true" styleclass="auto-style4"/>                 </ui:define>              </h:form>         </ui:define>     </ui:composition> 

so links aren't rendered, when remove ui:define tags @ bottom works, reason want way because commandlinks on right column. can replace ui:define commandlinks still work in right column?

here example of template:

<h:body>         <div id="header-wrapper">             <div class="container">                 <div class="row">                     <div class="12u">                         <header id="header">                             <h1><a href="#" id="logo" ><img src="../resources/images/btttr.png" alt="logoo" class="left" /></a></h1>                             <nav id="nav">                                 <ui:insert name="heads"></ui:insert>                             </nav>                         </header>                     </div>                 </div>             </div>         </div>         <div id="main">             <div class="container">                 <div class="row main-row">                     <div class="8u">                         <section class="left-content">                             <div>                                 <ui:insert name="pagetitle">default title</ui:insert>                                 <br/>                                 <br/>                             </div>                             <ui:insert name="body">default body</ui:insert>                         </section>                     </div>                     <div class="4u">                         <section>                             <ul class="small-image-list">                                 <li>                                     <li>                                          <ui:insert name="li1"></ui:insert></li>                                     <li>                                         <ui:insert name="li2"></ui:insert></li>                                     <li>                                         <ui:insert name="li3"></ui:insert></li>                                     <li>                                         <ui:insert name="li4"></ui:insert></li>                                     <li>                                         <ui:insert name="li5"></ui:insert></li>                                 </li>                             </ul>                         </section>                     </div>                 </div>             </div>         </div>     </h:body> 

you can't nest <ui:define> same template inside <ui:define>. isn't making sense. won't magically change template composition. instead, template has modified such body , links end in same form.

one way move <h:form> template client <div class="row main-row">. way extend template template forms.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -