Author: chris.laprun(a)jboss.com
Date: 2007-06-13 19:39:22 -0400 (Wed, 13 Jun 2007)
New Revision: 7414
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
Log:
- Validating registration should now be properly displayed when needed.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-06-13
23:37:31 UTC (rev 7413)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-06-13
23:39:22 UTC (rev 7414)
@@ -28,6 +28,7 @@
import org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo;
import org.jboss.portal.wsrp.consumer.ProducerInfo;
import org.jboss.portal.wsrp.consumer.RefreshResult;
+import org.jboss.portal.wsrp.consumer.RegistrationInfo;
import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
@@ -63,6 +64,11 @@
this.manager = manager;
}
+ public boolean isModified()
+ {
+ return modified;
+ }
+
public boolean isUseWSDL()
{
if (useWSDL != null)
@@ -193,6 +199,20 @@
return getProducerInfo().isRegistrationRequired();
}
+ public boolean isRegistrationCheckNeeded()
+ {
+ RegistrationInfo regInfo = getProducerInfo().getRegistrationInfo();
+ if (regInfo == null)
+ {
+ return true;
+ }
+ else
+ {
+ Boolean consistent = regInfo.isConsistentWithProducerExpectations();
+ return consistent == null || !consistent.booleanValue();
+ }
+ }
+
public boolean isRegistrationChecked()
{
return getProducerInfo().isRegistrationChecked();
@@ -252,6 +272,20 @@
return null;
}
+ public String refreshConsumer()
+ {
+ if (modified)
+ {
+ String updateResult = update();
+ if (updateResult == null)
+ {
+ return null;
+ }
+ }
+
+ return manager.refreshConsumer();
+ }
+
public String refreshRegistrationInfo()
{
if (consumer != null)
Modified:
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
===================================================================
---
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-06-13
23:37:31 UTC (rev 7413)
+++
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-06-13
23:39:22 UTC (rev 7414)
@@ -119,7 +119,7 @@
</tr>
</c:if>
<c:choose>
- <c:when test="#{!consumer.registrationChecked}">
+ <c:when test="#{consumer.registrationCheckNeeded}">
<tr>
<td colspan="2">
<p class="info">Registration information hasn't been
validated with the Producer. You should validate
@@ -149,8 +149,11 @@
</c:if>
<tr>
<td colspan="2" style="padding: 1em 1em 1em 0;">
- <h:commandButton action="#{consumer.update}" value="Save"
styleClass="portlet-form-button"/>
- <h:commandLink action="#{consumersMgr.refreshConsumer}"
value="Refresh" title="Refresh information from Producer"
+ <h:commandButton action="#{consumer.update}" value="Save"
disabled="#{!consumer.modified}"
+ styleClass="portlet-form-button">
+ <f:param name="id" value="#{consumer.id}"/>
+ </h:commandButton>
+ <h:commandLink action="#{consumer.refreshConsumer}"
value="Refresh" title="Refresh information from Producer"
styleClass="portlet-form-button">
<f:param name="id" value="#{consumer.id}"/>
</h:commandLink>
Show replies by date