Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h:form id="form">
- <p:panel id="display">
- <p:spacer width="20" />
- <h:panelGrid columns="6">
- <h:outputLabel value="Address:"
- style="text-align: left;display: block;width:130px;" />
- <p:inputTextarea
- value="#{companyInformationBean.current.officeAdd1}"
- autoResize="true" style="width:170px;" maxlength="150" />
- </h:panelGrid>
- <h:panelGrid columns="6">
- <h:selectBooleanCheckbox id="remember"
- value="#{companyInformationBean.current.checkBox}">
- <f:ajax event="click" execute="@form"
- listener="#{companyInformationBean.checkBoxValue}" />
- </h:selectBooleanCheckbox>
- <h:outputLabel value="Same as Registered Office Address"
- style="text-align: left;display: block;" />
- <p:spacer width="20" />
- </h:panelGrid>
- <p:spacer width="20" />
- <h:panelGroup id="hidepanelgroup">
- <h:panelGrid id="getaddress" columns="6">
- <h:outputLabel value="Head Office Address:"
- style="text-align: left;display: block;width:130px;" />
- <p:inputTextarea id="headadd"
- value="#{companyInformationBean.current.headOfficeAdd1}"
- autoResize="true" style="width:170px;" maxlength="150" />
- </h:panelGrid>
- </h:panelGroup>
- </p:panel>
- </h:form>
- public void checkBoxValue()
- {
- if(current.getCheckBox()==true)
- {
- logger.info("getofadd"+current.getOfficeAdd1());
- current.setHeadOfficeAdd1(current.getOfficeAdd1());
- }
- else
- {
- logger.info("checkbox value false");
- }
- }
- <f:ajax ... render="headadd" />
- if (current.getCheckBox())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement