Author: wesleyhales
Date: 2010-01-13 17:19:50 -0500 (Wed, 13 Jan 2010)
New Revision: 1267
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl
Log:
Revert recent changes and fixed bugs from previous checked in code.
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2010-01-13
19:27:29 UTC (rev 1266)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2010-01-13
22:19:50 UTC (rev 1267)
@@ -25,10 +25,8 @@
import org.exoplatform.portal.webui.util.Util;
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.UIGrid;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -42,23 +40,19 @@
* @author Wesley Hales
* @author Chris Laprun
*/
-@ComponentConfigs({
- @ComponentConfig(id = "RegistrationPropertySelector", type = UIGrid.class,
template = "system:/groovy/webui/core/UIGrid.gtmpl"),
- @ComponentConfig(
- lifecycle = UIFormLifecycle.class,
- template =
"app:/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl",
- events = {
- @EventConfig(listeners = UIWsrpProducerEditor.SaveActionListener.class)
- }
- )
-})
+@ComponentConfig(
+ lifecycle = UIFormLifecycle.class,
+ template = "app:/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl",
+ events = {
+ @EventConfig(listeners = UIWsrpProducerEditor.SaveActionListener.class)
+ }
+)
public class UIWsrpProducerEditor extends UIForm
{
private static final String REG_REQUIRED_FOR_DESCRIPTION =
"registrationrequiredforfulldescription";
private static final String STRICT_MODE = "strictmode";
private static final String REQUIRES_REGISTRATION = "requiresregistration";
private static final String REGISTRATION_DETAILS = "registrationdetails";
- static final String REGISTRATION_PROPERTIES =
"RegistrationPropertySelector";
private ProducerConfigurationService configService;
private UIWsrpRegistrationDetails registrationDetails;
@@ -66,15 +60,6 @@
private UIFormCheckBoxInput strictMode;
private UIFormCheckBoxInput<Boolean> regRequired;
- private UIGrid registrationProperties;
-
- public UIGrid getRegistrationProperties() throws Exception
- {
- return createUIComponent(UIGrid.class, REGISTRATION_PROPERTIES,
REGISTRATION_PROPERTIES);
- }
-
-
-
public UIWsrpProducerEditor() throws Exception
{
configService =
Util.getUIPortalApplication().getApplicationComponent(ProducerConfigurationService.class);
@@ -94,8 +79,7 @@
// registration details
// form set to gather registration information
- registrationDetails = new UIWsrpRegistrationDetails(REGISTRATION_DETAILS, this);
- addUIFormInput(registrationDetails);
+ registrationDetails = addChild(UIWsrpRegistrationDetails.class,null,null);
init();
}
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java 2010-01-13
19:27:29 UTC (rev 1266)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java 2010-01-13
22:19:50 UTC (rev 1267)
@@ -42,7 +42,8 @@
/** @author Wesley Hales */
-@ComponentConfig(template =
"app:/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl", lifecycle
= UIFormLifecycle.class, events = {
+@ComponentConfig(template =
"app:/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl", lifecycle
= UIFormLifecycle.class,
+ events = {
@EventConfig(listeners = UIWsrpProducerPropertyEditor.SaveActionListener.class)})
public class UIWsrpProducerPropertyEditor extends UIForm
{
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-13
19:27:29 UTC (rev 1266)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java 2010-01-13
22:19:50 UTC (rev 1267)
@@ -25,6 +25,7 @@
import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.commons.utils.ListAccess;
+import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -35,6 +36,7 @@
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.UIFormLifecycle;
import org.exoplatform.webui.core.renderers.ValueRenderer;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -63,31 +65,31 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-
-@ComponentConfig(
- lifecycle = UIApplicationLifecycle.class,
- events = {
- @EventConfig(listeners =
UIWsrpRegistrationDetails.AddPropertyActionListener.class),
- @EventConfig(listeners =
UIWsrpRegistrationDetails.EditPropertyActionListener.class),
- @EventConfig(listeners =
UIWsrpRegistrationDetails.DeletePropertyActionListener.class)
- })
-
-public class UIWsrpRegistrationDetails extends UIFormInputSet
+@ComponentConfigs({
+ @ComponentConfig(id = "RegistrationPropertySelector", type = UIGrid.class,
template = "system:/groovy/webui/core/UIGrid.gtmpl"),
+ @ComponentConfig(
+ lifecycle = UIFormLifecycle.class,
+ events = {
+ @EventConfig(listeners =
UIWsrpRegistrationDetails.AddPropertyActionListener.class),
+ @EventConfig(listeners =
UIWsrpRegistrationDetails.EditPropertyActionListener.class),
+ @EventConfig(listeners =
UIWsrpRegistrationDetails.DeletePropertyActionListener.class)
+ })
+})
+public class UIWsrpRegistrationDetails extends UIForm
{
private UIFormInputBase<String> policy;
private UIFormInputBase<String> validator;
private UIGrid registrationProperties;
- static String[] FIELDS = {"key","name", "description",
"label", "hint"};
- static String[] SELECT_ACTIONS = {"AddProperty", "EditProperty",
"DeleteProperty"};
+ static String[] FIELDS = {"key", "name", "description",
"label", "hint"};
+ static String[] SELECT_ACTIONS = {"EditProperty",
"DeleteProperty"};
static final String POLICY_CLASS = "policyClassName";
static final String VALIDATOR_CLASS = "validatorClassName";
static final String REGISTRATION_PROPERTIES =
"RegistrationPropertySelector";
static final String REGISTRATION_PROPERTIES_ITERATOR =
"ProducerPropPageIterator";
-
- public UIWsrpRegistrationDetails(String name, UIWsrpProducerEditor parent) throws
Exception
+ public UIWsrpRegistrationDetails() throws Exception
{
- super(name);
+ //super(name);
// policy
policy = new UIFormStringInput(POLICY_CLASS, POLICY_CLASS, null);
@@ -96,11 +98,9 @@
// validator
validator = new UIFormStringInput(VALIDATOR_CLASS, VALIDATOR_CLASS, null);
addUIFormInput(validator);
- addChild(parent.getRegistrationProperties());
- registrationProperties = getChildById(REGISTRATION_PROPERTIES);
+
// registration properties
- //registrationProperties.setComponentConfig(UIGrid.class,REGISTRATION_PROPERTIES);
- //registrationProperties = createUIComponent(UIGrid.class, null, null);
+ registrationProperties = addChild(UIGrid.class, REGISTRATION_PROPERTIES,
REGISTRATION_PROPERTIES);
// add renderer for LocalizedString
ValueRenderer<LocalizedString> renderer = new
ValueRenderer<LocalizedString>()
@@ -119,7 +119,7 @@
registrationProperties.getUIPageIterator().setRendered(false);
addChild(registrationProperties.getUIPageIterator());
- init(parent.getService().getConfiguration().getRegistrationRequirements());
+ init(getService().getConfiguration().getRegistrationRequirements());
//add the popup for property edit and adding new properties
UIPopupWindow popup = addChild(UIPopupWindow.class, null, null);
@@ -152,6 +152,11 @@
registrationProperties.getUIPageIterator().setPageList(createPageList(getPropertyList(regProps)));
}
+ ProducerConfigurationService getService()
+ {
+ return
Util.getUIPortalApplication().getApplicationComponent(ProducerConfigurationService.class);
+ }
+
private List<RegistrationPropertyDescription> getPropertyList(Map<QName,
RegistrationPropertyDescription> descriptions) throws Exception
{
Comparator<RegistrationPropertyDescription> descComparator = new
Comparator<RegistrationPropertyDescription>()
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl 2010-01-13
19:27:29 UTC (rev 1266)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl 2010-01-13
22:19:50 UTC (rev 1267)
@@ -1,5 +1,6 @@
<%
import org.exoplatform.wsrp.webui.component.UIWsrpProducerEditor;
+ import org.exoplatform.wsrp.webui.component.UIWsrpRegistrationDetails;
%>
<div class="<%=uicomponent.getId()%>"
id="<%=uicomponent.getId()%>">
@@ -12,11 +13,11 @@
<table class="ActionContainer">
<tr>
<td>
- <div
onclick="<%=uicomponent.event("AddProperty")%>"
class="ActionButton LightBlueStyle">
+ <div
onclick="<%=uicomponent.getChild(UIWsrpProducerEditor.class).getChild(UIWsrpRegistrationDetails.class).event("Add")%>"
class="ActionButton LightBlueStyle">
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <a
href="javascript:void(0);"><%=_ctx.appRes(uicomponent.getId() +
".action.AddProperty")%></a>
+ <a
href="javascript:void(0);"><%=_ctx.appRes(uicomponent.getChild(UIWsrpProducerEditor.class).getChild(UIWsrpRegistrationDetails.class).getId()
+ ".action.Add")%></a>
</div>
</div>
</div>