portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r889958 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/ jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/
Date Sat, 12 Dec 2009 19:01:06 GMT
Author: taylor
Date: Sat Dec 12 19:01:05 2009
New Revision: 889958

URL: http://svn.apache.org/viewvc?rev=889958&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1084
render detached portlets from template, in this case, the Spaces Navigator

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp?rev=889958&r1=889957&r2=889958&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
Sat Dec 12 19:01:05 2009
@@ -95,7 +95,6 @@
 <div id="layout-<%=pageDec%>" class="layout-<%=pageDec%>" >
 <div class="header">
 <h1 class="logo">Jetspeed 2</h1>
-<span id="environments-menu" class="layout-horizontal-menu yui-menu yui-menu-horizontal
yui-menubuttonnav"><%=spacesNavContent%></span>
 <div class="menu">
 &nbsp;<span style='position: absolute; left: 0px; top: 50px;' id='jstbLeftToggle'
class='jstbToggle1'></span><span id='jstbRightToggle' class='jstbToggle2' style='position:
absolute; right: 0px; top: 50px;'></span>
 </div>
@@ -206,6 +205,18 @@
 </div> <!-- end layout -->
 </div>
 </body>
+<%
+for (ContentFragment fragment : columnLayout.getDetachedPortlets())
+{
+	String x = fragment.getProperty("x");
+	String y = fragment.getProperty("y");
+    String content = jetui.getRenderedContent((ContentFragment)fragment, rc);
+%>
+   <div id='<%=fragment.getId()%>' detached='true' locked='<%=fragment.isLocked()%>'
name='<%=fragment.getName()%>' column='0' row='0' style='position: absolute; top: <%=x%>px;
left: <%=y%>px;'>
+<%=content%>
+   </div>			    
+<% } %>
+
 <script src="<%=request.getContextPath()%>/jetui/engine/portal.js"></script>
  
 </html>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java?rev=889958&r1=889957&r2=889958&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
Sat Dec 12 19:01:05 2009
@@ -102,6 +102,7 @@
                 String [] fragmentColumnSizesArray = fragmentColumnSizes.split("\\,");
                 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                 ColumnLayout columnLayout = new ColumnLayout(numberOfColumns, layoutType,
rootFragment.getFragments(), fragmentColumnSizesArray);
+                columnLayout.buildDetachedPortletList(request.getPage().getRootFragment().getFragments());
                 request.setAttribute("columnLayout", columnLayout);
             }
             else

Modified: portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java?rev=889958&r1=889957&r2=889958&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
Sat Dec 12 19:01:05 2009
@@ -836,4 +836,27 @@
         return this.detachedPortlets;
     }
 
+    public void buildDetachedPortletList(Collection<ContentFragment> fragments)
+    {
+        Iterator<ContentFragment> fragmentsItr = fragments.iterator();
+        while (fragmentsItr.hasNext())
+        {
+            ContentFragment fragment = (ContentFragment) fragmentsItr.next();
+            String jsdesktop = fragment.getProperty(NameValueProperty.NAME_VALUE_PROPERTY);
+            if (jsdesktop != null)
+            {
+                NameValueProperty nvp = new NameValueProperty(jsdesktop);
+                if (nvp.isDetached())
+                {
+                    detachedPortlets.add(fragment);
+                    continue;
+                }
+                else if (nvp.isDecoratorRendered())
+                {
+                    continue;
+                }
+            }
+        }
+    }
+    
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message