Author: chris.laprun(a)jboss.com
Date: 2011-10-25 12:37:44 -0400 (Tue, 25 Oct 2011)
New Revision: 7874
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
Log:
- JBEPP-1273, GTNWSRP-254: Use the proper set of registration properties when saving the
configuration.
- JBEPP-1298: Now properly submit form when the registration required for full description
and strict mode checkboxes are clicked.
- Added ProducerBean.isRegistrationPropertiesEmpty method to avoid retrieving the
registration properties when not needed.
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2011-10-25
15:07:11 UTC (rev 7873)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2011-10-25
16:37:44 UTC (rev 7874)
@@ -40,6 +40,7 @@
import javax.faces.model.SelectItem;
import javax.xml.namespace.QName;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -149,9 +150,16 @@
public List<RegistrationPropertyDescription> getRegistrationProperties()
{
- return getLocalConfiguration().getRegistrationProperties();
+ ArrayList<RegistrationPropertyDescription> propertyDescriptions = new
ArrayList<RegistrationPropertyDescription>(getLocalConfiguration().getRegistrationProperties().values());
+ Collections.sort(propertyDescriptions);
+ return propertyDescriptions;
}
+ public boolean isRegistrationPropertiesEmpty()
+ {
+ return getLocalConfiguration().getRegistrationProperties().isEmpty();
+ }
+
public List<SelectItem> getSupportedPropertyTypes()
{
return Collections.singletonList(new SelectItem("xsd:string"));
@@ -177,7 +185,7 @@
registrationRequirements.reloadPolicyFrom(policyClassName, validatorClassName);
-
registrationRequirements.setRegistrationProperties(localConfiguration.getRegistrationRequirements().getRegistrationProperties());
+
registrationRequirements.setRegistrationProperties(localConfiguration.getRegistrationProperties());
currentlyPersistedConfiguration.setUsingStrictMode(localConfiguration.isUsingStrictMode());
@@ -349,9 +357,9 @@
return registrationRequirements.getPolicy();
}
- public List<RegistrationPropertyDescription> getRegistrationProperties()
+ public Map<QName, RegistrationPropertyDescription>
getRegistrationProperties()
{
- return registrationProperties;
+ return registrationRequirements.getRegistrationProperties();
}
public void addEmptyRegistrationProperty(String propertyName)
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2011-10-25
15:07:11 UTC (rev 7873)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2011-10-25
16:37:44 UTC (rev 7874)
@@ -42,11 +42,11 @@
<h:panelGrid columns="2" width="100%">
<h:selectBooleanCheckbox id="cons-reg-req-check"
value="#{producer.registrationRequiredForFullDescription}"
- immediate="true"
+ immediate="true"
onclick="this.form.submit()"
valueChangeListener="#{producer.requireRegistrationForFullDescListener}"/>
<h:outputText
value="#{i18n.producer_config_sd_requires_reg}"/>
<h:selectBooleanCheckbox id="strict-mode-check"
value="#{producer.strictMode}"
- immediate="true"
+ immediate="true"
onclick="this.form.submit()"
valueChangeListener="#{producer.strictModeListener}"/>
<h:outputText value="#{i18n.producer_config_strict}"/>
@@ -104,7 +104,7 @@
</webui:blueHeaderBar>
- <f:subview rendered="#{!empty
producer.registrationProperties}" id="reg-props">
+ <f:subview
rendered="#{!producer.registrationPropertiesEmpty}"
id="reg-props">
<h:dataTable id="reg-properties"
value="#{producer.registrationProperties}" var="property"
rendered="#{producer.registrationRequired}"
rowClasses="EvenRow,OddRow"
@@ -137,7 +137,7 @@
</h:dataTable>
</f:subview>
- <f:subview rendered="#{empty
producer.registrationProperties}" id="reg-props-none">
+ <f:subview rendered="#{producer.registrationPropertiesEmpty}"
id="reg-props-none">
<h:outputText
value="#{i18n.producer_config_no_reg_props}"/>
</f:subview>
Show replies by date