[jboss-svn-commits] JBL Code SVN: r20147 - in labs/jbossforums/branches/forums110P22/forums/src: resources/portal-forums-war/WEB-INF and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri May 23 16:01:56 EDT 2008


Author: unibrew
Date: 2008-05-23 16:01:56 -0400 (Fri, 23 May 2008)
New Revision: 20147

Modified:
   labs/jbossforums/branches/forums110P22/forums/src/main/org/jboss/portlet/forums/ui/ForumsPortletExternalContextImpl.java
   labs/jbossforums/branches/forums110P22/forums/src/resources/portal-forums-war/WEB-INF/web.xml
Log:
[JBFORUMS-282] Default way of creating JSF ids is now turned on but configurable.

Modified: labs/jbossforums/branches/forums110P22/forums/src/main/org/jboss/portlet/forums/ui/ForumsPortletExternalContextImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P22/forums/src/main/org/jboss/portlet/forums/ui/ForumsPortletExternalContextImpl.java	2008-05-23 20:01:03 UTC (rev 20146)
+++ labs/jbossforums/branches/forums110P22/forums/src/main/org/jboss/portlet/forums/ui/ForumsPortletExternalContextImpl.java	2008-05-23 20:01:56 UTC (rev 20147)
@@ -46,8 +46,13 @@
 
     public String encodeNamespace(String name)
     {
-        super.encodeNamespace(name);
-        return this.getInitParameter("org.jboss.forums.UNIQUE_ID")+name;
+        String orginalName = super.encodeNamespace(name);
+        String initParam = this.getInitParameter("org.jboss.forums.UNIQUE_ID");
+        if (initParam==null)
+        {
+            return orginalName;
+        }
+        return initParam+name;
     }    
 
 }

Modified: labs/jbossforums/branches/forums110P22/forums/src/resources/portal-forums-war/WEB-INF/web.xml
===================================================================
--- labs/jbossforums/branches/forums110P22/forums/src/resources/portal-forums-war/WEB-INF/web.xml	2008-05-23 20:01:03 UTC (rev 20146)
+++ labs/jbossforums/branches/forums110P22/forums/src/resources/portal-forums-war/WEB-INF/web.xml	2008-05-23 20:01:56 UTC (rev 20147)
@@ -21,18 +21,27 @@
         </description>
    </context-param>
           
+   <!--
    <context-param>
         <param-name>org.jboss.forums.UNIQUE_ID</param-name>
         <param-value>f</param-value>
+        <description>
+            The value of this parameter overrides unique id created by portal
+            which is used to create an unique id for JSF components.
+            Sometimes this generated unique key might be long and if Forums
+            are used with large amounts of data then the length might increase
+            size of generated HTML code.
+            The parameter is optional and it can be set to any String value
+            also to a zero length String.
    </context-param>
+   -->
    
    <!-- >context-param>
         <param-name>org.jboss.forums.feeds.URL</param-name>
         <param-value>/portal-forums</param-value>
         <description>
-            This parameter is used to create proper links in portal environment.
-            It must contain a path to a portlet window where Forums are deployed.
-            If the application is deployed in standalone mode then the parameter is ignored.
+            This parameter is used to create proper links in standalone environment.
+            It must contain a path to Forums Servlet where Forums are deployed.
         </description>
     </context-param>-->
     <context-param>
@@ -41,7 +50,6 @@
         <description>
             This parameter is used to create proper links in portal environment.
             It must contain a path to a portlet window where Forums are deployed.
-            If the application is deployed in standalone mode then the parameter is ignored.
         </description>
     </context-param>
     <context-param>
@@ -50,7 +58,6 @@
         <description>
             This parameter is used to create proper links in portal environment.
             It must contain a path to a portlet window where Forums are deployed.
-            If the application is deployed in standalone mode then the parameter is ignored.
         </description>
     </context-param>
 




More information about the jboss-svn-commits mailing list