portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1089610 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm: ApplicationsListHome.java PortletDataProvider.java
Date Wed, 06 Apr 2011 20:08:17 GMT
Author: woonsan
Date: Wed Apr  6 20:08:17 2011
New Revision: 1089610

URL: http://svn.apache.org/viewvc?rev=1089610&view=rev
Log:
JS2-1247: Refreshing portlet/clone list view after deleting a clone.
Also, retrieve clones as well as portlets when an application is selected.

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/PortletDataProvider.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java?rev=1089610&r1=1089609&r2=1089610&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
Wed Apr  6 20:08:17 2011
@@ -637,6 +637,16 @@ public class ApplicationsListHome extend
                         
                         if (def != null && def.isClone()) {
                             registry.removeClone(def);
+                            
+                            DataView portletView = (DataView) getPage().get(PORTLET_TABLE);
+                            PortletDataProvider pdp = (PortletDataProvider) portletView.getDataProvider();
+                            
+                            if (pdp.getSearchMode())
+                            {
+                                SearchForm searchForm = (SearchForm) getPage().get("appSearchForm");
+                                pdp.searchPortlets(searchForm.getAppSearchField(), searchForm.isFilterPortlet(),
searchForm.isFilterClone());
+                            }
+                            pdp.refresh();
                         }
                     }
                     catch (Exception e) 
@@ -676,7 +686,7 @@ public class ApplicationsListHome extend
                     ApplicationDataProvider adp = (ApplicationDataProvider) appView.getDataProvider();
                     adp.searchApplications(getAppSearchField());
                     PortletDataProvider pdp = (PortletDataProvider) portletView.getDataProvider();
-                    pdp.searchPortlets(getAppSearchField(), filterPortlet, filterClone);
+                    pdp.searchPortlets(getAppSearchField(), isFilterPortlet(), isFilterClone());
                 }
             });
             

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/PortletDataProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/PortletDataProvider.java?rev=1089610&r1=1089609&r2=1089610&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/PortletDataProvider.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/PortletDataProvider.java
Wed Apr  6 20:08:17 2011
@@ -125,6 +125,10 @@ public class PortletDataProvider extends
                 {
                     portlets.add(new PortletDefinitionBean(def, getAppName(), locale));
                 }
+                for (PortletDefinition def : app.getClones())
+                {
+                    portlets.add(new PortletDefinitionBean(def, getAppName(), locale));
+                }
             }
             sort(portlets, this.orderBy);            
         }



---------------------------------------------------------------------
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