Advertisement
Guest User

Untitled

a guest
Feb 16th, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. <h:form id="form">
  2. <p:panel id="display">
  3. <p:spacer width="20" />
  4. <h:panelGrid columns="6">
  5. <h:outputLabel value="Address:"
  6. style="text-align: left;display: block;width:130px;" />
  7. <p:inputTextarea
  8. value="#{companyInformationBean.current.officeAdd1}"
  9. autoResize="true" style="width:170px;" maxlength="150" />
  10.  
  11. </h:panelGrid>
  12.  
  13. <h:panelGrid columns="6">
  14. <h:selectBooleanCheckbox id="remember"
  15. value="#{companyInformationBean.current.checkBox}">
  16. <f:ajax event="click" execute="@form"
  17. listener="#{companyInformationBean.checkBoxValue}" />
  18. </h:selectBooleanCheckbox>
  19. <h:outputLabel value="Same as Registered Office Address"
  20. style="text-align: left;display: block;" />
  21. <p:spacer width="20" />
  22.  
  23. </h:panelGrid>
  24. <p:spacer width="20" />
  25. <h:panelGroup id="hidepanelgroup">
  26. <h:panelGrid id="getaddress" columns="6">
  27. <h:outputLabel value="Head Office Address:"
  28. style="text-align: left;display: block;width:130px;" />
  29. <p:inputTextarea id="headadd"
  30. value="#{companyInformationBean.current.headOfficeAdd1}"
  31. autoResize="true" style="width:170px;" maxlength="150" />
  32.  
  33. </h:panelGrid>
  34. </h:panelGroup>
  35. </p:panel>
  36. </h:form>
  37.  
  38. public void checkBoxValue()
  39. {
  40. if(current.getCheckBox()==true)
  41. {
  42.  
  43. logger.info("getofadd"+current.getOfficeAdd1());
  44. current.setHeadOfficeAdd1(current.getOfficeAdd1());
  45.  
  46. }
  47. else
  48. {
  49. logger.info("checkbox value false");
  50. }
  51. }
  52.  
  53. <f:ajax ... render="headadd" />
  54.  
  55. if (current.getCheckBox())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement