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

Christian Bauer christian.bauer at jboss.com
Wed Feb 21 11:24:11 EST 2007


  User: cbauer  
  Date: 07/02/21 11:24:11

  Modified:    examples/wiki/view       dirDisplay.xhtml docDisplay.xhtml
                        dirEdit.xhtml docEdit.xhtml
  Added:       examples/wiki/view       message.xhtml profile.xhtml
  Log:
  User registration/login and some security
  JBSEAM-870
  JBSEAM-871
  JBSEAM-874
  
  Revision  Changes    Path
  1.2       +9 -8      jboss-seam/examples/wiki/view/dirDisplay.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: dirDisplay.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/dirDisplay.xhtml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- dirDisplay.xhtml	16 Feb 2007 16:26:45 -0000	1.1
  +++ dirDisplay.xhtml	21 Feb 2007 16:24:11 -0000	1.2
  @@ -9,14 +9,14 @@
                   template="themes/#{globalPrefs.themeName}/template.xhtml">
   
   <ui:define name="pluginCSS">
  -    <link href="#{themePath}/css/languageSelector.css" rel="stylesheet" type="text/css"/>
  +    <link href="#{themePath}/css/userControl.css" rel="stylesheet" type="text/css"/>
       <link href="#{themePath}/css/mainMenu.css" rel="stylesheet" type="text/css"/>
   </ui:define>
   
   <ui:define name="screenname">Browse Directory</ui:define>
   
   <ui:define name="headerTopRight">
  -    <ui:include src="plugins/languageSelector/plugin.xhtml"/>
  +    <ui:include src="plugins/userControl/plugin.xhtml"/>
   </ui:define>
   <ui:define name="headerBottomLeft">&#160;</ui:define>
   <ui:define name="headerBottomRight">&#160;</ui:define>
  @@ -71,12 +71,15 @@
   
   
           <h:column>
  -            <h:graphicImage value="themes/default/img/icon.dir.gif"
  +            <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/icon.dir.gif"
                               width="18" height="20"
                               rendered="#{wiki:isDirectory(node)}"/>
  -            <h:graphicImage value="themes/default/img/icon.doc.gif"
  +            <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/icon.doc.gif"
                               width="18" height="20"
  -                            rendered="#{wiki:isDocument(node)}"/>
  +                            rendered="#{wiki:isDocument(node) and node != currentDirectory.defaultDocument}"/>
  +            <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/icon.doc.default.gif"
  +                            width="18" height="20"
  +                            rendered="#{wiki:isDocument(node) and node == currentDirectory.defaultDocument}"/>
           </h:column>
   
           <h:column>
  @@ -104,9 +107,7 @@
   
   </ui:define>
   
  -<ui:define name="footer">
  -    Footer
  -</ui:define>
  +<ui:define name="footer">&#160;</ui:define>
   
   </ui:composition>
   
  
  
  
  1.3       +3 -5      jboss-seam/examples/wiki/view/docDisplay.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: docDisplay.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/docDisplay.xhtml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- docDisplay.xhtml	16 Feb 2007 16:26:45 -0000	1.2
  +++ docDisplay.xhtml	21 Feb 2007 16:24:11 -0000	1.3
  @@ -9,7 +9,7 @@
                   template="themes/#{globalPrefs.themeName}/template.xhtml">
   
   <ui:define name="pluginCSS">
  -    <link href="#{themePath}/css/languageSelector.css" rel="stylesheet" type="text/css"/>
  +    <link href="#{themePath}/css/userControl.css" rel="stylesheet" type="text/css"/>
       <link href="#{themePath}/css/breadcrumb.css" rel="stylesheet" type="text/css"/>
       <link href="#{themePath}/css/mainMenu.css" rel="stylesheet" type="text/css"/>
   </ui:define>
  @@ -17,7 +17,7 @@
   <ui:define name="screenname">Display Document</ui:define>
   
   <ui:define name="headerTopRight">
  -    <ui:include src="plugins/languageSelector/plugin.xhtml"/>
  +    <ui:include src="plugins/userControl/plugin.xhtml"/>
   </ui:define>
   <ui:define name="headerBottomLeft">
       <ui:include src="plugins/breadcrumb/plugin.xhtml"/>
  @@ -48,9 +48,7 @@
       </s:div>
   </ui:define>
   
  -<ui:define name="footer">
  -    Footer
  -</ui:define>
  +<ui:define name="footer">&#160;</ui:define>
   
   </ui:composition>
   
  
  
  
  1.3       +13 -14    jboss-seam/examples/wiki/view/dirEdit.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: dirEdit.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/dirEdit.xhtml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- dirEdit.xhtml	16 Feb 2007 16:26:45 -0000	1.2
  +++ dirEdit.xhtml	21 Feb 2007 16:24:11 -0000	1.3
  @@ -5,10 +5,11 @@
                   xmlns:ui="http://java.sun.com/jsf/facelets"
                   xmlns:f="http://java.sun.com/jsf/core"
                   xmlns:h="http://java.sun.com/jsf/html"
  +                xmlns:wiki="http://jboss.com/products/seam/wiki"
                   template="themes/#{globalPrefs.themeName}/template.xhtml">
   
   <ui:define name="pluginCSS">
  -    <link href="#{themePath}/css/languageSelector.css" rel="stylesheet" type="text/css"/>
  +    <link href="#{themePath}/css/userControl.css" rel="stylesheet" type="text/css"/>
       <link href="#{themePath}/css/mainMenu.css" rel="stylesheet" type="text/css"/>
   </ui:define>
   
  @@ -18,7 +19,7 @@
   </ui:define>
   
   <ui:define name="headerTopRight">
  -    <ui:include src="plugins/languageSelector/plugin.xhtml"/>
  +    <ui:include src="plugins/userControl/plugin.xhtml"/>
   </ui:define>
   <ui:define name="headerBottomLeft">&#160;</ui:define>
   <ui:define name="headerBottomRight">&#160;</ui:define>
  @@ -89,14 +90,14 @@
                       <h:commandLink id="nodeUp"
                                      action="#{directoryHome.moveNodeUpInList}"
                                      rendered="#{uiBindings.childNodeTable.rowIndex > 0}">
  -                        <h:graphicImage value="themes/default/img/up.gif" width="18" height="18"/>
  +                        <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/up.gif" width="18" height="18"/>
                       </h:commandLink>
                   </h:column>
                   <h:column>
                       <h:commandLink id="nodeDown"
                                      action="#{directoryHome.moveNodeDownInList}"
                                      rendered="#{uiBindings.childNodeTable.rowIndex+1 lt uiBindings.childNodeTable.rowCount}">
  -                        <h:graphicImage value="themes/default/img/down.gif" width="18" height="18"/>
  +                        <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/down.gif" width="18" height="18"/>
                       </h:commandLink>
                   </h:column>
   
  @@ -113,23 +114,23 @@
                       </f:facet>
                       <h:commandLink id="defaultDocument"
                                      action="#{directoryHome.selectDefaultDocument}"
  -                                   rendered="#{directoryHome.instance.defaultDocument != node and node.class.simpleName == 'Document'}">
  -                        <h:graphicImage value="themes/default/img/right.gif" width="18" height="18"/>
  +                                   rendered="#{directoryHome.instance.defaultDocument != node and wiki:isDocument(node)}">
  +                        <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/right.gif" width="18" height="18"/>
                       </h:commandLink>
   
  -                    <h:graphicImage value="themes/default/img/check.gif" width="18" height="18"
  +                    <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/check.gif" width="18" height="18"
                                       rendered="#{directoryHome.instance.defaultDocument == node}"/>
   
                       <h:outputText value="-" rendered="#{node.class.simpleName == 'Directory'}"/>
                   </h:column>
   
                   <h:column>
  -                    <h:graphicImage value="themes/default/img/icon.dir.gif"
  +                    <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/icon.dir.gif"
                                       width="18" height="20"
  -                                    rendered="#{node.class.simpleName == 'Directory'}"/>
  -                    <h:graphicImage value="themes/default/img/icon.doc.gif"
  +                                    rendered="#{wiki:isDirectory(node)}"/>
  +                    <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/icon.doc.gif"
                                       width="18" height="20"
  -                                    rendered="#{node.class.simpleName == 'Document'}"/>
  +                                    rendered="#{wiki:isDocument(node)}"/>
                   </h:column>
   
                   <h:column>
  @@ -174,9 +175,7 @@
   
   </ui:define>
   
  -<ui:define name="footer">
  -
  -</ui:define>
  +<ui:define name="footer">&#160;</ui:define>
   
   </ui:composition>
   
  
  
  
  1.3       +3 -4      jboss-seam/examples/wiki/view/docEdit.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: docEdit.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/docEdit.xhtml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- docEdit.xhtml	16 Feb 2007 16:26:45 -0000	1.2
  +++ docEdit.xhtml	21 Feb 2007 16:24:11 -0000	1.3
  @@ -9,7 +9,7 @@
                   template="themes/#{globalPrefs.themeName}/template.xhtml">
   
   <ui:define name="pluginCSS">
  -    <link href="#{themePath}/css/languageSelector.css" rel="stylesheet" type="text/css"/>
  +    <link href="#{themePath}/css/userControl.css" rel="stylesheet" type="text/css"/>
       <link href="#{themePath}/css/mainMenu.css" rel="stylesheet" type="text/css"/>
   </ui:define>
   
  @@ -19,7 +19,7 @@
   </ui:define>
   
   <ui:define name="headerTopRight">
  -    <ui:include src="plugins/languageSelector/plugin.xhtml"/>
  +    <ui:include src="plugins/userControl/plugin.xhtml"/>
   </ui:define>
   <ui:define name="headerBottomLeft">&#160;</ui:define>
   <ui:define name="headerBottomRight">&#160;</ui:define>
  @@ -109,9 +109,8 @@
   
   </ui:define>
   
  -<ui:define name="footer">
  +<ui:define name="footer">&#160;</ui:define>
   
  -</ui:define>
   
   </ui:composition>
   
  
  
  
  1.1      date: 2007/02/21 16:24:11;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/message.xhtml
  
  Index: message.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:wiki="http://jboss.com/products/seam/wiki"
                  template="themes/#{globalPrefs.themeName}/template.xhtml">
  
  <ui:define name="screenname">Message</ui:define>
  
  <ui:define name="headerTopRight">&#160;</ui:define>
  <ui:define name="headerBottomLeft">&#160;</ui:define>
  <ui:define name="headerBottomRight">&#160;</ui:define>
  
  <ui:define name="sidebar">&#160;</ui:define>
  
  <ui:define name="control">&#160;</ui:define>
  
  <ui:define name="content">&#160;</ui:define>
  
  <ui:define name="footer">&#160;</ui:define>
  
  </ui:composition>
  
  
  
  
  1.1      date: 2007/02/21 16:24:11;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/profile.xhtml
  
  Index: profile.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:wiki="http://jboss.com/products/seam/wiki"
                  template="themes/#{globalPrefs.themeName}/template.xhtml">
  
  <ui:define name="pluginCSS">
      <link href="#{themePath}/css/mainMenu.css" rel="stylesheet" type="text/css"/>
  </ui:define>
  
  <ui:define name="screenname">
      <h:outputText value="Registration" rendered="#{!userHome.managed}"/>
      <h:outputText value="Profile" rendered="#{userHome.managed}"/>
  </ui:define>
  
  <ui:define name="headerTopRight">&#160;</ui:define>
  <ui:define name="headerBottomLeft">&#160;</ui:define>
  <ui:define name="headerBottomRight">&#160;</ui:define>
  
  <ui:define name="sidebar">
      <ui:include src="plugins/mainMenu/plugin.xhtml"/>
  </ui:define>
  
  <ui:define name="control">
      <s:link id="cancel" value="Cancel" styleClass="linkNavigation"
              action="#{browser.redirectToLastBrowsedPage()}" propagation="end"/>
  </ui:define>
  
  <ui:define name="content">
  
  <h:form>
      <div class="form">
          <div class="formHead">
              <h:outputText value="Register a new account" rendered="#{!userHome.managed}"/>
              <h:outputText value="Editing profile: #{userHome.instance.username}" rendered="#{userHome.managed}"/>
          </div>
  
          <div class="formFieldsWideLabels">
  
              <s:validateAll>
  
                  <s:decorate>
                      <div class="entry">
                          <div class="label">First name:</div>
                          <div class="input">
                              <h:inputText size="40" maxlength="63" id="firstname" required="true"
                                           value="#{userHome.instance.firstname}"/>
                          </div>
                      </div>
                  </s:decorate>
  
                  <s:decorate>
                      <div class="entry">
                          <div class="label">Last name:</div>
                          <div class="input">
                              <h:inputText size="40" maxlength="63" id="lastname" required="true"
                                           value="#{userHome.instance.lastname}"/>
                          </div>
                      </div>
                  </s:decorate>
  
                  <s:decorate>
                      <div class="entry">
                          <div class="label">E-Mail:</div>
                          <div class="input">
                              <h:inputText size="40" maxlength="255" id="email" required="true"
                                           value="#{userHome.instance.email}"/>
                          </div>
                      </div>
                  </s:decorate>
  
                  <s:decorate>
                      <div class="entry">
                          <div class="label">Username:</div>
                          <div class="input">
                              <h:inputText size="16" maxlength="16" id="username" required="true"
                                           value="#{userHome.instance.username}"/>
                          </div>
                      </div>
                  </s:decorate>
  
                  <s:decorate>
                      <div class="entry">
                          <div class="label">Password:</div>
                          <div class="input">
                              <h:inputSecret size="15" maxlength="15" id="password"
                                             value="#{userHome.password}"/>
                          </div>
                      </div>
                  </s:decorate>
  
                  <s:decorate>
                      <div class="entry">
                          <div class="label">Repeat password:</div>
                          <div class="input">
                              <h:inputSecret size="15" maxlength="15" id="passwordControl"
                                             value="#{userHome.passwordControl}"/>
                          </div>
                      </div>
                  </s:decorate>
  
                  <s:div rendered="#{not identity.loggedIn}">
                      <div class="entry">
                          <div class="label">Verification image:</div>
                          <div class="output">
                              <h:graphicImage value="/seam/resource/captcha?#{captcha.id}" style="border: 1px solid black;"/>
                          </div>
                      </div>
  
                      <s:decorate>
                          <div class="entry">
                              <div class="label">Enter the letters:</div>
                              <div class="input">
                                  <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true"/>
                              </div>
                          </div>
                      </s:decorate>
                  </s:div>
  
              </s:validateAll>
  
          </div>
  
          <div class="formControlsWideLabels">
  
              <div class="entry">
                  <div class="label">&#160;</div>
                  <div class="input">
                      <h:commandButton id="register" value="Register" styleClass="button"
                                       action="#{userHome.persist}"
                                       rendered="#{!userHome.managed}"/>
  
                      <h:commandButton id="update" value="Update" styleClass="button"
                                       action="#{userHome.update}"
                                       rendered="#{userHome.managed}"/>
  
                  </div>
              </div>
  
          </div>
  
      </div>
  </h:form>
  
  
  </ui:define>
  
  <ui:define name="footer">&#160;</ui:define>
  
  </ui:composition>
  
  
  
  



More information about the jboss-cvs-commits mailing list