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

Christian Bauer christian at hibernate.org
Wed Apr 18 11:34:29 EDT 2007


  User: cbauer  
  Date: 07/04/18 11:34:29

  Modified:    examples/wiki/view/plugins/comments  plugin.xhtml
  Log:
  Disabled broken stuff (RichFaces trees, arithmetic EL) and finished comments plugin
  
  Revision  Changes    Path
  1.3       +111 -145  jboss-seam/examples/wiki/view/plugins/comments/plugin.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: plugin.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/view/plugins/comments/plugin.xhtml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- plugin.xhtml	11 Apr 2007 15:53:47 -0000	1.2
  +++ plugin.xhtml	18 Apr 2007 15:34:29 -0000	1.3
  @@ -6,48 +6,57 @@
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:wiki="http://jboss.com/products/seam/wiki"
          xmlns:s="http://jboss.com/products/seam/taglib">
  +<s:div styleClass="#{showPluginPreferences and !empty commentsPreferencesEditor ? 'pluginPreferencesBox' : null}">
   
  -<h:dataTable value="#{commentHome.comments}" var="c" style="width:300px"
  +<s:div id="commentsPreferences"
  +       rendered="#{showPluginPreferences and !empty commentsPreferencesEditor}">
  +    <div align="center">
  +        <h:message for="commentsPreferences" styleClass="attentionMessage"/>
  +
  +        <ui:include src="../../includes/pluginPreferencesForm.xhtml">
  +            <ui:param name="pluginPreferencesEditor" value="#{commentsPreferencesEditor}"/>
  +        </ui:include>
  +    </div>
  +</s:div>
  +
  +<h:dataTable value="#{commentHome.comments}" var="c" style="margin-top:10px;"
  +             rendered="#{not empty commentHome.comments}"
                styleClass="datatable rightBorder leftBorder topBorder bottomBorder"
                headerClass="regularHeader alignLeft"
  -             columnClasses="defaultColumn alignLeft"
  +             columnClasses="commentColumn"
                rowClasses="rowOdd,rowEven"
                cellpadding="0" cellspacing="0" border="0">
       <h:column>
           <f:facet name="header">
  -            This document has #{wiki:sizeOf(commentHome.comments)} comment(s):
  +            #{wiki:sizeOf(commentHome.comments)} comment(s):
           </f:facet>
   
  -        <h:form>
  -            <a:commandLink action="#{commentHome.remove(c.id)}"
  -                           reRender="body"
  -                           styleClass="button"><span class="buttonLabel">Remove</span></a:commandLink>
  -        </h:form>
  -
  -        Subject: #{c.subject}<br/>
  -        Posted on:
  -        <h:outputText value="#{c.createdOn}">
  +        <div class="commentSubject">
  +            #{c.subject}
  +        </div>
  +
  +        <div class="commentAuthorDate">
  +            <span class="commentDate"><h:outputText value="#{c.createdOn}">
               <f:convertDateTime pattern="dd. MMM yyyy, HH:mm"/>
  -        </h:outputText>
  -        <br/>
  -        From: #{c.fromUserName} <a href="mailto:#{c.fromUserEmail}">#{c.fromUserEmail}</a>
  -        <a href="http://#{c.fromUserHomepage}">#{c.fromUserHomepage}</a><br/>
  -
  -        Content:
  -        <s:div>
  -            <wiki:formattedText value="#{c.text}"
  -                                linkStyleClass="regularLink"
  -                                brokenLinkStyleClass="brokenLink"
  -                                attachmentLinkStyleClass="regularLink"
  -                                thumbnailLinkStyleClass="regularLink"/>
  +            </h:outputText></span>
  +            <s:span>&#160;(<s:span styleClass="commentAuthor" rendered="#{empty c.fromUserHomepage}">#{c.fromUserName}</s:span>
  +                <s:span styleClass="commentAuthor" rendered="#{!empty c.fromUserHomepage}"><a
  +                        href="http://#{c.fromUserHomepage}">#{c.fromUserName}</a></s:span>
  +                <s:span styleClass="commentAuthor" rendered="#{!empty c.fromUserEmail}">, <a
  +                        href="mailto:#{c.fromUserEmail}">#{c.fromUserEmail}</a></s:span>)
  +            </s:span>
  +        </div>
  +
  +        <s:div styleClass="commentText">
  +            <s:formattedText value="#{c.text}"/>
           </s:div>
   
       </h:column>
   </h:dataTable>
   
   
  -<h:form id="commentForm">
  -<div class="form">
  +<h:form id="commentForm" styleClass="commentForm">
  +    <div class="form">
       <div class="formHead">Post new comment:</div>
   
       <div class="formFields formBorder wideLabels">
  @@ -60,6 +69,7 @@
                       <div class="input">
                           <h:inputText tabindex="102" size="40" maxlength="100" required="true"
                                        id="userName" value="#{commentHome.comment.fromUserName}">
  +                                <a:support event="onblur" reRender="userNameDecorate"/>
                           </h:inputText>
                       </div>
                   </div>
  @@ -93,12 +103,13 @@
                       <div class="input">
                           <h:inputText tabindex="102" size="40" maxlength="255" required="true"
                                        id="subject" value="#{commentHome.comment.subject}">
  +                                <a:support event="onblur" reRender="subjectDecorate"/>
                           </h:inputText>
                       </div>
                   </div>
               </s:decorate>
   
  -           <!--<s:decorate>
  +                <s:decorate id="commentDecorate">
                   <div class="entry">
                       <div class="label">Comment:</div>
                       <s:div styleClass="input" id="commentText">
  @@ -106,46 +117,13 @@
                                            cols="40"
                                            rows="10"
                                            id="commentTextInput"
  -                                         value="#{commentHome.formContent}">
  -                        </h:inputTextarea>
  -                    </s:div>
  -                </div>
  -            </s:decorate>-->
  -
  -            
  -            <s:decorate>
  -                <div class="entry">
  -                    <div class="label">Text:</div>
  -                    <s:div styleClass="input" id="commentText">
  -                        Preview enabled: <h:outputText value="#{commentHome.enabledPreview}"/>
  -                        <h:inputTextarea tabindex="102" required="true"
  -                                         cols="40"
  -                                         rows="10"
  -                                         id="commentNoPreview"
  -                                         rendered="#{!commentHome.enabledPreview}"
  -                                         value="#{commentHome.formContent}"/>
  -                        <h:inputTextarea tabindex="102" required="true"
  -                                         cols="40"
  -                                         rows="10"
  -                                         id="commentWithPreview"
  -                                         rendered="#{commentHome.enabledPreview}"
  -                                         value="#{commentHome.formContent}">
  -                            <a:support event="onkeyup" reRender="commentPreview" requestDelay="3000" eventQueue="editKeyPress"/>
  +                                             value="#{commentHome.comment.text}">
  +                                <a:support event="onblur" reRender="commentDecorate"/>
                           </h:inputTextarea>
                       </s:div>
                   </div>
               </s:decorate>
   
  -            <s:div styleClass="entry">
  -                <div class="label">&#160;</div>
  -                <div class="input">
  -                    <h:selectBooleanCheckbox value="#{commentHome.enabledPreview}" tabindex="102">
  -                        <a:support event="onchange" reRender="documentDisplay"/>
  -                    </h:selectBooleanCheckbox>
  -                    Show interactive preview
  -                </div>
  -            </s:div>
  -            
   
           </s:validateAll>
   
  @@ -163,20 +141,8 @@
           </div>
       </div>
   
  -</div>
  +    </div>
   </h:form>
   
  -<!--
  -<s:div styleClass="documentDisplay" id="commentPreview">
  -    Preview enabled: <h:outputText value="#{commentHome.enabledPreview}"/>
  -    <s:div rendered="#{commentHome.enabledPreview}">
  -        <wiki:formattedText value="#{commentHome.comment.text}"
  -                            linkStyleClass="regularLink"
  -                            brokenLinkStyleClass="brokenLink"
  -                            attachmentLinkStyleClass="regularLink"
  -                            thumbnailLinkStyleClass="regularLink"/>
  -    </s:div>
   </s:div>
  --->
  -
   </wiki:plugin>
  \ No newline at end of file
  
  
  



More information about the jboss-cvs-commits mailing list