Author: chris.laprun(a)jboss.com
Date: 2007-03-15 20:12:26 -0400 (Thu, 15 Mar 2007)
New Revision: 6705
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
trunk/wsrp/src/resources/portal-wsrp-war/style.css
Log:
- Started to add support for choosing between using WSDL or not.
- Buttons on editConsumer don't work for some reasons... and styling is messed up. :(
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-03-15
22:36:31 UTC (rev 6704)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-03-16
00:12:26 UTC (rev 6705)
@@ -27,6 +27,7 @@
import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
@@ -40,6 +41,7 @@
{
private ConsumerRegistry registry;
private String selectedId;
+ private Boolean useWSDL = null;
public ConsumerRegistry getRegistry()
{
@@ -83,7 +85,7 @@
// todo: error message
}
- return null;
+ return listConsumers();
}
public String registerConsumer()
@@ -125,9 +127,25 @@
return "index";
}
+ public void useWSDLListener(ValueChangeEvent event)
+ {
+ useWSDL = (Boolean)event.getNewValue();
+ }
+
+ public boolean isUseWSDL()
+ {
+ if (useWSDL != null)
+ {
+ return useWSDL.booleanValue();
+ }
+
+ return
getSelectedConsumer().getProducerInfo().getEndpointConfigurationInfo().usesWSDL();
+ }
+
private String refreshConsumerId()
{
selectedId = getParameter("id");
+ useWSDL = null;
return selectedId;
}
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-03-15
22:36:31 UTC (rev 6704)
+++
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-03-16
00:12:26 UTC (rev 6705)
@@ -24,38 +24,45 @@
<tr>
<th>Endpoint configuration:</th>
<td>
- <table border="0" class='portlet-table-body'>
- <tr>
- <th class="portlet-form-field-label">Service
Description URL:</th>
- <td><h:inputText size="50"
-
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.serviceDescriptionURL}"/>
- </td>
- </tr>
- <tr>
- <th class="portlet-form-field-label">Markup
URL:</th>
- <td><h:inputText size="50"
-
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.markupURL}"/>
- </td>
- </tr>
- <tr>
- <th class="portlet-form-field-label">Registration
URL:</th>
- <td><h:inputText size="50"
-
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.registrationURL}"/>
- </td>
- </tr>
- <tr>
- <th class="portlet-form-field-label">Portlet Management
URL:</th>
- <td><h:inputText size="50"
-
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.portletManagementURL}"/>
- </td>
- </tr>
- <tr>
- <th class="portlet-form-field-label">WSDL
URL:</th>
- <td><h:inputText size="50"
-
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.wsdlDefinitionURL}"/>
- </td>
- </tr>
- </table>
+ <h:selectBooleanCheckbox value="#{consumersMgr.useWSDL}"
+
valueChangeListener="#{consumersMgr.useWSDLListener}"
+ onchange="submit()"
immediate="true"/>Use WSDL?
+
+ <c:choose>
+ <c:when test="#{consumersMgr.useWSDL}">
+ <h:inputText size="70"
+
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.wsdlDefinitionURL}"/>
+ </c:when>
+
+ <c:otherwise>
+ <table border="0" class='portlet-table-body'>
+ <tr>
+ <th>Service Description URL:</th>
+ <td><h:inputText size="70"
+
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.serviceDescriptionURL}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Markup URL:</th>
+ <td><h:inputText size="70"
+
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.markupURL}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Registration URL:</th>
+ <td><h:inputText size="70"
+
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.registrationURL}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Portlet Management URL:</th>
+ <td><h:inputText size="70"
+
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.portletManagementURL}"/>
+ </td>
+ </tr>
+ </table>
+ </c:otherwise>
+ </c:choose>
</td>
</tr>
<tr>
@@ -67,19 +74,17 @@
<c:choose>
<c:when
test="#{!empty
consumersMgr.selectedConsumer.producerInfo.registrationInfo.registrationPropertyNames}">
- <table border='1' cellspacing='0'
class='portlet-table-body'>
+ <table border='1' cellspacing='0'
class='registration-prop-table'>
<tr>
<th>Name</th>
<th>Value</th>
- <th>Description</th>
</tr>
<c:forEach
items="#{consumersMgr.selectedConsumer.producerInfo.registrationInfo.registrationProperties}"
var="prop">
- <tr>
- <td><h:inputText
value="#{prop.name}"/></td>
- <td><h:inputText
value="#{prop.value}"/></td>
- <td><h:outputText
value="#{prop.description.label.value}"/></td>
+ <tr title="#{prop.description.label.value}">
+ <td><h:inputText value="#{prop.name}"
size="40"/></td>
+ <td><h:inputText value="#{prop.value}"
size="40"/></td>
</tr>
</c:forEach>
</table>
@@ -103,5 +108,22 @@
<hr/>
</h:form>
-<h:form><h:commandButton action="#{consumersMgr.listConsumers}"
value="Back"/></h:form>
+<h:form>
+ <h:commandButton action="#{consumersMgr.listConsumers}"
value="Back"/>
+ <h:commandButton action="#{consumersMgr.activateConsumer}"
+ value="#{consumersMgr.selectedConsumer.producerInfo.active ?
'Deactivate' : 'Activate'}">
+ <f:param name="id"
value="#{consumersMgr.selectedConsumer.producerId}"/>
+ <f:param name="activate"
value="#{!consumersMgr.selectedConsumer.producerInfo.active}"/>
+ </h:commandButton>
+ <c:if test="#{consumersMgr.selectedConsumer.producerInfo.active}">
+ <h:commandButton action="#{consumersMgr.registerConsumer}"
+
value="#{consumersMgr.selectedConsumer.producerInfo.registered ? 'Deregister'
: 'Register'}">
+ <f:param name="id"
value="#{consumersMgr.selectedConsumer.producerId}"/>
+ <f:param name="register"
value="#{!consumersMgr.selectedConsumer.producerInfo.registered}"/>
+ </h:commandButton>
+ </c:if>
+ <h:commandButton action="#{consumersMgr.destroyConsumer}"
value="Destroy">
+ <f:param name="id"
value="#{consumersMgr.selectedConsumer.producerId}"/>
+ </h:commandButton>
+</h:form>
</div>
\ No newline at end of file
Modified: trunk/wsrp/src/resources/portal-wsrp-war/style.css
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/style.css 2007-03-15 22:36:31 UTC (rev 6704)
+++ trunk/wsrp/src/resources/portal-wsrp-war/style.css 2007-03-16 00:12:26 UTC (rev 6705)
@@ -28,11 +28,21 @@
padding-top: 2px;
}
-.active {
+.wsrp-consumers-ui .active {
background-color: #C7DDB7;
font-weight: bold;
}
-.inactive {
+.wsrp-consumers-ui .inactive {
background-color: #EBD1B8;
+}
+
+.wsrp-consumer-ui .registration-prop-table {
+ text-align: left;
+ border: 0;
+ border-collapse: separate;
+}
+
+.wsrp-consumer-ui .registration-prop-table th {
+ border: none;
}
\ No newline at end of file