Author: chris.laprun(a)jboss.com
Date: 2010-01-14 12:44:18 -0500 (Thu, 14 Jan 2010)
New Revision: 1300
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java
portal/trunk/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css
Log:
- Reverted back some changes that didn't bring anything.
- Renamed actions array to PROPERTIES_ACTIONS.
- Fixed display of delete property action.
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java 2010-01-14
17:30:00 UTC (rev 1299)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java 2010-01-14
17:44:18 UTC (rev 1300)
@@ -35,9 +35,7 @@
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIGrid;
import org.exoplatform.webui.core.UIPopupWindow;
-import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
-import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.core.renderers.ValueRenderer;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -69,11 +67,11 @@
@ComponentConfigs({
@ComponentConfig(id = UIWsrpRegistrationDetails.REGISTRATION_PROPERTIES, type =
UIGrid.class, template = "system:/groovy/webui/core/UIGrid.gtmpl"),
@ComponentConfig(
- lifecycle = UIApplicationLifecycle.class,
+ lifecycle = UIContainerLifecycle.class,
events = {
@EventConfig(listeners =
UIWsrpRegistrationDetails.AddPropertyActionListener.class),
@EventConfig(listeners =
UIWsrpRegistrationDetails.EditPropertyActionListener.class),
- @EventConfig(listeners = UIWsrpRegistrationDetails.DeleteActionListener.class)
+ @EventConfig(listeners =
UIWsrpRegistrationDetails.DeletePropertyActionListener.class)
})
})
public class UIWsrpRegistrationDetails extends UIFormInputSet
@@ -83,7 +81,7 @@
private UIGrid registrationProperties;
private static final String NAME = "name";
static String[] FIELDS = {NAME, "description", "label",
"hint"};
- static String[] SELECT_ACTIONS = {"EditProperty", "Delete"};
+ static String[] PROPERTIES_ACTIONS = {"EditProperty",
"DeleteProperty"};
static final String POLICY_CLASS = "policyClassName";
static final String VALIDATOR_CLASS = "validatorClassName";
static final String REGISTRATION_PROPERTIES =
"RegistrationPropertySelector";
@@ -116,7 +114,7 @@
registrationProperties.registerRendererFor(renderer, LocalizedString.class);
//configure the edit and delete buttons based on an id from the data list - this
will also be passed as param to listener
- registrationProperties.configure(NAME, FIELDS, SELECT_ACTIONS);
+ registrationProperties.configure(NAME, FIELDS, PROPERTIES_ACTIONS);
registrationProperties.getUIPageIterator().setId(REGISTRATION_PROPERTIES_ITERATOR);
registrationProperties.getUIPageIterator().setRendered(false);
addChild(registrationProperties.getUIPageIterator());
@@ -285,13 +283,11 @@
}
}
- static public class DeleteActionListener extends
EventListener<UIWsrpRegistrationDetails>
+ static public class DeletePropertyActionListener extends
EventListener<UIWsrpRegistrationDetails>
{
public void execute(Event<UIWsrpRegistrationDetails> event)
{
UIWsrpRegistrationDetails source = event.getSource();
- UIApplication uiApp = event.getRequestContext().getUIApplication();
- UIPopupWindow popup = source.getChild(UIPopupWindow.class);
String id = event.getRequestContext().getRequestParameter(OBJECTID);
try
{
@@ -302,6 +298,7 @@
catch (Exception e)
{
e.printStackTrace();
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
uiApp.addMessage(new ApplicationMessage("Failed to delete Producer
Property. Cause: " + e.getCause(), null, ApplicationMessage.ERROR));
}
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css 2010-01-14
17:30:00 UTC (rev 1299)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css 2010-01-14
17:44:18 UTC (rev 1300)
@@ -1,16 +1,20 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
+/*
+ * 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
@@ -48,7 +52,7 @@
img.DeletePropertyIcon {
width: 16px;
height: 16px;
- background:
url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/DustBinIcon.gif')
no-repeat;
+ background:
url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/DustBin.gif')
no-repeat;
}
.UIWsrpPortlet .UITabPane {