[jboss-cvs] jboss-seam/examples/wiki/view/includes ...

Christian Bauer christian at hibernate.org
Wed Apr 4 06:38:11 EDT 2007


  User: cbauer  
  Date: 07/04/04 06:38:11

  Modified:    examples/wiki/view/includes    userControl.xhtml
  Added:       examples/wiki/view/includes    preferencesEditor.xhtml
  Removed:     examples/wiki/view/includes    preferencesForm.xhtml
  Log:
  Switched to AJAX forms
  
  Revision  Changes    Path
  1.4       +33 -8     jboss-seam/examples/wiki/view/includes/userControl.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: userControl.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/userControl.xhtml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- userControl.xhtml	2 Apr 2007 18:25:05 -0000	1.3
  +++ userControl.xhtml	4 Apr 2007 10:38:11 -0000	1.4
  @@ -16,9 +16,16 @@
                   <h:inputSecret styleClass="userControlInput" id="loginPassword" value="#{identity.password}" size="8" tabindex="51"/>
                   <h:commandLink styleClass="userControlLink" action="#{identity.login}" tabindex="52" accesskey="L"><u>L</u>ogin</h:commandLink>
   
  -                <s:link styleClass="userControlLink" action="register" tabindex="53" accesskey="R"><u>R</u>egister</s:link>
  -
  -                <s:link styleClass="userControlLink" action="listUsers" tabindex="54" accesskey="M"><u>M</u>embers</s:link>
  +                <s:link styleClass="userControlLink" action="register" tabindex="53" accesskey="R" propagation="none"
  +                        rendered="#{userManagementPreferences.properties['enableRegistration']}">
  +                    <f:param name="lastConversationId" value="#{conversation.id}"/>
  +                    <u>R</u>egister
  +                </s:link>
  +
  +                <s:link styleClass="userControlLink" action="listUsers" tabindex="54" accesskey="M" propagation="none">
  +                    <f:param name="lastConversationId" value="#{conversation.id}"/>
  +                    <u>M</u>embers
  +                </s:link>
   
               </h:panelGroup>
           </h:form>
  @@ -53,11 +60,29 @@
           <h:form>
               <h:panelGroup>
                   <h:outputText styleClass="userControlLabel" value="(#{currentUser.firstname} #{currentUser.lastname})"/>
  -                <h:commandLink styleClass="userControlLink" action="#{authenticator.logout}" tabindex="70">Logout</h:commandLink>
  -                <s:link styleClass="userControlLink" action="editCurrentUser" tabindex="71">Profile</s:link>
  -                <s:link styleClass="userControlLink" action="listUsers" tabindex="72" accesskey="M"><u>M</u>embers</s:link>
  -                <s:link styleClass="userControlLink" action="adminHome" tabindex="73" accesskey="A"
  -                        rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}"><u>A</u>dmin</s:link>
  +
  +                <s:link styleClass="userControlLink" action="#{authenticator.logout}" tabindex="70" accesskey="L"><u>L</u>ogout</s:link>
  +
  +                <h:outputLink styleClass="userControlLink" value="#{wiki:renderHomeURL(currentUser)}"
  +                        rendered="#{!empty currentUser.memberHome}" tabindex="72" accesskey="H"><u>H</u>ome</h:outputLink>
  +
  +                <s:link styleClass="userControlLink" action="editUser" tabindex="71" accesskey="P" propagation="none">
  +                    <f:param name="lastConversationId" value="#{conversation.id}"/>
  +                    <f:param name="userId" value="#{currentUser.id}"/>
  +                    <u>P</u>rofile
  +                </s:link>
  +
  +                <s:link styleClass="userControlLink" action="listUsers" tabindex="73" accesskey="M" propagation="none">
  +                    <f:param name="lastConversationId" value="#{conversation.id}"/>
  +                    <u>M</u>embers
  +                </s:link>
  +
  +                <s:link styleClass="userControlLink" action="adminHome" tabindex="74" accesskey="A" propagation="none"
  +                        rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}">
  +                    <f:param name="lastConversationId" value="#{conversation.id}"/>
  +                    <u>A</u>dmin
  +                </s:link>
  +
               </h:panelGroup>
           </h:form>
       </s:div>
  
  
  
  1.1      date: 2007/04/04 10:38:11;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/includes/preferencesEditor.xhtml
  
  Index: preferencesEditor.xhtml
  ===================================================================
  <s:div id="preferencesForm"
          xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:a="https://ajax4jsf.dev.java.net/ajax"
          xmlns:s="http://jboss.com/products/seam/taglib">
  
      <s:div id="preferenceValidationErrors">
          <div align="center">
              <h:message for="preferenceValidationErrors" styleClass="attentionMessage"/>
          </div>
      </s:div>
  
      <h:panelGrid columns="2" columnClasses="formListGridColumn">
  
          <h:dataTable id="preferenceComponentList" var="prefComp"
                       value="#{preferenceComponents}"
                       styleClass="formListTable"
                       cellpadding="0" cellspacing="0" border="0"
                       columnClasses="formListItem">
  
              <h:column>
                  <a:commandLink action="#{preferenceEditor.selectPreferenceComponent(prefComp)}"
                                 reRender="preferenceComponentList, propertyPanel"
                                 styleClass="#{prefComp == preferenceEditor.preferenceComponent ? 'selectedItem' : ''}">
                          #{prefComp.description}
                  </a:commandLink>
              </h:column>
  
          </h:dataTable>
  
          <s:div id="propertyPanel">
  
              <h:dataTable id="propertyTable" var="v"
                           rendered="#{not empty preferenceEditor.preferenceComponent}"
                           value="#{preferenceEditor.preferenceValues}"
                           styleClass="datatable topLeftBottomBorder rightBorder"
                           columnClasses="twentyPercentColumn alignLeft minorPadding,
                                          twentyPercentColumn alignLeft, defaultColumn alignCenter rightBorder"
                           rowClasses="rowEven,rowOdd"
                           cellpadding="0" cellspacing="0" border="0">
  
                  <h:column>
                      <h:outputText value="#{v.preferenceProperty.description}"/>
                  </h:column>
                  <h:column>
  
                      <s:div rendered="#{v.value.class.simpleName == 'Boolean'}">
                          <h:selectBooleanCheckbox value="#{v.value}"/>
                      </s:div>
  
                      <s:div rendered="#{v.value.class.simpleName == 'String'}">
                          <h:inputText value="#{v.value}" size="32">
                              <a:support event="onblur" action="#{preferenceEditor.validate}"
                                         reRender="preferenceValidationErrors, preferenceComponentList"/>
                          </h:inputText>
                      </s:div>
  
                      <s:div rendered="#{v.value.class.simpleName == 'Long'}">
                          <h:inputText value="#{v.value}" size="5">
                              <f:converter converterId="javax.faces.Long"/>
                              <f:validateLongRange minimum="0" maximum="10000000000"/>
                              <a:support event="onblur" action="#{preferenceEditor.validate}"
                                         reRender="preferenceValidationErrors, preferenceComponentList"/>
                          </h:inputText>
                      </s:div>
  
                      <s:div rendered="#{v.value.class.simpleName == 'Double'}">
                          <h:inputText value="#{v.value}" size="10">
                              <a:support event="onblur" action="#{preferenceEditor.validate}"
                                         reRender="preferenceValidationErrors, preferenceComponentList"/>
                          </h:inputText>
                      </s:div>
  
                      <s:div rendered="#{v.value.class.simpleName == 'Date'}">
                           <h:inputText id="dt" value="#{v.value}">
                              <f:convertDateTime pattern="dd. MMM yyyy, HH:mm"/>
                               <a:support event="onblur" action="#{preferenceEditor.validate}"
                                          reRender="preferenceValidationErrors, preferenceComponentList"/>
                          </h:inputText>
                          <s:selectDate for="dt" dateFormat="dd. MMM yyyy, HH:mm">
                              <h:graphicImage style="vertical-align:bottom;margin-bottom:2px;"
                                              value="/themes/#{wikiPreferences.themeName}/img/icon.calendar.gif"
                                              width="16" height="16"/>
                          </s:selectDate>
                      </s:div>
  
                  </h:column>
              </h:dataTable>
  
          </s:div>
  
      </h:panelGrid>
  
  </s:div>
  
  



More information about the jboss-cvs-commits mailing list