Author: chris.laprun(a)jboss.com
Date: 2007-03-25 17:21:04 -0400 (Sun, 25 Mar 2007)
New Revision: 6823
Added:
trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/faces-config.xml
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/consumers.xhtml
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
Log:
- JBPORTAL-715:
- Started support for updating consumer state.
- Started support for creating new consumers.
- Introduced ConsumerBean in hope it would help with updating the consumer state and for
easier referencing in JSF.
- This solution is currently not working properly but I want to commit a version of it for
reference purpose... it might get reverted to just using ConsumerManagerBean.
Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
(rev 0)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-03-25
21:21:04 UTC (rev 6823)
@@ -0,0 +1,178 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, 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.jboss.portal.wsrp.admin.ui;
+
+import org.jboss.portal.wsrp.WSRPConsumer;
+import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
+import org.jboss.portal.wsrp.consumer.ProducerInfo;
+
+import javax.faces.event.ValueChangeEvent;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class ConsumerBean
+{
+ private WSRPConsumer consumer;
+ private ConsumerRegistry registry;
+ private Boolean useWSDL = null;
+
+
+ public void setRegistry(ConsumerRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ // Properties
+
+ public boolean isUseWSDL()
+ {
+ if (useWSDL != null)
+ {
+ return useWSDL.booleanValue();
+ }
+
+ return getProducerInfo().getEndpointConfigurationInfo().usesWSDL();
+ }
+
+ public String getId()
+ {
+ return consumer.getProducerId();
+ }
+
+ public void setId(String id)
+ {
+ if (consumer != null)
+ {
+ getProducerInfo().setId(id);
+ }
+ else
+ {
+ consumer = registry.getConsumer(id);
+ }
+ }
+
+ public Integer getCache()
+ {
+ return getProducerInfo().getExpirationCacheSeconds();
+ }
+
+ public void setCache(Integer cache)
+ {
+ getProducerInfo().setExpirationCacheSeconds(cache);
+ }
+
+ public String getServiceDescription()
+ {
+ return
getProducerInfo().getEndpointConfigurationInfo().getServiceDescriptionURL();
+ }
+
+ public void setServiceDescription(String sdURL)
+ {
+ getProducerInfo().getEndpointConfigurationInfo().setServiceDescriptionURL(sdURL);
+ }
+
+ public String getMarkup()
+ {
+ return getProducerInfo().getEndpointConfigurationInfo().getMarkupURL();
+ }
+
+ public void setMarkup(String markupURL)
+ {
+ getProducerInfo().getEndpointConfigurationInfo().setMarkupURL(markupURL);
+ }
+
+ public String getPortletManagement()
+ {
+ return getProducerInfo().getEndpointConfigurationInfo().getPortletManagementURL();
+ }
+
+ public void setPortletManagement(String pmURL)
+ {
+ getProducerInfo().getEndpointConfigurationInfo().setPortletManagementURL(pmURL);
+ }
+
+ public String getRegistration()
+ {
+ return getProducerInfo().getEndpointConfigurationInfo().getRegistrationURL();
+ }
+
+ public void setRegistration(String rURL)
+ {
+ getProducerInfo().getEndpointConfigurationInfo().setRegistrationURL(rURL);
+ }
+
+ public String getWsdl()
+ {
+ return getProducerInfo().getEndpointConfigurationInfo().getWsdlDefinitionURL();
+ }
+
+ public void setWsdl(String wsdlURL)
+ {
+ getProducerInfo().getEndpointConfigurationInfo().setWsdlDefinitionURL(wsdlURL);
+ }
+
+ public boolean isActive()
+ {
+ return getProducerInfo().isActive();
+ }
+
+ public boolean isRegistered()
+ {
+ return getProducerInfo().isRegistered();
+ }
+
+ public boolean isRequiresRegistration()
+ {
+ return getProducerInfo().getRegistrationInfo().isRequiresRegistration();
+ }
+
+ public ProducerInfo getProducerInfo()
+ {
+ return consumer.getProducerInfo();
+ }
+
+ // Actions
+
+ public String update()
+ {
+ if (consumer != null)
+ {
+ registry.updateProducerInfo(getProducerInfo());
+ return ConsumerManagerBean.INDEX;
+ }
+
+ // todo: error message
+ return null;
+ }
+
+ // Listeners
+
+ public void useWSDLListener(ValueChangeEvent event)
+ {
+ useWSDL = (Boolean)event.getNewValue();
+ }
+}
\ No newline at end of file
Property changes on: trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
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-25
20:43:24 UTC (rev 6822)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-03-25
21:21:04 UTC (rev 6823)
@@ -42,7 +42,11 @@
private ConsumerRegistry registry;
private String selectedId;
private Boolean useWSDL = null;
+ private static final String CONSUMER_ID = "consumerId";
+ static final String CONFIGURE_CONSUMER = "configureConsumer";
+ static final String INDEX = "index";
+
public ConsumerRegistry getRegistry()
{
return registry;
@@ -53,6 +57,16 @@
this.registry = registry;
}
+ public void setSelectedId(String consumerId)
+ {
+ this.selectedId = consumerId;
+ }
+
+ public String getSelectedId()
+ {
+ return selectedId;
+ }
+
public WSRPConsumer getSelectedConsumer()
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(selectedId,
"consumer id", null);
@@ -97,7 +111,8 @@
registry.registerOrDeregisterConsumerWith(selectedId, register);
// show consumer configuration
- return "configureConsumer";
+ setConsumerIdInSession(false);
+ return CONFIGURE_CONSUMER;
}
else
{
@@ -107,6 +122,31 @@
return null;
}
+ public String createConsumer()
+ {
+ if (selectedId != null)
+ {
+ registry.createConsumer(selectedId, null);
+ setConsumerIdInSession(false);
+ return CONFIGURE_CONSUMER;
+ }
+
+ return null;
+ }
+
+ public String updateConsumer()
+ {
+ WSRPConsumer consumer = getSelectedConsumer();
+ if (consumer != null)
+ {
+ registry.updateProducerInfo(consumer.getProducerInfo());
+ return listConsumers();
+ }
+
+ // todo: error message
+ return null;
+ }
+
public String destroyConsumer()
{
return null;
@@ -116,17 +156,32 @@
{
if (refreshConsumerId() != null)
{
- return "configureConsumer";
+ setConsumerIdInSession(false);
+ return CONFIGURE_CONSUMER;
}
// todo: error message
return null;
}
+ private void setConsumerIdInSession(boolean remove)
+ {
+ Map sessionMap =
FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
+ if (!remove)
+ {
+ sessionMap.put(CONSUMER_ID, selectedId);
+ }
+ else
+ {
+ sessionMap.remove(CONSUMER_ID);
+ }
+ }
+
public String listConsumers()
{
+ setConsumerIdInSession(true);
useWSDL = null;
selectedId = null;
- return "index";
+ return INDEX;
}
public void useWSDLListener(ValueChangeEvent event)
@@ -156,4 +211,10 @@
Map pmap =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
return (String)pmap.get(key);
}
+
+ /*private void createErrorMessage(String message, FacesMessage.Severity severity)
+ {
+ FacesMessage msg = new FacesMessage(severity, message, message);
+ FacesContext.getCurrentInstance().addMessage(messageTarget, message);
+ }*/
}
\ No newline at end of file
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/faces-config.xml 2007-03-25 20:43:24
UTC (rev 6822)
+++ trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/faces-config.xml 2007-03-25 21:21:04
UTC (rev 6823)
@@ -42,6 +42,20 @@
<value>#{applicationScope.ConsumerRegistry}</value>
</managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>consumer</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.wsrp.admin.ui.ConsumerBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>registry</property-name>
+
<property-class>org.jboss.portal.wsrp.consumer.ConsumerRegistry</property-class>
+ <value>#{applicationScope.ConsumerRegistry}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>#{sessionScope.consumerId}</value>
+ </managed-property>
+ </managed-bean>
<navigation-rule>
<navigation-case>
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/consumers.xhtml
===================================================================
---
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/consumers.xhtml 2007-03-25
20:43:24 UTC (rev 6822)
+++
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/consumers.xhtml 2007-03-25
21:21:04 UTC (rev 6823)
@@ -9,21 +9,29 @@
<hr/>
+ <h:messages/>
+
<h:form>
- <table width="100%" class="portlet-table-body">
- <thead>
- <tr class="portlet-table-header">
- <th>Consumer</th>
- <th>Actions</th>
- </tr>
- <tr>
- <td colspan="2">Legend:
- <span class="active">active</span>
- <span class="inactive">inactive</span>
- </td>
- </tr>
- </thead>
- <tbody>
+ Create a consumer:
+ <h:inputText value="#{consumersMgr.selectedId}"/>
+ <h:commandButton action="#{consumersMgr.createConsumer}"
value="Create Consumer"/>
+ </h:form>
+
+ <table width="100%" class="portlet-table-body">
+ <thead>
+ <tr class="portlet-table-header">
+ <th>Consumer</th>
+ <th>Actions</th>
+ </tr>
+ <tr>
+ <td colspan="2">Legend:
+ <span class="active">active</span>
+ <span class="inactive">inactive</span>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <h:form>
<c:forEach items="#{consumersMgr.consumers}"
var="consumer">
<tr class="#{consumer.producerInfo.active ? 'active' :
'inactive'}">
<td>
@@ -37,25 +45,30 @@
<h:commandLink
action="#{consumersMgr.configureConsumer}">
<f:param name="id"
value="#{consumer.producerId}"/>
<h:outputText value="Configure"/>
- </h:commandLink> | <h:commandLink
action="#{consumersMgr.activateConsumer}">
- <f:param name="id"
value="#{consumer.producerId}"/>
- <f:param name="activate"
value="#{!consumer.producerInfo.active}"/>
- <h:outputText value="#{consumer.producerInfo.active ?
'Deactivate' : 'Activate'}"/>
- </h:commandLink>
- <c:if test="#{consumer.producerInfo.active}"> |
<h:commandLink
- action="#{consumersMgr.registerConsumer}">
+ </h:commandLink>
+ |
+ <h:commandLink
action="#{consumersMgr.activateConsumer}">
<f:param name="id"
value="#{consumer.producerId}"/>
- <f:param name="register"
value="#{!consumer.producerInfo.registered}"/>
- <h:outputText value="#{consumer.producerInfo.registered ?
'Deregister' : 'Register'}"/>
+ <f:param name="activate"
value="#{!consumer.producerInfo.active}"/>
+ <h:outputText value="#{consumer.producerInfo.active ?
'Deactivate' : 'Activate'}"/>
</h:commandLink>
- </c:if> | <h:commandLink
action="#{consumersMgr.destroyConsumer}">
- <f:param name="id"
value="#{consumer.producerId}"/>
- <h:outputText value="Destroy"/>
- </h:commandLink>
+ <c:if test="#{consumer.producerInfo.active}"> |
+ <h:commandLink
+ action="#{consumersMgr.registerConsumer}">
+ <f:param name="id"
value="#{consumer.producerId}"/>
+ <f:param name="register"
value="#{!consumer.producerInfo.registered}"/>
+ <h:outputText
value="#{consumer.producerInfo.registered ? 'Deregister' :
'Register'}"/>
+ </h:commandLink>
+ </c:if>
+ |
+ <h:commandLink
action="#{consumersMgr.destroyConsumer}">
+ <f:param name="id"
value="#{consumer.producerId}"/>
+ <h:outputText value="Destroy"/>
+ </h:commandLink>
</td>
</tr>
</c:forEach>
- </tbody>
- </table>
- </h:form>
+ </h:form>
+ </tbody>
+ </table>
</div>
\ No newline at end of file
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-25
20:43:24 UTC (rev 6822)
+++
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-03-25
21:21:04 UTC (rev 6823)
@@ -5,131 +5,141 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core">
-<h1 class="portlet">Consumer
'#{consumersMgr.selectedConsumer.producerId}' configuration</h1>
+<f:view>
+<h:form>
+ <h1 class="portlet">Consumer '#{consumer.id}' configuration
+ <h:commandLink action="#{consumersMgr.activateConsumer}"
styleClass="portlet-form-button"
+ value="#{consumer.active ? 'Deactivate' :
'Activate'}">
+ <f:param name="id" value="#{consumer.id}"/>
+ <f:param name="activate"
value="#{!consumer.active}"/>
+ </h:commandLink>
+ <h:commandLink action="#{consumersMgr.registerConsumer}"
styleClass="portlet-form-button"
+ rendered="#{consumer.active}"
+ value="#{consumer.registered ? 'Deregister' :
'Register'}">
+ <f:param name="id" value="#{consumer.id}"/>
+ <f:param name="register"
value="#{!consumer.registered}"/>
+ </h:commandLink>
+
+ <h:commandLink action="#{consumersMgr.destroyConsumer}"
value="Destroy" styleClass="portlet-form-button">
+ <f:param name="id" value="#{consumer.id}"/>
+ </h:commandLink>
+
+ <h:commandLink action="#{consumersMgr.listConsumers}"
value="Return to list" styleClass="portlet-form-button"/>
+ </h1>
+</h:form>
+
<hr/>
<h:form>
-<table width="100%" class="portlet-table-body">
- <tr>
- <th>Producer id:</th>
- <td><h:inputText
value="#{consumersMgr.selectedConsumer.producerId}"/></td>
- </tr>
- <tr>
- <th>Cache expiration:</th>
- <td><h:inputText
value="#{consumersMgr.selectedConsumer.producerInfo.expirationCacheSeconds}"/>
(seconds
- before expiration)
- </td>
- </tr>
- <tr>
- <th>Endpoint configuration:</th>
- <td>
- <h:selectBooleanCheckbox value="#{consumersMgr.useWSDL}"
-
valueChangeListener="#{consumersMgr.useWSDLListener}"
- onchange="submit()"
immediate="true"/>Use WSDL?
+ <table width="100%" class="portlet-table-body">
+ <tr>
+ <th>Producer id:</th>
+ <td>
+ <h:inputText value="#{consumer.id}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Cache expiration:</th>
+ <td>
+ <h:inputText value="#{consumer.cache}"/>
+ (seconds before expiration)
+ </td>
+ </tr>
+ <tr>
+ <th>Endpoint configuration:</th>
+ <td>
+ <h:selectBooleanCheckbox value="#{consumer.useWSDL}"/>
+ Use WSDL?
- <c:choose>
- <c:when test="#{consumersMgr.useWSDL}">
- <h:inputText size="70"
-
value="#{consumersMgr.selectedConsumer.producerInfo.endpointConfigurationInfo.wsdlDefinitionURL}"/>
- </c:when>
+ <c:choose>
+ <c:when test="#{consumer.useWSDL}">
+ <h:inputText size="70"
value="#{consumer.wsdl}"/>
+ </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>
- <th>Registration information</th>
- <td>
- <c:choose>
- <c:when
test="#{consumersMgr.selectedConsumer.producerInfo.registrationInfo.requiresRegistration}">
- <c:choose>
- <c:when
- test="#{!empty
consumersMgr.selectedConsumer.producerInfo.registrationInfo.registrationPropertyNames}">
- <table border='1' cellspacing='0'
class='registration-prop-table'>
- <tr>
- <th>Name</th>
- <th>Value</th>
- </tr>
- <c:forEach
-
items="#{consumersMgr.selectedConsumer.producerInfo.registrationInfo.registrationProperties}"
- var="prop">
- <tr title="#{prop.description.label.value}">
- <td><h:inputText value="#{prop.name}"
size="40"/></td>
- <td><h:inputText value="#{prop.value}"
size="40"/></td>
+ <c:otherwise>
+ <table border="0" class='portlet-table-body'>
+ <tr>
+ <th>Service Description URL:</th>
+ <td>
+ <h:inputText size="70"
value="#{consumer.serviceDescription}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Markup URL:</th>
+ <td>
+ <h:inputText size="70"
value="#{consumer.markup}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Registration URL:</th>
+ <td>
+ <h:inputText size="70"
value="#{consumer.registration}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Portlet Management URL:</th>
+ <td>
+ <h:inputText size="70"
value="#{consumer.portletManagement}"/>
+ </td>
+ </tr>
+ </table>
+ </c:otherwise>
+ </c:choose>
+ </td>
+ </tr>
+ <tr>
+ <th>Registration information</th>
+ <td>
+ <c:choose>
+ <c:when test="#{consumer.requiresRegistration}">
+ <c:choose>
+ <c:when test="#{!empty
consumer.producerInfo.registrationInfo.registrationPropertyNames}">
+ <table border='1' cellspacing='0'
class='registration-prop-table'>
+ <tr>
+ <th>Name</th>
+ <th>Value</th>
</tr>
- </c:forEach>
- </table>
- </c:when>
- <c:otherwise>
- No required registration properties.
- </c:otherwise>
- </c:choose>
- </c:when>
- <c:otherwise>
- Producer doesn't require registration.
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- <c:if
test="#{consumersMgr.selectedConsumer.producerInfo.registrationInfo.registrationValid}">
+ <c:forEach
items="#{consumer.producerInfo.registrationInfo.registrationProperties}"
+ var="prop">
+ <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>
+ </c:when>
+ <c:otherwise>
+ No required registration properties.
+ </c:otherwise>
+ </c:choose>
+ </c:when>
+ <c:otherwise>
+ Producer doesn't require registration.
+ </c:otherwise>
+ </c:choose>
+ </td>
+ </tr>
+ <c:if
test="#{consumer.producerInfo.registrationInfo.registrationValid}">
+ <tr>
+ <th>Registration context:</th>
+ <td>Handle:
+ <h:outputText
value="#{consumer.producerInfo.registrationInfo.registrationContext.registrationHandle}"/>
+ </td>
+ </tr>
+ </c:if>
<tr>
- <th>Registration context:</th>
- <td>Handle: <h:outputText
-
value="#{consumersMgr.selectedConsumer.producerInfo.registrationInfo.registrationContext.registrationHandle}"/>
+ <td colspan="2">
+ <h:commandButton action="#{consumer.update}"
value="Save" styleClass="portlet-form-button"/>
</td>
</tr>
- </c:if>
-</table>
+ </table>
-<hr/>
+ <hr/>
</h:form>
-
-<h:form>
- <h:commandLink action="#{consumersMgr.listConsumers}"
value="Cancel" styleClass="portlet-form-button"/>
-
- <h:commandLink action="#{consumersMgr.activateConsumer}"
styleClass="portlet-form-button"
- 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:commandLink>
-
- <h:commandLink action="#{consumersMgr.registerConsumer}"
styleClass="portlet-form-button"
-
rendered="#{consumersMgr.selectedConsumer.producerInfo.active}"
- 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:commandLink>
-
- <h:commandLink action="#{consumersMgr.destroyConsumer}"
value="Destroy" styleClass="portlet-form-button">
- <f:param name="id"
value="#{consumersMgr.selectedConsumer.producerId}"/>
- </h:commandLink>
-</h:form>
+</f:view>
</div>
\ No newline at end of file