a4j:commandButton a4j:commandLink h:selectBooleanCheckbox

a4j:commandButton, a4j:commandLink, h:selectBooleanCheckbox

 

运行下面是一个代码,当点击Save Package Type1时,所有的checkbox的值都不会绑定到Bean.

只有点击Save Package Type2时,才会绑定 checkbox的值,查了半天也不知道原因,先记下来,以后有时间再研究:

 

 

<h:form id="mainForm">

..................................

<h:form id="subForm">
          
           
            <h:panelGroup id="compCardTemplates">
                <strong><h:outputLabel value="Comp Card Templates" style="background-Color:gray; align:center" /></strong>
                <br/>
                <a4j:region rendered="#{agencyEditBean.packageTypeId != null}">
                    <h:selectBooleanCheckbox id="compCard1" value="#{agencyEditBean.compCardTemplate1}"/>
                     <h:graphicImage  url="/images/compcard/CompCard1.gif"
                                                    width="100" height="100" title="CompCard1"/>
                    <h:selectBooleanCheckbox id="compCard2" value="#{agencyEditBean.compCardTemplate2}"/>
                     <h:graphicImage  url="/images/compcard/CompCard2.gif"
                                                    width="100" height="100" title="CompCard2"/>
                    <h:selectBooleanCheckbox id="compCard3" value="#{agencyEditBean.compCardTemplate3}"/>
                     <h:graphicImage  url="/images/compcard/CompCard3.gif"
                                                    width="100" height="100" title="CompCard3"/>
                    <br/>
                    <h:selectBooleanCheckbox id="compCard4" value="#{agencyEditBean.compCardTemplate4}"/>
                     <h:graphicImage url="/images/compcard/CompCard4.gif"
                                                    width="100" height="100" title="CompCard4"/>
                    <h:selectBooleanCheckbox id="compCard5" value="#{agencyEditBean.compCardTemplate5}"/>
                     <h:graphicImage url="/images/compcard/CompCard5.gif"
                                                    width="100" height="100" title="CompCard5"/>
                </a4j:region>
               
                <br/>
                <a4j:region rendered="#{agencyEditBean.packageTypeId != null}">
                    <a4j:commandButton id="savePackage"  value="Save Package Type2" reRender="page:form:packagePage:subForm:basicInfo,page:form:packagePage:subForm:compCardTemplates,page:form:packagePage:subForm:packageItems"
                                       action="#{agencyEditBean.doSaveAgencyPackage}"/>

                </a4j:region>
                <div class="admin_buttons">
                    <div class="submit">
                         <a4j:commandLink id="savePackage2" reRender="page:form:packagePage:subForm:basicInfo,page:form:packagePage:subForm:compCardTemplates,page:form:packagePage:subForm:packageItems"
                                          styleClass="link_button_green" 
                                          action="#{agencyEditBean.doSaveAgencyPackage}" rendered="#{agencyEditBean.packageTypeId != null}">
                             <span>Save Package Type2</span>
                         </a4j:commandLink>

                     </div>
                 </div>
            </h:panelGroup>
         </h:form>

............

 

</h:form>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值