Author: chris.laprun(a)jboss.com
Date: 2007-06-19 15:42:21 -0400 (Tue, 19 Jun 2007)
New Revision: 7479
Modified:
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
Log:
- Implemented access to modifyRegistration.
Modified:
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
---
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-06-19
19:38:37 UTC (rev 7478)
+++
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-06-19
19:42:21 UTC (rev 7479)
@@ -47,6 +47,7 @@
private Boolean useWSDL = null;
private ConsumerManagerBean manager;
private boolean modified;
+ private boolean registrationModified;
private String serviceDescription;
private String markup;
@@ -213,6 +214,11 @@
}
}
+ public boolean isRegistrationModified()
+ {
+ return registrationModified;
+ }
+
public boolean isRegistrationChecked()
{
return getProducerInfo().isRegistrationChecked();
@@ -258,6 +264,8 @@
}
registry.updateProducerInfo(prodInfo);
+ modified = false;
+ registrationModified = false;
}
catch (Exception e)
{
@@ -303,6 +311,8 @@
{
createInfoMessage(null, result.getStatus());
}
+
+ registrationModified = false;
}
catch (Exception e)
{
@@ -324,6 +334,7 @@
{
getProducerInfo().modifyRegistration();
createInfoMessage(null, "Successfully modified Registration!");
+ registrationModified = false;
}
catch (Exception e)
{
@@ -337,15 +348,6 @@
return null;
}
- // Listeners
-
- public void useWSDLListener(ValueChangeEvent event)
- {
- useWSDL = (Boolean)event.getNewValue();
- // bypass the rest of the life cycle and re-display page
- FacesContext.getCurrentInstance().renderResponse();
- }
-
private String modifyIfNeeded(String oldValue, String newValue, String target)
{
if ((oldValue != null && !oldValue.equals(newValue)) || (oldValue == null
&& newValue != null))
@@ -371,4 +373,22 @@
return oldValue;
}
+
+ // Listeners
+
+ public void useWSDLListener(ValueChangeEvent event)
+ {
+ useWSDL = (Boolean)event.getNewValue();
+
+ // bypass the rest of the life cycle and re-display page
+ FacesContext.getCurrentInstance().renderResponse();
+ }
+
+ public void regPropListener(ValueChangeEvent event)
+ {
+ registrationModified = true;
+
+ // bypass the rest of the life cycle and re-display page
+ FacesContext.getCurrentInstance().renderResponse();
+ }
}
\ No newline at end of file
Modified:
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
---
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-06-19
19:38:37 UTC (rev 7478)
+++
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-06-19
19:42:21 UTC (rev 7479)
@@ -116,7 +116,7 @@
public boolean isRefreshNeeded()
{
- boolean result = dirty || requiresRegistration == null;
+ boolean result = isModified() || requiresRegistration == null;
if (result)
{
log.debug("Refresh needed");
@@ -196,7 +196,7 @@
public RegistrationData getRegistrationData()
{
- if (dirty || registrationData == null)
+ if (isModified() || registrationData == null)
{
registrationData = WSRPTypeFactory.createDefaultRegistrationData();
registrationData.setConsumerName(persistentConsumerName);
@@ -561,6 +561,11 @@
}
}
+ public boolean isModified()
+ {
+ return dirty;
+ }
+
public class RegistrationRefreshResult extends RefreshResult
{
public RegistrationRefreshResult()
Modified:
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
===================================================================
---
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-06-19
19:38:37 UTC (rev 7478)
+++
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-06-19
19:42:21 UTC (rev 7479)
@@ -92,8 +92,10 @@
<h:outputText value="#{prop.name}"/>
</td>
<td>
- <h:inputText value="#{prop.value}"
size="40"/>
- <h:outputText styleClass="error"
value="#{prop.status}" rendered="#{prop.determinedInvalid}"/>
+ <h:inputText value="#{prop.value}"
size="40" onchange="this.form.submit()"
+ immediate="true"
valueChangeListener="#{consumer.regPropListener}"/>
+ <h:outputText styleClass="error"
value="#{prop.status}"
+
rendered="#{prop.determinedInvalid}"/>
</td>
</tr>
</c:forEach>
@@ -146,6 +148,15 @@
</c:if>
</c:otherwise>
</c:choose>
+ <c:if test="#{consumer.registrationModified}">
+ <tr>
+ <td colspan="2">
+ <h:commandLink action="#{consumer.modifyRegistration}"
value="Modify registration"
+ title="Modify the registration held with this
Producer"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </c:if>
</c:if>
<tr>
<td colspan="2" style="padding: 1em 1em 1em 0;">
Show replies by date