Author: chris.laprun(a)jboss.com
Date: 2010-01-19 11:32:39 -0500 (Tue, 19 Jan 2010)
New Revision: 1379
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
Log:
- Renamed OpenPopup action to CreateConsumer action as it is more appropriate.
- More clean-ups.
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2010-01-19
15:54:47 UTC (rev 1378)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2010-01-19
16:32:39 UTC (rev 1379)
@@ -27,7 +27,6 @@
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIContainer;
@@ -44,24 +43,19 @@
import java.util.List;
/** @author Wesley Hales */
-@ComponentConfigs({
- @ComponentConfig(id = "ConsumerSelector", type = UIGrid.class, template =
"system:/groovy/webui/core/UIGrid.gtmpl",
- events = { //make note in doc not to put grid listeners here
- }),
- @ComponentConfig(
- lifecycle = UIApplicationLifecycle.class,
- template =
"app:/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl",
- events = {
- @EventConfig(listeners = UIWsrpConsumerOverview.OpenPopupActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.EditActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.DeleteActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.RefreshActionListener.class),
- @EventConfig(listeners =
UIWsrpConsumerOverview.DeactivateActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.ActivateActionListener.class),
- @EventConfig(listeners =
UIWsrpConsumerOverview.RefreshGridActionListener.class)
- })
-})
+@ComponentConfig(
+ lifecycle = UIApplicationLifecycle.class,
+ template = "app:/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl",
+ events = {
+ @EventConfig(listeners =
UIWsrpConsumerOverview.CreateConsumerActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.EditActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.DeleteActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.RefreshActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.DeactivateActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.ActivateActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.RefreshGridActionListener.class)
+ })
public class UIWsrpConsumerOverview extends UIContainer
{
public static String[] FIELDS = {"producerId", "active",
"refreshNeeded"};
@@ -135,7 +129,7 @@
consumerEditorPopup.setUIComponent(consumerForm);
consumerEditorPopup.setRendered(false);
- UIGrid consumers = addChild(UIGrid.class, "ConsumerSelector", null);
+ UIGrid consumers = addChild(UIGrid.class, null, null);
//configure the edit and delete buttons based on an id from the data list - this
will also be passed as param to listener
consumers.configure("producerId", FIELDS, SELECT_ACTIONS);
@@ -169,7 +163,7 @@
consumersIterator.setPageList(pageList);
}
- static public class OpenPopupActionListener extends
EventListener<UIWsrpConsumerOverview>
+ static public class CreateConsumerActionListener extends
EventListener<UIWsrpConsumerOverview>
{
public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
{
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2010-01-19
15:54:47 UTC (rev 1378)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2010-01-19
16:32:39 UTC (rev 1379)
@@ -1,10 +1,33 @@
-<div class="<%=uicomponent.getId()%>"
id="<%=uicomponent.getId()%>">
+<div class="%{--
+ - JBoss, a division of Red Hat
+ - Copyright 2010, Red Hat Middleware, LLC, and individual
+ - contributors as indicated by the @authors tag. See the
+ - copyright.txt in the distribution for a full listing of
+ - individual contributors.
+ -
+ - This is free software; you can redistribute it and/or modify it
+ - under the terms of the GNU Lesser General Public License as
+ - published by the Free Software Foundation; either version 2.1 of
+ - the License, or (at your option) any later version.
+ -
+ - This software is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ - Lesser General Public License for more details.
+ -
+ - You should have received a copy of the GNU Lesser General Public
+ - License along with this software; if not, write to the Free
+ - Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ - 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ --}%
+<%=uicomponent.getId()%>" id="<%=uicomponent.getId()%>">
+
<div class="UIAction">
<table class="ActionContainer">
<tr>
<td>
- <div onclick="<%=uicomponent.event("OpenPopup",
"")%>" class="ActionButton LightBlueStyle">
+ <div onclick="<%=uicomponent.event("CreateConsumer",
"")%>" class="ActionButton LightBlueStyle">
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">