[jboss-svn-commits] JBL Code SVN: r7785 - in labs/jbossforums/trunk/forums/src: main/org/jboss/portlet/forums/impl resources/portal-forums-war/views/errors resources/portal-forums-war/views/topics

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Nov 22 12:20:51 EST 2006


Author: unibrew
Date: 2006-11-22 12:20:47 -0500 (Wed, 22 Nov 2006)
New Revision: 7785

Modified:
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
   labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/errors/error_body.xhtml
   labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
Log:
[JBFORUMS-144] I fixed problem with tomahawk on couple of views when running on AS 4.0.5.

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2006-11-22 17:20:18 UTC (rev 7784)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2006-11-22 17:20:47 UTC (rev 7785)
@@ -261,7 +261,7 @@
           {
              Session session = getSession();
              Query query = session.createQuery(" from CategoryImpl as c " +
-                                                " join fetch c.forums " +
+                                                " left outer join fetch c.forums " +
                                                 " where c.id=:categoryId ");
              query.setParameter("categoryId",id);
              Category category = (Category)query.uniqueResult();
@@ -362,7 +362,7 @@
           Session session = getSession();
           Query query = session.createQuery(" select c " +
                                             " from CategoryImpl as c " +
-                                            " join fetch c.forums " +
+                                            " left outer join fetch c.forums " +
                                             " order by c.order asc");
           List categoriesWithDuplicates = query.list();
           Iterator it = categoriesWithDuplicates.iterator();

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/errors/error_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/errors/error_body.xhtml	2006-11-22 17:20:18 UTC (rev 7784)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/errors/error_body.xhtml	2006-11-22 17:20:47 UTC (rev 7785)
@@ -47,8 +47,10 @@
                <td>&#160;</td>
             </tr>
             <tr>
-               <td align="center">                	
+               <td align="center">
+                  <h:form>
                 	<h:commandButton type="button" value="${resource.Back}" onclick="javascript:history.back();"/>
+                  </h:form>
                </td>
             </tr>
             <tr>

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml	2006-11-22 17:20:18 UTC (rev 7784)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml	2006-11-22 17:20:47 UTC (rev 7785)
@@ -97,69 +97,75 @@
          </tr>
          <tr>         
          	<!-- insert the newTopic and replyTopic buttons here -->         	
-            <td align="left" valign="bottom" nowrap="nowrap" class="nav" >                           
-               <c:choose>
+            <td align="left" valign="bottom" nowrap="nowrap" class="nav" >
+               <h:form>
                
-                 <c:when test="#{topic.topic.forum.status == forums:constantInt('FORUM_LOCKED')}">
+                  <c:choose>
                
-                   <img border="0"
-                        src="#{forums:themeURL('resourcePostLockedURL')}"
-                        alt="${resource.Forum_locked}" />
-                   <img border="0"
-                        src="#{forums:themeURL('resourceReplyLockedURL')}"
-                        alt="${resource.Forum_locked}" />
+                     <c:when test="#{topic.topic.forum.status == forums:constantInt('FORUM_LOCKED')}">
+               
+                        <img border="0"
+                             src="#{forums:themeURL('resourcePostLockedURL')}"
+                             alt="${resource.Forum_locked}" />
+                        <img border="0"
+                             src="#{forums:themeURL('resourceReplyLockedURL')}"
+                             alt="${resource.Forum_locked}" />
                     
-                 </c:when>
+                     </c:when>
                  
-                 <c:when test="#{(topic.topic.status == forums:constantInt('TOPIC_LOCKED'))
-                 &amp;&amp; (topic.topic.forum.status != forums:constantInt('FORUM_LOCKED'))}">
+                     <c:when test="#{(topic.topic.status == forums:constantInt('TOPIC_LOCKED'))
+                     &amp;&amp; (topic.topic.forum.status != forums:constantInt('FORUM_LOCKED'))}">
                 	<forums:isAllowed fragment="acl://newTopic" contextData="#{topic.topic.forum}">            
                 	<!-- new topic -->
-                    <h:commandLink id="newTopic" action="#{newTopic.start}" style="text-decoration: none;">
-                      <f:param name="f" value="#{topic.topic.forum.id}"/>
-                      <f:verbatim>
-                        <img border="0"
-                             src="#{forums:themeURL('resourcePostNewURL')}"
-                             alt="${resource.Post_new_topic}"/>
-                      </f:verbatim>
-                    </h:commandLink>
-                    </forums:isAllowed>
-                    <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
-                    <!-- reply -->
+                        <h:commandLink id="newTopic" action="#{newTopic.start}" style="text-decoration: none;">
+                           <f:param name="f" value="#{topic.topic.forum.id}"/>
+                           <f:verbatim>
+                              <img border="0"
+                                   src="#{forums:themeURL('resourcePostNewURL')}"
+                                   alt="${resource.Post_new_topic}"/>
+                           </f:verbatim>
+                        </h:commandLink>
+                        </forums:isAllowed>
+                        <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
+                
+                        <!-- reply -->
                         <img border="0" style="text-decoration: none;"
                              src="#{forums:themeURL('resourceReplyLockedURL')}"
                              alt="${resource.Topic_locked}" />
-                    </forums:isAllowed>                    
-                 </c:when>
+                        </forums:isAllowed>                    
+                     </c:when>
               
-                 <c:otherwise>
-               		<!-- new topic -->
+                     <c:otherwise>
+               	
+                	<!-- new topic -->
                		<forums:isAllowed fragment="acl://newTopic" contextData="#{topic.topic.forum}">            
-                    <h:commandLink id="newTopic" action="#{newTopic.start}" style="text-decoration: none;">
-                      <f:param name="f" value="#{topic.topic.forum.id}"/>
-                      <f:verbatim>
-                        <img border="0"
-                             src="#{forums:themeURL('resourcePostNewURL')}"
-                             alt="${resource.Post_new_topic}"/>
-                      </f:verbatim>
-                    </h:commandLink> 
-                    </forums:isAllowed>
-                    <!-- reply -->
-                    <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
-                    <h:commandLink id="replyTopic" action="#{replyTopic.start}" style="text-decoration: none;">
-                      <f:param name="f" value="#{topic.topic.forum.id}"/>
-                      <f:param name="t" value="#{topic.topic.id}"/>
-                      <f:verbatim>
-                        <img border="0"
-                             src="#{forums:themeURL('resourceReplyNewURL')}"
-                             alt="${resource.Reply_to_topic}" />
-                      </f:verbatim>
-                    </h:commandLink> 
-                    </forums:isAllowed>                   
-                 </c:otherwise>
+                        <h:commandLink id="newTopic" action="#{newTopic.start}" style="text-decoration: none;">
+                           <f:param name="f" value="#{topic.topic.forum.id}"/>
+                           <f:verbatim>
+                              <img border="0"
+                                   src="#{forums:themeURL('resourcePostNewURL')}"
+                                   alt="${resource.Post_new_topic}"/>
+                           </f:verbatim>
+                        </h:commandLink> 
+                        </forums:isAllowed>
+                        
+                        <!-- reply -->
+                        <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
+                        <h:commandLink id="replyTopic" action="#{replyTopic.start}" style="text-decoration: none;">
+                           <f:param name="f" value="#{topic.topic.forum.id}"/>
+                           <f:param name="t" value="#{topic.topic.id}"/>
+                           <f:verbatim>
+                              <img border="0"
+                                   src="#{forums:themeURL('resourceReplyNewURL')}"
+                                   alt="${resource.Reply_to_topic}" />
+                           </f:verbatim>
+                        </h:commandLink> 
+                        </forums:isAllowed>                   
+                     </c:otherwise>
                  
-               </c:choose>
-
+                  </c:choose>
+                  
+               </h:form>
             </td>
             
             
@@ -267,6 +273,7 @@
                            </td>                           
                            <!-- "Quote", "Edit", and "Delete" buttons -->
                            <td valign="top" nowrap="">
+                                <h:form>
                            		<!-- add the quote link -->
                            		<forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
                            		<h:commandLink action="#{replyTopic.startQuote}" style="text-decoration: none;">
@@ -298,6 +305,7 @@
                       				</f:verbatim>
                     			</h:outputLink>
                     			</forums:isAllowed>
+                                 </h:form>
                             </td>
                         </tr>
                         <tr>
@@ -502,69 +510,75 @@
           align="center">
       <tr>
         	<!-- insert the newTopic and replyTopic buttons here -->         	
-            <td align="left" valign="bottom" nowrap="nowrap" class="nav" >                           
-               <c:choose>
+            <td align="left" valign="bottom" nowrap="nowrap" class="nav" >
+               <h:form>
                
-                 <c:when test="#{topic.topic.forum.status == forums:constantInt('FORUM_LOCKED')}">
+                  <c:choose>
                
-                   <img border="0"
-                        src="#{forums:themeURL('resourcePostLockedURL')}"
-                        alt="${resource.Forum_locked}" />
-                   <img border="0"
-                        src="#{forums:themeURL('resourceReplyLockedURL')}"
-                        alt="${resource.Forum_locked}" />
+                     <c:when test="#{topic.topic.forum.status == forums:constantInt('FORUM_LOCKED')}">
+               
+                        <img border="0"
+                             src="#{forums:themeURL('resourcePostLockedURL')}"
+                             alt="${resource.Forum_locked}" />
+                        <img border="0"
+                             src="#{forums:themeURL('resourceReplyLockedURL')}"
+                             alt="${resource.Forum_locked}" />
                     
-                 </c:when>
+                     </c:when>
                  
-                 <c:when test="#{(topic.topic.status == forums:constantInt('TOPIC_LOCKED'))
-                 &amp;&amp; (topic.topic.forum.status != forums:constantInt('FORUM_LOCKED'))}">
+                     <c:when test="#{(topic.topic.status == forums:constantInt('TOPIC_LOCKED'))
+                     &amp;&amp; (topic.topic.forum.status != forums:constantInt('FORUM_LOCKED'))}">
                 	<forums:isAllowed fragment="acl://newTopic" contextData="#{topic.topic.forum}">            
                 	<!-- new topic -->
-                    <h:commandLink id="newTopicBelow" action="#{newTopic.start}" style="text-decoration: none;">
-                      <f:param name="f" value="#{topic.topic.forum.id}"/>
-                      <f:verbatim>
-                        <img border="0"
-                             src="#{forums:themeURL('resourcePostNewURL')}"
-                             alt="${resource.Post_new_topic}"/>
-                      </f:verbatim>
-                    </h:commandLink>
-                    </forums:isAllowed>
-                    <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
-                    <!-- reply -->
+                        <h:commandLink id="newTopic" action="#{newTopic.start}" style="text-decoration: none;">
+                           <f:param name="f" value="#{topic.topic.forum.id}"/>
+                           <f:verbatim>
+                              <img border="0"
+                                   src="#{forums:themeURL('resourcePostNewURL')}"
+                                   alt="${resource.Post_new_topic}"/>
+                           </f:verbatim>
+                        </h:commandLink>
+                        </forums:isAllowed>
+                        <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
+                
+                        <!-- reply -->
                         <img border="0" style="text-decoration: none;"
                              src="#{forums:themeURL('resourceReplyLockedURL')}"
                              alt="${resource.Topic_locked}" />
-                    </forums:isAllowed>                    
-                 </c:when>
+                        </forums:isAllowed>                    
+                     </c:when>
               
-                 <c:otherwise>
-               		<!-- new topic -->
+                     <c:otherwise>
+               	
+                	<!-- new topic -->
                		<forums:isAllowed fragment="acl://newTopic" contextData="#{topic.topic.forum}">            
-                    <h:commandLink id="newTopicBelow" action="#{newTopic.start}" style="text-decoration: none;">
-                      <f:param name="f" value="#{topic.topic.forum.id}"/>
-                      <f:verbatim>
-                        <img border="0"
-                             src="#{forums:themeURL('resourcePostNewURL')}"
-                             alt="${resource.Post_new_topic}"/>
-                      </f:verbatim>
-                    </h:commandLink> 
-                    </forums:isAllowed>
-                    <!-- reply -->
-                    <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
-                    <h:commandLink id="replyTopicBelow" action="#{replyTopic.start}" style="text-decoration: none;">
-                      <f:param name="f" value="#{topic.topic.forum.id}"/>
-                      <f:param name="t" value="#{topic.topic.id}"/>
-                      <f:verbatim>
-                        <img border="0"
-                             src="#{forums:themeURL('resourceReplyNewURL')}"
-                             alt="${resource.Reply_to_topic}" />
-                      </f:verbatim>
-                    </h:commandLink> 
-                    </forums:isAllowed>                   
-                 </c:otherwise>
+                        <h:commandLink id="newTopic" action="#{newTopic.start}" style="text-decoration: none;">
+                           <f:param name="f" value="#{topic.topic.forum.id}"/>
+                           <f:verbatim>
+                              <img border="0"
+                                   src="#{forums:themeURL('resourcePostNewURL')}"
+                                   alt="${resource.Post_new_topic}"/>
+                           </f:verbatim>
+                        </h:commandLink> 
+                        </forums:isAllowed>
+                        
+                        <!-- reply -->
+                        <forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">            
+                        <h:commandLink id="replyTopic" action="#{replyTopic.start}" style="text-decoration: none;">
+                           <f:param name="f" value="#{topic.topic.forum.id}"/>
+                           <f:param name="t" value="#{topic.topic.id}"/>
+                           <f:verbatim>
+                              <img border="0"
+                                   src="#{forums:themeURL('resourceReplyNewURL')}"
+                                   alt="${resource.Reply_to_topic}" />
+                           </f:verbatim>
+                        </h:commandLink> 
+                        </forums:isAllowed>                   
+                     </c:otherwise>
                  
-               </c:choose>
-
+                  </c:choose>
+                  
+               </h:form>
             </td>
          
            <td align="left" valign="middle" class="nav" width="100%">
@@ -766,6 +780,7 @@
         <c:if test="#{moderator.initialized &amp;&amp; moderator.forum!=null &amp;&amp; moderator.forum.id!=-1}">
         <tr>
             <td>
+                <h:form>
                 &#160;<br/>
                 <forums:isAllowed fragment="acl://deleteTopics" contextData="#{forum.forum}">
                 <h:commandLink action="#{moderator.deleteConfirm}" style="text-decoration: none;">
@@ -815,6 +830,7 @@
                     </f:verbatim>
                 </h:outputLink>&#160;
                 </forums:isAllowed>
+                </h:form>
             </td>
         </tr>
         </c:if>




More information about the jboss-svn-commits mailing list