Author: wesleyhales
Date: 2009-12-21 14:58:20 -0500 (Mon, 21 Dec 2009)
New Revision: 1111
Added:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl
Log:
Producer UI base functionality
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2009-12-21
19:47:05 UTC (rev 1110)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2009-12-21
19:58:20 UTC (rev 1111)
@@ -40,11 +40,13 @@
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.validator.MandatoryValidator;
import org.gatein.registration.RegistrationPersistenceManager;
+import org.gatein.registration.policies.DefaultRegistrationPolicy;
import org.gatein.wsrp.consumer.ConsumerException;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
import org.gatein.wsrp.producer.config.ProducerConfiguration;
import org.gatein.wsrp.producer.config.ProducerConfigurationService;
+import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
/** @author Wesley Hales */
@ComponentConfig(template =
"app:/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl", lifecycle =
UIFormLifecycle.class, events = {
@@ -55,12 +57,16 @@
protected static final String REG_REQUIRED_FOR_DESCRIPTION =
"registrationrequiredforfulldescription";
protected static final String STRICT_MODE = "strictmode";
protected static final String REQUIRES_REGISTRATION =
"requiresregistration";
+ protected static final String POLICY_CLASS = "policyClassName";
+ protected static final String VALIDATOR_CLASS = "validatorClassName";
public UIWsrpProducerEditor() throws Exception
{
addUIFormInput(new UIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION,
REG_REQUIRED_FOR_DESCRIPTION, null));
addUIFormInput(new UIFormCheckBoxInput(STRICT_MODE, STRICT_MODE, null));
addUIFormInput(new UIFormCheckBoxInput(REQUIRES_REGISTRATION,
REQUIRES_REGISTRATION, null));
+ addUIFormInput(new UIFormStringInput(POLICY_CLASS, POLICY_CLASS,
null).addValidator(MandatoryValidator.class));
+ addUIFormInput(new UIFormStringInput(VALIDATOR_CLASS, VALIDATOR_CLASS,
null).addValidator(MandatoryValidator.class));
}
public void setProducerConfig(ProducerConfiguration producerConfiguration) throws
Exception {
@@ -68,6 +74,14 @@
getUIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION).setValue(producerConfiguration.getRegistrationRequirements().isRegistrationRequiredForFullDescription());
getUIFormCheckBoxInput(STRICT_MODE).setValue(producerConfiguration.isUsingStrictMode());
getUIFormCheckBoxInput(REQUIRES_REGISTRATION).setValue(producerConfiguration.getRegistrationRequirements().isRegistrationRequired());
+
+
getUIStringInput(POLICY_CLASS).setValue(producerConfiguration.getRegistrationRequirements().getPolicy().getClass().getName());
+
+ if
(ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.equals(producerConfiguration.getRegistrationRequirements().getPolicy().getClass().getName())){
+
getUIStringInput(VALIDATOR_CLASS).setValue(((DefaultRegistrationPolicy)producerConfiguration.getRegistrationRequirements().getPolicy()).getClass().getName());
+ }
+
+
//producerInfo.setRegistrationInfo();
}
@@ -91,23 +105,27 @@
{
//ConsumerRegistry consumerRegistry = getConsumerRegistry();
//ProducerInfo producerInfo =
consumerRegistry.getProducerInfoByKey("").getRegistrationInfo().
+ UIApplication uiApp = context.getUIApplication();
+
ProducerConfigurationService pconfService = getProducerConfigurationService();
ProducerConfiguration producerConfiguration = pconfService.getConfiguration();
+ try{
+
producerConfiguration.getRegistrationRequirements().setRegistrationRequiredForFullDescription(Boolean.parseBoolean(getUIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION).getValue().toString()));
+
producerConfiguration.setUsingStrictMode(Boolean.parseBoolean(getUIFormCheckBoxInput(STRICT_MODE).getValue().toString()));
-
producerConfiguration.getRegistrationRequirements().setRegistrationRequiredForFullDescription(Boolean.parseBoolean(getUIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION).getValue().toString()));
-
producerConfiguration.setUsingStrictMode(Boolean.parseBoolean(getUIFormCheckBoxInput(STRICT_MODE).getValue().toString()));
-
producerConfiguration.getRegistrationRequirements().setRegistrationRequired(Boolean.parseBoolean(getUIFormCheckBoxInput(REQUIRES_REGISTRATION).getValue().toString()));
+
producerConfiguration.getRegistrationRequirements().setRegistrationRequired(Boolean.parseBoolean(getUIFormCheckBoxInput(REQUIRES_REGISTRATION).getValue().toString()));
+ System.out.println("------------" +
getUIStringInput(POLICY_CLASS).getValue());
+ System.out.println("------------" +
getUIStringInput(VALIDATOR_CLASS).getValue());
+ System.out.println("------------" +
getUIStringInput(POLICY_CLASS).getValue().toString());
+
producerConfiguration.getRegistrationRequirements().reloadPolicyFrom(getUIStringInput(POLICY_CLASS).getValue().toString(),
getUIStringInput(VALIDATOR_CLASS).getValue().toString());
- UIApplication uiApp = context.getUIApplication();
+ pconfService.saveConfiguration();
+ uiApp.addMessage(new ApplicationMessage("Producer Successfully
Changed", null));
+ }catch(Exception e){
+ uiApp.addMessage(new ApplicationMessage("Producer Modification
Error", null, ApplicationMessage.ERROR));
- try{
- pconfService.saveConfiguration();
- uiApp.addMessage(new ApplicationMessage("Producer Successfully
Changed", null));
- }catch(Exception e){
- uiApp.addMessage(new ApplicationMessage("Producer Modification Error",
null));
+ }
- }
-
return true;
}
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java 2009-12-21
19:47:05 UTC (rev 1110)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java 2009-12-21
19:58:20 UTC (rev 1111)
@@ -22,50 +22,200 @@
******************************************************************************/
package org.exoplatform.wsrp.webui.component;
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.container.ExoContainer;
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;
import org.exoplatform.webui.core.UIGrid;
import org.exoplatform.webui.core.UIPopupWindow;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
+import org.exoplatform.webui.core.model.SelectItem;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
import org.gatein.wsrp.producer.config.ProducerConfiguration;
import org.gatein.wsrp.producer.config.ProducerConfigurationService;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
/** @author Wesley Hales */
@ComponentConfigs({
- @ComponentConfig(id = "RegPropertyGrid", type = UIGrid.class, template =
"system:/groovy/webui/core/UIGrid.gtmpl"),
+ @ComponentConfig(id = "RegistrationPropertySelector", type = UIGrid.class,
template = "system:/groovy/webui/core/UIGrid.gtmpl"),
@ComponentConfig(
lifecycle = UIApplicationLifecycle.class,
template =
"app:/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl",
events = {
- @EventConfig(listeners = UIWsrpProducerOverview.OpenPopupActionListener.class)
+ @EventConfig(listeners =
UIWsrpProducerOverview.AddPropertyActionListener.class),
+ @EventConfig(listeners =
UIWsrpProducerOverview.EditPropertyActionListener.class),
+ @EventConfig(listeners =
UIWsrpProducerOverview.DeletePropertyActionListener.class)
}
)})
public class UIWsrpProducerOverview extends UIContainer
{
+
+ public static String[] FIELDS = {"name","description",
"label", "hint"};
+
+ public static String[] SELECT_ACTIONS = {"EditProperty",
"DeleteProperty"};
+
public UIWsrpProducerOverview() throws Exception
{
ProducerConfiguration producerConfiguration =
getProducerConfigurationService().getConfiguration();
UIWsrpProducerEditor producerForm = createUIComponent(UIWsrpProducerEditor.class,
null, null);
producerForm.setProducerConfig(producerConfiguration);
addChild(producerForm);
+
+ UIGrid uiGrid = addChild(UIGrid.class, "RegistrationPropertySelector",
null);
+ //configure the edit and delete buttons based on an id from the data list - this
will also be passed as param to listener
+ uiGrid.configure("name", FIELDS, SELECT_ACTIONS);
+
+ //add the propery grid
+ uiGrid.getUIPageIterator().setId("ProducerPropPageIterator");
+ addChild(uiGrid.getUIPageIterator());
+ uiGrid.getUIPageIterator().setRendered(false);
+ LazyPageList propertyList = createPageList(getPropertyList());
+ uiGrid.getUIPageIterator().setPageList(propertyList);
+
+ //add the popup for property edit and adding new properties
+ UIPopupWindow popup = addChild(UIPopupWindow.class, null, null);
+ popup.setWindowSize(400, 300);
+ UIWsrpProducerPropertyEditor propertyForm =
createUIComponent(UIWsrpProducerPropertyEditor.class, null, null);
+ popup.setUIComponent(propertyForm);
+ popup.setRendered(false);
}
- static public class OpenPopupActionListener extends
EventListener<UIWsrpProducerOverview>
+ public List<RegistrationPropertyDescription> getPropertyList() throws Exception
{
+ ProducerConfiguration producerConfiguration =
getProducerConfigurationService().getConfiguration();
+ Map descriptions =
producerConfiguration.getRegistrationRequirements().getRegistrationProperties();
+ Comparator<RegistrationPropertyDescription> descComparator = new
Comparator<RegistrationPropertyDescription>(){
+ public int compare(RegistrationPropertyDescription o1,
RegistrationPropertyDescription o2)
+ {
+ return o1.getName().toString().compareTo(o2.getName().toString());
+ }
+ };
+
+ List<RegistrationPropertyDescription> result = new
ArrayList<RegistrationPropertyDescription>(descriptions.values());
+ Collections.sort(result, descComparator);
+ return result;
+ }
+
+ public List<String> getSupportedPropertyTypes()
+ {
+ return Collections.singletonList(("xsd:string"));
+ }
+
+ public LazyPageList createPageList(final List pageList)
+ {
+ return new LazyPageList<WSRPConsumer>(new ListAccess<WSRPConsumer>()
+ {
+
+ public int getSize() throws Exception
+ {
+ return pageList.size();
+ }
+
+ public WSRPConsumer[] load(int index, int length) throws Exception,
IllegalArgumentException
+ {
+ WSRPConsumer[] pcs = new WSRPConsumer[pageList.size()];
+
+ if (index < 0)
+ {
+ throw new IllegalArgumentException("Illegal index: index must be a
positive number");
+ }
+
+ if (length < 0)
+ {
+ throw new IllegalArgumentException("Illegal length: length must be a
positive number");
+ }
+
+ if (index + length > pageList.size())
+ {
+ throw new IllegalArgumentException(
+ "Illegal index or length: sum of the index and the length cannot
be greater than the list size");
+ }
+
+ for (int i = 0; i < length; i++)
+ {
+ pcs[i] = (WSRPConsumer)pageList.get(i + index);
+ }
+
+ return pcs;
+ }
+
+ }, 10);
+ }
+
+ static public class EditPropertyActionListener extends
EventListener<UIWsrpProducerOverview>
+ {
public void execute(Event<UIWsrpProducerOverview> event) throws Exception
{
+ UIWsrpProducerOverview producerOverview = event.getSource();
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+ UIPopupWindow popup = producerOverview.getChild(UIPopupWindow.class);
+ UIWsrpProducerPropertyEditor editor =
(UIWsrpProducerPropertyEditor)popup.getUIComponent();
+ String id = event.getRequestContext().getRequestParameter(OBJECTID);
+ System.out.println("--------edit name " + id);
+ try
+ {
+
editor.setRegistrationPropertyDescription(producerOverview.getProducerConfigurationService().getConfiguration().getRegistrationRequirements().getRegistrationPropertyWith(id));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ popup.setUIComponent(editor);
+ popup.setRendered(true);
+ popup.setShow(true);
+
+ }
+ }
+
+ static public class DeletePropertyActionListener extends
EventListener<UIWsrpProducerOverview>
+ {
+ public void execute(Event<UIWsrpProducerOverview> event)
+ {
+ UIWsrpProducerOverview producerOverview = event.getSource();
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+ UIPopupWindow popup = producerOverview.getChild(UIPopupWindow.class);
+ UIWsrpProducerPropertyEditor editor =
(UIWsrpProducerPropertyEditor)popup.getUIComponent();
+ String id = event.getRequestContext().getRequestParameter(OBJECTID);
+ System.out.println("--------delete name " + id);
+ try
+ {
+
producerOverview.getProducerConfigurationService().getConfiguration().getRegistrationRequirements().removeRegistrationProperty(id);
+ producerOverview.getProducerConfigurationService().saveConfiguration();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ uiApp.addMessage(new ApplicationMessage("Failed to delete Producer
Property. Cause: " + e.getCause(), null, ApplicationMessage.ERROR));
+ }
+
+ }
+ }
+
+ static public class AddPropertyActionListener extends
EventListener<UIWsrpProducerOverview>
+ {
+ public void execute(Event<UIWsrpProducerOverview> event) throws Exception
+ {
UIWsrpProducerOverview wsrpProducerOverview = event.getSource();
UIPopupWindow popup = wsrpProducerOverview.getChild(UIPopupWindow.class);
- //UIWsrpProducerEditor editor = (UIWsrpProducerEditor)popup.getUIComponent();
+ UIWsrpProducerPropertyEditor editor =
(UIWsrpProducerPropertyEditor)popup.getUIComponent();
//reset the form
- //editor.setConsumer(null);
+ editor.setRegistrationPropertyDescription(null);
popup.setRendered(true);
popup.setShow(true);
popup.setShowCloseButton(true);
Added:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java
(rev 0)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java 2009-12-21
19:58:20 UTC (rev 1111)
@@ -0,0 +1,141 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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. *
+ ******************************************************************************/
+package org.exoplatform.wsrp.webui.component;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+import org.gatein.wsrp.producer.config.ProducerConfiguration;
+import org.gatein.wsrp.producer.config.ProducerConfigurationService;
+import org.gatein.wsrp.registration.LocalizedString;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+
+
+/** @author Wesley Hales */
+@ComponentConfig(template =
"app:/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl", lifecycle
= UIFormLifecycle.class, events = {
+ @EventConfig(listeners = UIWsrpProducerPropertyEditor.SaveActionListener.class)})
+public class UIWsrpProducerPropertyEditor extends UIForm
+{
+ protected static final String DESCRIPTION = "description";
+ protected static final String LABEL = "label";
+ protected static final String HINT = "hint";
+ private RegistrationPropertyDescription registrationPropertyDescription_;
+
+ public UIWsrpProducerPropertyEditor() throws Exception
+ {
+ addUIFormInput(new UIFormStringInput(DESCRIPTION, DESCRIPTION,
null).addValidator(MandatoryValidator.class));
+ addUIFormInput(new UIFormStringInput(LABEL, LABEL,
null).addValidator(MandatoryValidator.class));
+ addUIFormInput(new UIFormStringInput(HINT, HINT,
null).addValidator(MandatoryValidator.class));
+ }
+
+ public void setRegistrationPropertyDescription(RegistrationPropertyDescription
registrationPropertyDescription) throws Exception {
+
+ this.registrationPropertyDescription_ = registrationPropertyDescription;
+
+ if (registrationPropertyDescription_ == null)
+ {
+ getUIStringInput(DESCRIPTION).setEditable(UIFormStringInput.ENABLE);
+ reset();
+ return;
+ }
+ getUIStringInput(DESCRIPTION).setEditable(UIFormStringInput.ENABLE);
+
+ invokeGetBindingBean(registrationPropertyDescription_);
+
+ }
+
+ public RegistrationPropertyDescription getRegistrationPropertyDescription()
+ {
+ return registrationPropertyDescription_;
+ }
+
+ static public class SaveActionListener extends
EventListener<UIWsrpProducerEditor>
+ {
+ public void execute(Event<UIWsrpProducerEditor> event) throws Exception
+ {
+ UIWsrpProducerEditor producerEditor = event.getSource();
+
+ UIWsrpProducerEditor producerOverview =
producerEditor.getAncestorOfType(UIWsrpProducerEditor.class);
+
+ WebuiRequestContext ctx = event.getRequestContext();
+ producerEditor.save(ctx);
+ //producerEditor.reset();
+
+ }
+ }
+
+ public boolean save(WebuiRequestContext context) throws Exception
+ {
+
+ ProducerConfigurationService pconfService = getProducerConfigurationService();
+ ProducerConfiguration producerConfiguration = pconfService.getConfiguration();
+
+
+
+ RegistrationPropertyDescription regPropDesc =
getRegistrationPropertyDescription();
+ if(regPropDesc != null){
+ System.out.println("---------old1: " + regPropDesc.getDescription());
+ RegistrationPropertyDescription oldRegPropDesc =
producerConfiguration.getRegistrationRequirements().getRegistrationProperties().get(regPropDesc);
+ invokeSetBindingBean(oldRegPropDesc);
+ System.out.println("---------new1: " +
oldRegPropDesc.getNameAsString());
+ //return;
+ }else{
+
+ RegistrationPropertyDescription newRegProcDesc = new
RegistrationPropertyDescription();
+ newRegProcDesc.setDescription(new
LocalizedString(getUIStringInput(DESCRIPTION).getValue()));
+ newRegProcDesc.setDescription(new
LocalizedString(getUIStringInput(LABEL).getValue()));
+ newRegProcDesc.setDescription(new
LocalizedString(getUIStringInput(HINT).getValue()));
+ System.out.println("---------new2: " + newRegProcDesc);
+
producerConfiguration.getRegistrationRequirements().addRegistrationProperty(newRegProcDesc);
+ }
+
+ UIApplication uiApp = context.getUIApplication();
+
+ try{
+ pconfService.saveConfiguration();
+ uiApp.addMessage(new ApplicationMessage("Producer Successfully
Changed", null));
+ }catch(Exception e){
+ uiApp.addMessage(new ApplicationMessage("Producer Modification Error",
null));
+
+ }
+
+ return true;
+ }
+
+ public ProducerConfigurationService getProducerConfigurationService() throws
Exception
+ {
+ ExoContainer manager = ExoContainerContext.getCurrentContainer();
+ return
(ProducerConfigurationService)manager.getComponentInstanceOfType(ProducerConfigurationService.class);
+ }
+}
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl 2009-12-21
19:47:05 UTC (rev 1110)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl 2009-12-21
19:58:20 UTC (rev 1111)
@@ -10,6 +10,9 @@
<div class="SignIn">Access to full service description requires
consumers to be registered. <% uiform.renderChild(0); %></div>
<div class="SignIn">Use strict WSRP compliance. <%
uiform.renderChild(1); %></div>
<div class="SignIn">Requires registration. Modifying this information
will trigger invalidation of consumer registrations. <% uiform.renderChild(2);
%></div>
+
+ <div class="SignIn">Registration policy class name: <%
uiform.renderChild(3); %></div>
+ <div class="SignIn">Registration property validator class name: <%
uiform.renderChild(4); %></div>
<div class="FloatRight">
@@ -17,6 +20,9 @@
<table class="ActionContainer">
<tr>
<td>
+
+ </td>
+ <td>
<div onclick="<%=uicomponent.event("Save")%>"
class="ActionButton LightBlueStyle">
<div class="ButtonLeft">
<div class="ButtonRight">
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl 2009-12-21
19:47:05 UTC (rev 1110)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl 2009-12-21
19:58:20 UTC (rev 1111)
@@ -9,8 +9,6 @@
<div class="<%=uicomponent.getId()%>"
id="<%=uicomponent.getId()%>">
- <a href="<%=uicomponent.event("OpenPopup",
"")%>">Edit Producer</a> |
-
<% uicomponent.renderChildren(); %>
-
+ <a href="<%=uicomponent.event("AddProperty",
"")%>">Add Producer Registration Property</a>
</div>
\ No newline at end of file
Added:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl
(rev 0)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl 2009-12-21
19:58:20 UTC (rev 1111)
@@ -0,0 +1,65 @@
+<div class="UILoginForm" id="ChildTest">
+ <% uiform.begin() %>
+ <%
+
+ %>
+ <div class="SignIn">Add New Registration Property</div>
+ <div class="FloatRight">
+ <div class="FloatLeft">
+ <div class="UserName">
+ <div>
+ <!--label>Consumer Name</label-->
+ <% //uiform.renderChild(0); %>
+ <%
+ for (field in uiform.getChildren())
+ {
+ if (field.isRendered())
+ {
+ %>
+ <div>
+ <% fieldName = uicomponent.getLabel(field.getName()); %>
+ <% if (!fieldName.equals(uicomponent.getId()))
+ { %>
+ <div class="FieldLabel">
+ <% if (fieldName != null && fieldName.length() > 0)
+ { %>
+ <%=uicomponent.getLabel(field.getName())%>
+ <% } %>
+ </div>
+ <div class="FieldComponent"><% uiform.renderField(field)
%></div>
+ <% }
+ else
+ { %>
+ <div class="FieldComponent"><% uiform.renderField(field)
%></div>
+ <% } %>
+ </div>
+ <%
+ }
+ } %>
+ </div>
+
+ </div>
+ <div class="UIAction">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div onclick="<%=uicomponent.event("Save")%>"
class="ActionButton LightBlueStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a
href="javascript:void(0);"><%=_ctx.appRes(uicomponent.getId() +
".action.Save")%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="ClearLeft"><span></span></div>
+ </div>
+ <div class="ClearRight"><span></span></div>
+ <% uiform.end() %>
+</div>
+</div>
\ No newline at end of file