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

Christian Bauer christian at hibernate.org
Fri Apr 27 06:33:29 EDT 2007


  User: cbauer  
  Date: 07/04/27 06:33:29

  Added:       examples/wiki/view/plugins/blogDirectory    allEntries.xhtml
                        recentEntries.xhtml entryPages.xml
  Log:
  Now deployable on 4.2 out-of-box (local Hibernate JARs) and optimized SQL and caching
  
  Revision  Changes    Path
  1.1      date: 2007/04/27 10:33:29;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/plugins/blogDirectory/allEntries.xhtml
  
  Index: allEntries.xhtml
  ===================================================================
  <s:div id="allEntries"
  	 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:c="http://java.sun.com/jstl/core"
       xmlns:wiki="http://jboss.com/products/seam/wiki"
       xmlns:s="http://jboss.com/products/seam/taglib"
          style="vertical-align:top; margin-left; 15px;">
  
      <div class="allEntries">
  
          <div class="allEntriesHeader">
              All blog entries by month:
          </div>
  
          <div class="allEntriesReturn">
              <h:outputLink value="#{wiki:renderURL(currentDocument)}">
                  Return to blog view...
              </h:outputLink>
          </div>
  
          <h:dataTable value="#{allBlogEntries}" var="monthMap"
                       styleClass="datatable"
                       columnClasses="defaultColumn"
                       cellpadding="0" cellspacing="0" border="0">
              <h:column>
                  <div class="allEntriesMonth">
                      <h:outputText value="#{monthMap.key}">
                          <f:convertDateTime pattern="yyyy MMMM" timeZone="#{wikiPreferences.timeZone}"/>
                      </h:outputText>
                  </div>
  
                  <h:dataTable value="#{monthMap.value}" var="be"
                               columnClasses="allEntriesItem"
                               cellpadding="0" cellspacing="0" border="0">
                      <h:column>
                          <h:outputLink value="#{wiki:renderURL(be.entryDocument)}">
                              #{be.entryDocument.name}
                          </h:outputLink>&#160;
                          (<h:outputText value="#{be.entryDocument.createdOn}">
                              <f:convertDateTime pattern="dd. MMM yyyy" timeZone="#{wikiPreferences.timeZone}"/>
                          </h:outputText>,&#160;
                          <h:outputLink value="#{wiki:renderHomeURL(be.entryDocument.createdBy)}"
                                        rendered="#{!empty be.entryDocument.createdBy.memberHome}">#{be.entryDocument.createdBy.fullname}</h:outputLink>
                          <h:outputText rendered="#{empty be.entryDocument.createdBy.memberHome}">#{be.entryDocument.createdBy.fullname}</h:outputText>)
                      </h:column>
                  </h:dataTable>
  
              </h:column>
          </h:dataTable>
  
          <div class="allEntriesReturn">
              <h:outputLink value="#{wiki:renderURL(currentDocument)}">
                  Return to blog view...
              </h:outputLink>
          </div>
  
      </div>
  
  </s:div>
  
  
  1.1      date: 2007/04/27 10:33:29;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/plugins/blogDirectory/recentEntries.xhtml
  
  Index: recentEntries.xhtml
  ===================================================================
  <s:div id="recentEntries"
  	 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:c="http://java.sun.com/jstl/core"
       xmlns:wiki="http://jboss.com/products/seam/wiki"
       xmlns:s="http://jboss.com/products/seam/taglib"
          style="vertical-align:top; margin-left; 15px;">
  
      <div class="recentEntries">
  
          <div class="recentEntriesHeader">Recent entries:</div>
  
          <h:dataTable value="#{recentBlogEntries}" var="dayMap"
                       styleClass="datatable"
                       columnClasses="defaultColumn"
                       cellpadding="0" cellspacing="0" border="0">
              <h:column>
                  <div class="recentEntriesDay">
                      <h:outputText value="#{dayMap.key}">
                          <f:convertDateTime pattern="dd. MMM yyyy" timeZone="#{wikiPreferences.timeZone}"/>
                      </h:outputText>
                  </div>
  
                  <h:dataTable value="#{dayMap.value}" var="be"
                               columnClasses="recentEntriesItem"
                               cellpadding="0" cellspacing="0" border="0">
                      <h:column>
                          <h:outputLink value="#{wiki:renderURL(be.entryDocument)}">
                              #{wiki:truncateString(be.entryDocument.name, 25, '...')}
                          </h:outputLink>
                      </h:column>
                  </h:dataTable>
  
              </h:column>
          </h:dataTable>
  
          <div class="recentEntriesFooter">
              <h:outputLink value="#{wiki:renderURL(currentDocument)}">
                  <f:param name="blogIndex" value="true"/>
                  More...
              </h:outputLink>
          </div>
  
      </div>
  
  </s:div>
  
  
  1.1      date: 2007/04/27 10:33:29;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/view/plugins/blogDirectory/entryPages.xml
  
  Index: entryPages.xml
  ===================================================================
  <s:div id="blogEntries"
         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:c="http://java.sun.com/jstl/core"
         xmlns:wiki="http://jboss.com/products/seam/wiki"
         xmlns:s="http://jboss.com/products/seam/taglib">
  
  <s:div rendered="#{!empty blogDirectory.blogEntries}">
      <c:forEach var="blogEntry" items="#{blogDirectory.blogEntries}">
  
          <div class="blogEntry">
  
              <div class="blogEntryHeader">
                  <div class="blogEntryLinks">
                      <div class="blogEntryPermLink>">
                          <h:outputLink value="#{wiki:renderPermLink(blogEntry.entryDocument)}">Permlink</h:outputLink>
                      </div>
                      <div class="blogEntryWikiLink>">
                          <h:outputLink value="#{wiki:renderWikiLink(blogEntry.entryDocument)}">WikiLink</h:outputLink>
                      </div>
                  </div>
                  <div class="blogEntryTitle">
                      <h:outputText value="#{blogEntry.entryDocument.name}"/>
                  </div>
                  <div class="blogEntryCreatedOn">
                      <h:outputText styleClass="blogEntryCreatedOnText" value="#{blogEntry.entryDocument.createdOn}">
                          <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{wikiPreferences.timeZone}"/>
                      </h:outputText>
                  </div>
              </div>
  
              <div class="blogEntryBody">
                  <wiki:formattedText value="#{blogEntry.entryDocument.content}"
                                      linkStyleClass="regularLink"
                                      brokenLinkStyleClass="brokenLink"
                                      attachmentLinkStyleClass="blogDirectoryAttachmentLink"
                                      thumbnailLinkStyleClass="regularLink"
                                      updateResolvedLinks="false"/>
                  <ui:include src="../../includes/attachmentDisplay.xhtml"/>
              </div>
  
              <div class="blogEntryFooter">
                  <s:div rendered="#{!empty blogEntry.commentCount and blogEntry.entryDocument.enableComments}">
                      <h:outputLink value="#{wiki:renderPermLink(blogEntry.entryDocument)}#commentsDisplay">
                          #{blogEntry.commentCount} comment(s)
                      </h:outputLink>
                  </s:div>
                  <s:div rendered="#{blogEntry.entryDocument.enableComments and blogEntry.entryDocument.enableCommentForm}">
                      <h:outputLink value="#{wiki:renderPermLink(blogEntry.entryDocument)}#commentForm">Post comment
                      </h:outputLink>
                  </s:div>
              </div>
  
          </div>
  
      </c:forEach>
  </s:div>
  
  <s:div id="noBlogEntriesContainer" rendered="#{empty blogDirectory.blogEntries}">
      No blog entries found, create documents in this directory to create blog entries. Note that this plugin
      only works after you saved the document you placed it on.
  </s:div>
  
  <h:panelGrid columns="5"
               styleClass="blogPagerTable"
               columnClasses="blogPagerColumn, blogPagerColumn, blogPagerTextColumn, blogPagerColumn, blogPagerColumn, "
               cellpadding="0" cellspacing="0" border="0">
  
      <h:outputLink rendered="#{blogDirectory.previousPageAvailable}" value="#{wiki:renderURL(currentDocument)}">
          <f:param name="blogPage" value="#{blogDirectory.firstPage}"/>
          <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.first.gif" width="13" height="11"/>
      </h:outputLink>
      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                      rendered="#{!blogDirectory.previousPageAvailable}"/>
  
      <h:outputLink rendered="#{blogDirectory.previousPageAvailable}" value="#{wiki:renderURL(currentDocument)}">
          <f:param name="blogPage" value="#{blogDirectory.previousPage}"/>
          <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.previous.gif" width="13" height="11"/>
      </h:outputLink>
      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                      rendered="#{!blogDirectory.previousPageAvailable}"/>
  
      <h:outputText value="Showing #{blogDirectory.firstRow} to
                                   #{blogDirectory.lastRow} of
                                   #{blogDirectory.totalRowCount} blog entries"/>
  
      <h:outputLink rendered="#{blogDirectory.nextPageAvailable}" value="#{wiki:renderURL(currentDocument)}">
          <f:param name="blogPage" value="#{blogDirectory.nextPage}"/>
          <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.next.gif" width="13" height="11"/>
      </h:outputLink>
      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                      rendered="#{!blogDirectory.nextPageAvailable}"/>
  
      <h:outputLink rendered="#{blogDirectory.nextPageAvailable}" value="#{wiki:renderURL(currentDocument)}">
          <f:param name="blogPage" value="#{blogDirectory.lastPage}"/>
          <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/page.last.gif" width="13" height="11"/>
      </h:outputLink>
      <h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/blank.gif" width="13" height="11"
                      rendered="#{!blogDirectory.nextPageAvailable}"/>
  
  </h:panelGrid>
  
  </s:div>
  
  



More information about the jboss-cvs-commits mailing list