jsf 2 - JSF ui:insert with f:attribute to change attribute of a p:commandButton -


i've got project jsf 2.1.28 , primefaces 4.0. i've got problem editor controller template.

my page this:

<ui:composition  xmlns="http://www.w3.org/1999/xhtml"  xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"  xmlns:f="http://java.sun.com/jsf/core"  xmlns:ui="http://java.sun.com/jsf/facelets">  <p:panel header="#{loccommon.report} #{loccommon.editor}">     <h:form id="editform">         <h:panelgrid columns="2">             <p:outputlabel value="#{loccommon.name}" />             <p:inputtext value="#{reportbean.businessitem.name}" />             <p:outputlabel value="hql" />             <p:selectbooleancheckbox value="#{reportbean.businessitem.hql}" />             <p:outputlabel value="sql" />             <p:inputtextarea value="#{reportbean.businessitem.sql}" />         </h:panelgrid>         <p:commandbutton value="#{loccommon.tryquery}" action="#{reportbean.tryquery()}" process="@form"             update=":resultpanel" styleclass="button" />     </h:form> </p:panel> <p:panel id="resultpanel" header="#{loccommon.result}">     <ui:decorate template="/components/reporttable.xhtml">         <ui:param name="lstvalues" value="#{reportbean.businessitem.lstresult}" />         <ui:param name="model" value="#{reportbean.businessitem.lstreportfields}" />     </ui:decorate> </p:panel> <p:panel>     <h:form>          <ui:decorate template="/components/editorcontroller.xhtml" >             <ui:param name="bean" value="#{reportbean}" />             <ui:define name="savebuttonattributes">                 <f:attribute name="process" value=":editform"/>             </ui:define>          </ui:decorate>     </h:form> </p:panel> </ui:composition> 

on last panel, there template, want set process attribute of commandbutton on template:

<ui:composition  xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"  xmlns:f="http://java.sun.com/jsf/core"  xmlns:ui="http://java.sun.com/jsf/facelets">  <table style="width: 100%;">     <tr>         <td align="left">             <p:commandbutton value="#{loccommon.save}" styleclass="button" action="#{bean.save(true)}" process="@form">                 <ui:insert name="savebuttonattributes"/>                                 </p:commandbutton>         </td>         <td align="right">             <p:commandbutton value="#{loccommon.cancel}" styleclass="button" action="#{bean.cancel()}" process="@this" />         </td>     </tr> </table> </ui:composition> 

the code above sadly not set process attribute ':editform' goal. question is, how can this?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -