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

Christian Bauer christian at hibernate.org
Mon Apr 2 14:25:05 EDT 2007


  User: cbauer  
  Date: 07/04/02 14:25:05

  Modified:    examples/wiki/view/includes       userControl.xhtml
                        mainMenu.xhtml attachmentDisplay.xhtml
  Added:       examples/wiki/view/includes       preferencesForm.xhtml
                        pluginPreferencesForm.xhtml preferencesMenu.xhtml
  Log:
  Totally overengineered but definitely cool system/user/instance wiki preferences architecture
  
  Revision  Changes    Path
  1.3       +2 -0      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.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- userControl.xhtml	20 Mar 2007 18:40:32 -0000	1.2
  +++ userControl.xhtml	2 Apr 2007 18:25:05 -0000	1.3
  @@ -56,6 +56,8 @@
                   <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>
               </h:panelGroup>
           </h:form>
       </s:div>
  
  
  
  1.2       +2 -2      jboss-seam/examples/wiki/view/includes/mainMenu.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: mainMenu.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/mainMenu.xhtml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- mainMenu.xhtml	18 Mar 2007 23:29:19 -0000	1.1
  +++ mainMenu.xhtml	2 Apr 2007 18:25:05 -0000	1.2
  @@ -5,9 +5,9 @@
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:s="http://jboss.com/products/seam/taglib">
   
  -    <h:dataTable id="areaMenuList" var="menuItem"
  +    <h:dataTable id="menuList" var="menuItem"
                    value="#{menu.items}"
  -                 styleClass="areaMenuTable"
  +                 styleClass="menuTable"
                    cellpadding="0" cellspacing="0" border="0"
                    columnClasses="firstLevelItem"
                    rendered="#{!empty menu.items}">
  
  
  
  1.4       +1 -1      jboss-seam/examples/wiki/view/includes/attachmentDisplay.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: attachmentDisplay.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/includes/attachmentDisplay.xhtml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- attachmentDisplay.xhtml	21 Mar 2007 01:24:49 -0000	1.3
  +++ attachmentDisplay.xhtml	2 Apr 2007 18:25:05 -0000	1.4
  @@ -26,7 +26,7 @@
           </h:column>
           <h:column>
               <h:panelGroup>
  -                <h:outputLink value="#{link.url}">
  +                <h:outputLink value="#{wiki:renderURL(link.node)}">
                       <h:outputText value="#{link.node.name}"/>
                       &#160;
                       <h:outputText value="(#{link.node.filename}, #{link.node.humanReadableFilesize}, #{link.node.contentType})"/>
  
  
  
  1.1      date: 2007/04/02 18:25:05;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/includes/preferencesForm.xhtml
  
  Index: preferencesForm.xhtml
  ===================================================================
  <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:s="http://jboss.com/products/seam/taglib">
  
  <h:form rendered="#{!empty prefEditor.preferenceComponent}">
      <div class="formHead">Preferences: #{prefEditor.preferenceComponent.description}</div>
  
      <h:dataTable id="propertyTable" var="v"
                   value="#{prefEditor.preferenceValues}"
                   styleClass="datatable topLeftBottomBorder"
                   columnClasses="twentyPercentColumn alignLeft minorPadding, twentyPercentColumn alignLeft, defaultColumn alignCenter rightBorder"
                   rowClasses="rowEven,rowOdd"
                   cellpadding="0" cellspacing="0" border="0">
  
          <h:column>
              <s:decorate>
                  <h:outputText value="#{v.preferenceProperty.description}"/>
              </s:decorate>
          </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"/>
              </s:div>
  
              <s:div rendered="#{v.value.class.simpleName == 'Long'}">
                  <h:inputText value="#{v.value}" size="5">
                      <f:converter converterId="javax.faces.Long"/>
                  </h:inputText>
              </s:div>
  
              <s:div rendered="#{v.value.class.simpleName == 'Double'}">
                  <h:inputText value="#{v.value}" size="10"/>
              </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"/>
                  </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>
  
      <div class="formControls">
          <div class="entry">
              <div class="label">&#160;</div>
              <div class="input">
                  <h:commandLink id="update" action="#{prefEditor.save}"
                             tabindex="5" accesskey="S" styleClass="button"><span class="buttonLabel"><u>S</u>ave</span></h:commandLink>
              </div>
          </div>
      </div>
  
  </h:form>
  
  </div>
  
  
  1.1      date: 2007/04/02 18:25:05;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/includes/pluginPreferencesForm.xhtml
  
  Index: pluginPreferencesForm.xhtml
  ===================================================================
  <h:form 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:wiki="http://jboss.com/products/seam/wiki"
          xmlns:s="http://jboss.com/products/seam/taglib">
  
      <h:panelGrid columns="2" style="margin-bottom:10px;" cellpadding="0" cellspacing="0" border="0">
  
          <h:dataTable var="v" style="width:10%;"
                       value="#{pluginPreferencesEditor.preferenceValues}"
                       styleClass="datatable topLeftBottomBorder"
                       columnClasses="tenPercentColumn alignLeft minorPadding, tenPercentColumn alignLeft 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"/>
                  </s:div>
  
                  <s:div rendered="#{v.value.class.simpleName == 'Long'}">
                      <h:inputText value="#{v.value}" size="5">
                          <f:converter converterId="javax.faces.Long"/>
                      </h:inputText>
                  </s:div>
  
                  <s:div rendered="#{v.value.class.simpleName == 'Double'}">
                      <h:inputText value="#{v.value}" size="10"/>
                  </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"/>
                      </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>
  
          <a:commandLink action="#{pluginPreferencesEditor.apply}"
                         reRender="preview"
                         styleClass="buttonNonpersistent"><span class="buttonLabel">Apply</span></a:commandLink>
  
      </h:panelGrid>
  
  </h:form>
  
  
  
  
  1.1      date: 2007/04/02 18:25:05;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/includes/preferencesMenu.xhtml
  
  Index: preferencesMenu.xhtml
  ===================================================================
  <div id="mainMenu"
       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:s="http://jboss.com/products/seam/taglib">
  
      <h:form>
      <h:dataTable id="menuList" var="prefComp"
                   value="#{preferenceComponents}"
                   styleClass="menuTable"
                   cellpadding="0" cellspacing="0" border="0"
                   headerClass="menuTableHeader"
                   columnClasses="menuTableItem"
                   rendered="#{preferenceComponents.rowCount >0}">
  
          <h:column>
              <f:facet name="header"><span class="">Preferences</span></f:facet>
  
              <h:commandLink value="#{prefComp.description}"
                             styleClass="menuTableItemLink"
                             rendered="#{prefComp != prefEditor.preferenceComponent}"
                             action="#{prefEditor.selectPreferenceComponent()}"/>
  
              <h:commandLink value="#{prefComp.description}"
                             styleClass="menuTableItemLinkSelected"
                             rendered="#{prefComp == prefEditor.preferenceComponent}"
                             action="#{prefEditor.selectPreferenceComponent()}"/>
  
          </h:column>
  
      </h:dataTable>
      </h:form>
  
  </div>
  
  
  



More information about the jboss-cvs-commits mailing list