Advertisement
Guest User

Untitled

a guest
Mar 4th, 2011
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.11 KB | None | 0 0
  1. Index: src/main/webapp/resources/org.richfaces.showcase/test.xhtml
  2. ===================================================================
  3. --- src/main/webapp/resources/org.richfaces.showcase/test.xhtml (revision 22032)
  4. +++ src/main/webapp/resources/org.richfaces.showcase/test.xhtml (working copy)
  5. @@ -6,24 +6,26 @@
  6. xmlns:ui="http://java.sun.com/jsf/facelets"
  7. xmlns:c="http://java.sun.com/jsp/jstl/core"
  8. xmlns:composite="http://java.sun.com/jsf/composite"
  9. - xmlns:a4j="http://richfaces.org/a4j">
  10. + xmlns:a4j="http://richfaces.org/a4j"
  11. + xmlns:rich="http://richfaces.org/rich"
  12. + >
  13. <head>
  14. <title>panel</title>
  15. </head>
  16. <body>
  17.  
  18. <composite:interface>
  19. - <composite:attribute name="style" required="false" />
  20. - <composite:attribute name="styleClass" required="false" />
  21. </composite:interface>
  22.  
  23. <composite:implementation>
  24. - <h:outputStylesheet library="org.richfaces.showcase" name="messages.css" />
  25. - <a4j:outputPanel ajaxRendered="true">
  26. - <h:messages layout="#{cc.attrs.layout}"
  27. - showSummary="true" style="color:red; #{cc.attrs.style}"
  28. - styleClass="rich-message #{cc.attrs.styleClass}" />
  29. - </a4j:outputPanel>
  30. + <h:panelGrid columns="3">
  31. + <h:outputText value="Enter new password:" />
  32. + <h:inputSecret value="#{cc.attrs.password}" id="pass" />
  33. + <rich:message for="pass" />
  34. + <h:outputText value="Confirm the new password:" />
  35. + <h:inputSecret value="#{cc.attrs.confirmation}" id="conf" />
  36. + <rich:message for="conf" />
  37. + </h:panelGrid>
  38. </composite:implementation>
  39. </body>
  40. </html>
  41. Index: src/main/webapp/resources/org.richfaces.showcase/test1.xhtml
  42. ===================================================================
  43. --- src/main/webapp/resources/org.richfaces.showcase/test1.xhtml (revision 0)
  44. +++ src/main/webapp/resources/org.richfaces.showcase/test1.xhtml (revision 0)
  45. @@ -0,0 +1,34 @@
  46. +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  47. +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  48. +<html xmlns="http://www.w3.org/1999/xhtml"
  49. + xmlns:h="http://java.sun.com/jsf/html"
  50. + xmlns:f="http://java.sun.com/jsf/core"
  51. + xmlns:ui="http://java.sun.com/jsf/facelets"
  52. + xmlns:c="http://java.sun.com/jsp/jstl/core"
  53. + xmlns:composite="http://java.sun.com/jsf/composite"
  54. + xmlns:a4j="http://richfaces.org/a4j"
  55. + xmlns:rich="http://richfaces.org/rich"
  56. + >
  57. +<head>
  58. +<title>panel</title>
  59. +</head>
  60. +<body>
  61. +
  62. +<composite:interface>
  63. + <composite:valueHolder targets="pass,conf" name="xxx" />
  64. +</composite:interface>
  65. +
  66. +<composite:implementation>
  67. + #{cc.attrs.bean} a
  68. +
  69. + <h:panelGrid columns="3">
  70. + <h:outputText value="Enter new password:" />
  71. + <h:inputSecret value="#{cc.attrs.bean.password}" id="pass" />
  72. + <rich:message for="pass" />
  73. + <h:outputText value="Confirm the new password:" />
  74. + <h:inputSecret value="#{cc.attrs.bean.confirm}" id="conf" />
  75. + <rich:message for="conf" />
  76. + </h:panelGrid>
  77. +</composite:implementation>
  78. +</body>
  79. +</html>
  80. Index: src/main/webapp/richfaces/graphValidator/samples/passwordValidation-sample.xhtml
  81. ===================================================================
  82. --- src/main/webapp/richfaces/graphValidator/samples/passwordValidation-sample.xhtml (revision 22064)
  83. +++ src/main/webapp/richfaces/graphValidator/samples/passwordValidation-sample.xhtml (working copy)
  84. @@ -4,7 +4,8 @@
  85. xmlns:f="http://java.sun.com/jsf/core"
  86. xmlns:ui="http://java.sun.com/jsf/facelets"
  87. xmlns:a4j="http://richfaces.org/a4j"
  88. - xmlns:rich="http://richfaces.org/rich">
  89. + xmlns:rich="http://richfaces.org/rich"
  90. + xmlns:rc="http://java.sun.com/jsf/composite/org.richfaces.showcase">
  91.  
  92. <style>
  93. .red {
  94. @@ -16,21 +17,68 @@
  95. }
  96. </style>
  97. <h:form>
  98. + <a4j:region>
  99. + Simple
  100. <rich:graphValidator value="#{passwordValidationBean}" id="gv">
  101. - <rich:panel header="Change password" style="width:500px">
  102. - <rich:messages for="gv"/>
  103. - <rich:messages globalOnly="true"/>
  104. - <h:panelGrid columns="3">
  105. - <h:outputText value="Enter new password:" />
  106. - <h:inputSecret value="#{passwordValidationBean.password}" id="pass" />
  107. - <rich:message for="pass" />
  108. - <h:outputText value="Confirm the new password:" />
  109. - <h:inputSecret value="#{passwordValidationBean.confirm}" id="conf" />
  110. - <rich:message for="conf" />
  111. - </h:panelGrid>
  112. - <a4j:commandButton value="Store changes"
  113. - action="#{passwordValidationBean.storeNewPassword}" />
  114. - </rich:panel>
  115. + <rich:messages />
  116. + <h:panelGrid columns="3">
  117. + <h:outputText value="Enter new password:" />
  118. + <h:inputSecret value="#{passwordValidationBean.password}" id="pass" />
  119. + <rich:message for="pass" />
  120. + <h:outputText value="Confirm the new password:" />
  121. + <h:inputSecret value="#{passwordValidationBean.confirm}" id="conf" />
  122. + <rich:message for="conf" />
  123. + </h:panelGrid>
  124. +
  125. + <!--
  126. + <rc:test password="#{passwordValidationBean.password}" confirmation="#{passwordValidationBean.confirm}" />
  127. + <rc:test1 bean="#{passwordValidationBean}" />
  128. + -->
  129. +
  130. +
  131. + <a4j:commandButton value="Store changes"
  132. + action="#{passwordValidationBean.storeNewPassword}" />
  133. </rich:graphValidator>
  134. + </a4j:region>
  135. </h:form>
  136. + <hr />
  137. + <h:form>
  138. + <a4j:region>
  139. + Test
  140. + <rich:graphValidator value="#{passwordValidationBean}" id="gv">
  141. + <rich:messages />
  142. + <rc:test password="#{passwordValidationBean.password}"
  143. + confirmation="#{passwordValidationBean.confirm}" />
  144. +
  145. +
  146. + <a4j:commandButton value="Store changes"
  147. + action="#{passwordValidationBean.storeNewPassword}" />
  148. + </rich:graphValidator>
  149. + </a4j:region>
  150. + </h:form>
  151. + <hr />
  152. + <h:form>
  153. + <a4j:region>
  154. + Test A
  155. + <rich:graphValidator value="#{passwordValidationBean}" id="gv">
  156. + <rich:messages />
  157. + <rc:test />
  158. +
  159. + <a4j:commandButton value="Store changes"
  160. + action="#{passwordValidationBean.storeNewPassword}" />
  161. + </rich:graphValidator>
  162. + </a4j:region>
  163. + </h:form>
  164. + <hr />
  165. + <h:form>
  166. + <a4j:region>
  167. + Test1
  168. + <rich:graphValidator value="#{passwordValidationBean}" id="gv">
  169. + <rich:messages />
  170. + <rc:test1 bean="#{passwordValidationBean}" />
  171. + <a4j:commandButton value="Store changes"
  172. + action="#{passwordValidationBean.storeNewPassword}" />
  173. + </rich:graphValidator>
  174. + </a4j:region>
  175. + </h:form>
  176. </ui:composition>
  177. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement