Advertisement
Claudiu

Claudiu

Feb 22nd, 2011
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.68 KB | None | 0 0
  1. <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  2.      xmlns:ui="http://java.sun.com/jsf/facelets"
  3.      xmlns:h="http://java.sun.com/jsf/html"
  4.      xmlns:f="http://java.sun.com/jsf/core"
  5.      xmlns:a4j="http://richfaces.org/a4j"
  6.      xmlns:rich="http://richfaces.org/rich">
  7.            
  8.     <style>
  9.         .outergridselfcolumn {
  10.             padding: 0px 30px 10px 0px;
  11.             width : 300px;
  12.             vertical-align: top;
  13.         }
  14.         .innergridselfcolumn1 {
  15.             padding-left: 10px;
  16.             font-weight: bold;
  17.         }
  18.         .innergridselfcolumn2 {
  19.             padding-left: 10px;
  20.         }
  21.     </style>
  22.  
  23.     <h:panelGrid columns="2" columnClasses="outergridselfcolumn">
  24.  
  25.         <a4j:region selfRendered="true">
  26.             <h:panelGroup>
  27.                 <h:form>
  28.                     <h:panelGrid columns="2" columnClasses="innergridselfcolumn1,innergridselfcolumn2">
  29.                         <h:outputText value="Name" />
  30.                         <h:inputText value="#{userBean.name}">
  31.                             <a4j:support event="onkeyup" reRender="out3,outname2" />
  32.                         </h:inputText>
  33.                     </h:panelGrid>
  34.                 </h:form>
  35.                 <rich:spacer height="5" />
  36.                 <br />
  37.                 <h:panelGroup id="out3">
  38.                     This text will disappear during the partial update of this panel.
  39.                     The text appears again only after the whole page refresh or a partial
  40.                     update from the region with selfRendered="false" (default value).
  41.                 </h:panelGroup>
  42.             </h:panelGroup>
  43.         </a4j:region>
  44.  
  45.         <a4j:region selfRendered="true">
  46.             <h:panelGroup>
  47.                 <h:form>
  48.                     <h:panelGrid columns="2" columnClasses="innergridselfcolumn1,innergridselfcolumn2">
  49.                         <h:outputText value="Name" />
  50.                         <h:inputText value="#{userBean.name}">
  51.                             <a4j:support event="onkeyup" reRender="out4,outname2" />
  52.                         </h:inputText>
  53.                     </h:panelGrid>
  54.                 </h:form>
  55.                 <rich:spacer height="5" />
  56.                 <br />
  57.                 <h:panelGroup id="out4">
  58.                     <h:outputText value="The text of the similar panel will
  59.                        not disappear because it is printed with h:outputText" />
  60.                 </h:panelGroup>
  61.             </h:panelGroup>
  62.         </a4j:region>
  63.  
  64.     </h:panelGrid>
  65.     <h:outputText   id="outname2" style="font-weight:bold"
  66.                    value="Typed Name: #{userBean.name}" />
  67.     <br />
  68.  
  69. </ui:composition>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement