Author: chris.laprun(a)jboss.com
Date: 2009-04-20 14:10:27 -0400 (Mon, 20 Apr 2009)
New Revision: 13238
Modified:
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer/producer.xhtml
Log:
- JBEPP-65: Use onclick instead of onchange as IE does not register an 'OnChange'
event until the mouse is clicked somewhere else on the page after having changed your
radio/checkbox selection. This resulted in incorrect behavior for some immediate elements
of forms.
Modified:
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2009-04-20
17:44:54 UTC (rev 13237)
+++
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2009-04-20
18:10:27 UTC (rev 13238)
@@ -3,199 +3,204 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core">
-<ui:param name="title" value=""/>
+ <ui:param name="title" value=""/>
-<ui:define name="content">
+ <ui:define name="content">
-<hr/>
+ <hr/>
-<h:form id="edit-cons-form">
-<table width="100%" class="portlet-table-body #{consumer.active ?
'active' : 'inactive'}">
-<tr>
- <th>#{i18n.edit_consumer_producer}</th>
- <td>
- <h:inputText id="id" value="#{consumer.id}"/>
<h:message styleClass="portlet-msg-error" for="id"/>
- </td>
-</tr>
-<tr>
- <th>#{i18n.edit_consumer_cache}</th>
- <td>
- <h:inputText id="cache" value="#{consumer.cache}"/>
#{i18n.edit_consumer_cache_seconds}
- <h:message styleClass="portlet-msg-error" for="cache"/>
- </td>
-</tr>
-<tr>
- <th>#{i18n.edit_consumer_endpoint}</th>
- <td>
- <h:selectBooleanCheckbox id="useWSDL"
value="#{consumer.useWSDL}" onchange="this.form.submit()"
-
valueChangeListener="#{consumer.useWSDLListener}"
-
immediate="true"/>#{i18n.edit_consumer_endpoint_wsdl}
- <h:message styleClass="portlet-msg-error"
for="useWSDL"/>
- <c:choose>
- <c:when test="#{consumer.useWSDL}">
- <h:inputText id="wsdl" size="70"
value="#{consumer.wsdl}"/> <h:message
styleClass="portlet-msg-error"
-
for="wsdl"/>
- </c:when>
-
- <c:otherwise>
- <table border="0" class='portlet-table-body'>
- <tr>
- <th>#{i18n.edit_consumer_endpoint_sd}</th>
- <td>
- <h:inputText id="sd" size="70"
value="#{consumer.serviceDescription}"/> <h:message
- styleClass="portlet-msg-error"
for="sd"/>
- </td>
- </tr>
- <tr>
- <th>#{i18n.edit_consumer_endpoint_m}</th>
- <td>
- <h:inputText id="m" size="70"
value="#{consumer.markup}"/> <h:message
- styleClass="portlet-msg-error"
for="m"/>
- </td>
- </tr>
- <tr>
- <th>#{i18n.edit_consumer_endpoint_r}</th>
- <td>
- <h:inputText id="r" size="70"
value="#{consumer.registration}"/> <h:message
- styleClass="portlet-msg-error"
- for="r"/>
- </td>
- </tr>
- <tr>
- <th>#{i18n.edit_consumer_endpoint_pm}</th>
- <td>
- <h:inputText id="pm" size="70"
value="#{consumer.portletManagement}"/> <h:message
- styleClass="portlet-msg-error"
for="pm"/>
- </td>
- </tr>
- </table>
- </c:otherwise>
- </c:choose>
- </td>
-</tr>
-<c:if test="#{consumer.localInfoPresent}">
- <tr>
- <th>#{i18n.edit_consumer_registration}</th>
- <td>
- <c:choose>
- <c:when test="#{consumer.localInfoPresent}">
- <h3
class="portlet-area-header">#{i18n.edit_consumer_registration_current}</h3>
- <h:panelGroup styleClass="portlet-area-body">
+ <h:form id="edit-cons-form">
+ <table width="100%" class="portlet-table-body
#{consumer.active ? 'active' : 'inactive'}">
+ <tr>
+ <th>#{i18n.edit_consumer_producer}</th>
+ <td>
+ <h:inputText id="id" value="#{consumer.id}"/>
<h:message styleClass="portlet-msg-error" for="id"/>
+ </td>
+ </tr>
+ <tr>
+ <th>#{i18n.edit_consumer_cache}</th>
+ <td>
+ <h:inputText id="cache"
value="#{consumer.cache}"/> #{i18n.edit_consumer_cache_seconds}
+ <h:message styleClass="portlet-msg-error"
for="cache"/>
+ </td>
+ </tr>
+ <tr>
+ <th>#{i18n.edit_consumer_endpoint}</th>
+ <td>
+ <h:selectBooleanCheckbox id="useWSDL"
value="#{consumer.useWSDL}" onclick="this.form.submit()"
+
valueChangeListener="#{consumer.useWSDLListener}"
+
immediate="true"/>#{i18n.edit_consumer_endpoint_wsdl}
+ <h:message styleClass="portlet-msg-error"
for="useWSDL"/>
<c:choose>
- <c:when
test="#{consumer.registrationPropertiesEmpty}">
- <h:dataTable id="existingProps"
- value="#{consumer.registrationProperties}"
var="prop"
-
rowClasses="portlet-section-body,portlet-section-alternate"
- columnClasses="nameColumn,descColumn,"
- headerClass="portlet-section-header
#{consumer.active ? 'active' : 'inactive'}"
- styleClass="registration-prop-table
#{consumer.active ? 'active' : 'inactive'}"
- width="100%">
- <h:column>
- <f:facet
name="header">#{i18n.edit_consumer_prop_name}</f:facet>
- #{prop.name}
- </h:column>
- <h:column>
- <f:facet
name="header">#{i18n.edit_consumer_prop_desc}</f:facet>
- #{prop.description.label.value}
- </h:column>
- <h:column>
- <f:facet
name="header">#{i18n.edit_consumer_prop_value}</f:facet>
- <!-- todo: valueChangeListener not needed anymore when
events on RegistrationProperties work -->
- <h:inputText id="prop-value-input"
value="#{prop.value}" size="50"
-
valueChangeListener="#{consumer.regPropListener}"
-
disabled="#{consumer.registrationModified}"/>
- <h:outputText styleClass="portlet-msg-error"
value="#{prop.status}"
-
rendered="#{prop.determinedInvalid}"/>
- </h:column>
- </h:dataTable>
- <h:commandLink id="cons-update-link"
action="#{consumer.update}"
-
value="#{i18n.edit_consumer_registration_update_props}"
- rendered="#{consumer.registered}"
- styleClass="portlet-form-button
portlet-section-buttonrow"/>
+ <c:when test="#{consumer.useWSDL}">
+ <h:inputText id="wsdl" size="70"
value="#{consumer.wsdl}"/> <h:message
+ styleClass="portlet-msg-error"
+ for="wsdl"/>
</c:when>
+
<c:otherwise>
- #{i18n.edit_consumer_registration_no_props}
+ <table border="0"
class='portlet-table-body'>
+ <tr>
+ <th>#{i18n.edit_consumer_endpoint_sd}</th>
+ <td>
+ <h:inputText id="sd" size="70"
value="#{consumer.serviceDescription}"/> <h:message
+ styleClass="portlet-msg-error"
for="sd"/>
+ </td>
+ </tr>
+ <tr>
+ <th>#{i18n.edit_consumer_endpoint_m}</th>
+ <td>
+ <h:inputText id="m" size="70"
value="#{consumer.markup}"/> <h:message
+ styleClass="portlet-msg-error"
for="m"/>
+ </td>
+ </tr>
+ <tr>
+ <th>#{i18n.edit_consumer_endpoint_r}</th>
+ <td>
+ <h:inputText id="r" size="70"
value="#{consumer.registration}"/> <h:message
+ styleClass="portlet-msg-error"
+ for="r"/>
+ </td>
+ </tr>
+ <tr>
+ <th>#{i18n.edit_consumer_endpoint_pm}</th>
+ <td>
+ <h:inputText id="pm" size="70"
value="#{consumer.portletManagement}"/> <h:message
+ styleClass="portlet-msg-error"
for="pm"/>
+ </td>
+ </tr>
+ </table>
</c:otherwise>
</c:choose>
- <h:commandLink id="modify-reg-link"
action="#{consumer.modifyRegistration}"
-
value="#{i18n.edit_consumer_registration_modify}"
-
rendered="#{consumer.registrationLocallyModified}"
-
title="#{i18n.edit_consumer_registration_modify_title}"
- styleClass="portlet-form-button
portlet-section-buttonrow"/>
- <br style="clear:both;"/>
- </h:panelGroup>
+ </td>
+ </tr>
+ <c:if test="#{consumer.localInfoPresent}">
+ <tr>
+ <th>#{i18n.edit_consumer_registration}</th>
+ <td>
+ <c:choose>
+ <c:when test="#{consumer.localInfoPresent}">
+ <h3
class="portlet-area-header">#{i18n.edit_consumer_registration_current}</h3>
+ <h:panelGroup styleClass="portlet-area-body">
+ <c:choose>
+ <c:when
test="#{consumer.registrationPropertiesEmpty}">
+ <h:dataTable id="existingProps"
+
value="#{consumer.registrationProperties}" var="prop"
+
rowClasses="portlet-section-body,portlet-section-alternate"
+
columnClasses="nameColumn,descColumn,"
+ headerClass="portlet-section-header
#{consumer.active ? 'active' : 'inactive'}"
+ styleClass="registration-prop-table
#{consumer.active ? 'active' : 'inactive'}"
+ width="100%">
+ <h:column>
+ <f:facet
name="header">#{i18n.edit_consumer_prop_name}</f:facet>
+ #{prop.name}
+ </h:column>
+ <h:column>
+ <f:facet
name="header">#{i18n.edit_consumer_prop_desc}</f:facet>
+ #{prop.description.label.value}
+ </h:column>
+ <h:column>
+ <f:facet
name="header">#{i18n.edit_consumer_prop_value}</f:facet>
+ <!-- todo: valueChangeListener not needed
anymore when events on RegistrationProperties work -->
+ <h:inputText id="prop-value-input"
value="#{prop.value}" size="50"
+
valueChangeListener="#{consumer.regPropListener}"
+
disabled="#{consumer.registrationModified}"/>
+ <h:outputText
styleClass="portlet-msg-error" value="#{prop.status}"
+
rendered="#{prop.determinedInvalid}"/>
+ </h:column>
+ </h:dataTable>
+ <h:commandLink id="cons-update-link"
action="#{consumer.update}"
+
value="#{i18n.edit_consumer_registration_update_props}"
+
rendered="#{consumer.registered}"
+ styleClass="portlet-form-button
portlet-section-buttonrow"/>
+ </c:when>
+ <c:otherwise>
+ #{i18n.edit_consumer_registration_no_props}
+ </c:otherwise>
+ </c:choose>
+ <h:commandLink id="modify-reg-link"
action="#{consumer.modifyRegistration}"
+
value="#{i18n.edit_consumer_registration_modify}"
+
rendered="#{consumer.registrationLocallyModified}"
+
title="#{i18n.edit_consumer_registration_modify_title}"
+ styleClass="portlet-form-button
portlet-section-buttonrow"/>
+ <br style="clear:both;"/>
+ </h:panelGroup>
- <br/>
+ <br/>
- <c:if test="#{consumer.registrationModified}">
- <h3
class="portlet-area-header">#{i18n.edit_consumer_registration_expected}</h3>
- <h:panelGroup styleClass="portlet-area-body">
- <c:choose>
- <c:when
test="#{consumer.expectedRegistrationPropertiesEmpty}">
- <h:dataTable id="expectedProps"
-
value="#{consumer.expectedRegistrationProperties}" var="prop"
-
rowClasses="portlet-section-body,portlet-section-alternate"
- columnClasses="nameColumn,descColumn,"
- headerClass="portlet-section-header
#{consumer.active ? 'active' : 'inactive'}"
- styleClass="registration-prop-table
#{consumer.active ? 'active' : 'inactive'}"
- width="100%">
- <h:column>
- <f:facet
name="header">#{i18n.edit_consumer_prop_name}</f:facet>
- #{prop.name}
- </h:column>
- <h:column>
- <f:facet
name="header">#{i18n.edit_consumer_prop_desc}</f:facet>
- #{prop.description.label.value}
- </h:column>
- <h:column>
- <f:facet
name="header">#{i18n.edit_consumer_prop_value}</f:facet>
- <h:inputText id="prop-value-input"
value="#{prop.value}" size="50"/>
- <h:outputText
styleClass="portlet-msg-error" value="#{prop.status}"
-
rendered="#{prop.determinedInvalid}"/>
- </h:column>
- </h:dataTable>
+ <c:if
test="#{consumer.registrationModified}">
+ <h3
class="portlet-area-header">#{i18n.edit_consumer_registration_expected}</h3>
+ <h:panelGroup
styleClass="portlet-area-body">
+ <c:choose>
+ <c:when
test="#{consumer.expectedRegistrationPropertiesEmpty}">
+ <h:dataTable id="expectedProps"
+
value="#{consumer.expectedRegistrationProperties}" var="prop"
+
rowClasses="portlet-section-body,portlet-section-alternate"
+
columnClasses="nameColumn,descColumn,"
+
headerClass="portlet-section-header #{consumer.active ? 'active' :
'inactive'}"
+
styleClass="registration-prop-table #{consumer.active ? 'active' :
'inactive'}"
+ width="100%">
+ <h:column>
+ <f:facet
name="header">#{i18n.edit_consumer_prop_name}</f:facet>
+ #{prop.name}
+ </h:column>
+ <h:column>
+ <f:facet
name="header">#{i18n.edit_consumer_prop_desc}</f:facet>
+ #{prop.description.label.value}
+ </h:column>
+ <h:column>
+ <f:facet
name="header">#{i18n.edit_consumer_prop_value}</f:facet>
+ <h:inputText
id="prop-value-input" value="#{prop.value}" size="50"/>
+ <h:outputText
styleClass="portlet-msg-error" value="#{prop.status}"
+
rendered="#{prop.determinedInvalid}"/>
+ </h:column>
+ </h:dataTable>
+ </c:when>
+ <c:otherwise>
+ #{i18n.edit_consumer_registration_no_props}
+ </c:otherwise>
+ </c:choose>
+ <h:commandLink id="edit-reg-link"
action="#{consumer.modifyRegistration}"
+
value="#{i18n.edit_consumer_registration_modify}"
+
title="#{i18n.edit_consumer_registration_modify_title}"
+ styleClass="portlet-form-button
portlet-section-buttonrow"/>
+ <br style="clear:both;"/>
+ </h:panelGroup>
+ </c:if>
</c:when>
- <c:otherwise>
- #{i18n.edit_consumer_registration_no_props}
- </c:otherwise>
+ <c:when test="#{consumer.registrationChecked and
!consumer.registrationRequired}">
+ #{i18n.edit_consumer_no_registration}
+ </c:when>
</c:choose>
- <h:commandLink id="edit-reg-link"
action="#{consumer.modifyRegistration}"
-
value="#{i18n.edit_consumer_registration_modify}"
-
title="#{i18n.edit_consumer_registration_modify_title}"
- styleClass="portlet-form-button
portlet-section-buttonrow"/>
- <br style="clear:both;"/>
- </h:panelGroup>
+ </td>
+ </tr>
+ <c:if test="#{!empty
consumer.producerInfo.registrationInfo.registrationHandle}">
+ <tr>
+ <th>#{i18n.edit_consumer_registration_context}</th>
+ <td id="handle">
+ #{i18n.edit_consumer_registration_context_handle}
<h:outputText
+
value="#{consumer.producerInfo.registrationInfo.registrationHandle}"/>
+ <h:commandLink id="erase-cons-link"
action="confirmEraseRegistration"
+
value="#{i18n.edit_consumer_registration_context_erase}"
+
title="#{i18n.edit_consumer_registration_context_erase_title}"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
</c:if>
- </c:when>
- <c:when test="#{consumer.registrationChecked and
!consumer.registrationRequired}">
- #{i18n.edit_consumer_no_registration}
- </c:when>
- </c:choose>
- </td>
- </tr>
- <c:if test="#{!empty
consumer.producerInfo.registrationInfo.registrationHandle}">
- <tr>
- <th>#{i18n.edit_consumer_registration_context}</th>
- <td id="handle">
- #{i18n.edit_consumer_registration_context_handle} <h:outputText
value="#{consumer.producerInfo.registrationInfo.registrationHandle}"/>
- <h:commandLink id="erase-cons-link"
action="confirmEraseRegistration"
value="#{i18n.edit_consumer_registration_context_erase}"
-
title="#{i18n.edit_consumer_registration_context_erase_title}"
- styleClass="portlet-form-button"/>
- </td>
- </tr>
- </c:if>
-</c:if>
-<tr>
- <th/>
- <td class="portlet-section-buttonrow">
- <h:commandButton id="refresh-cons-link"
action="#{consumer.refreshConsumer}"
value="#{i18n.edit_consumer_refresh}"
- title="#{i18n.edit_consumer_refresh_title}"
- styleClass="portlet-form-button"/>
- <h:commandLink id="list-cons-link"
action="#{consumersMgr.listConsumers}"
value="#{i18n.edit_consumer_cancel}" immediate="true"
- styleClass="portlet-form-button"/>
- </td>
-</tr>
-</table>
-</h:form>
-</ui:define>
+ </c:if>
+ <tr>
+ <th/>
+ <td class="portlet-section-buttonrow">
+ <h:commandButton id="refresh-cons-link"
action="#{consumer.refreshConsumer}"
+ value="#{i18n.edit_consumer_refresh}"
+ title="#{i18n.edit_consumer_refresh_title}"
+ styleClass="portlet-form-button"/>
+ <h:commandLink id="list-cons-link"
action="#{consumersMgr.listConsumers}"
+ value="#{i18n.edit_consumer_cancel}"
immediate="true"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </table>
+ </h:form>
+ </ui:define>
</ui:decorate>
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer/producer.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer/producer.xhtml 2009-04-20
17:44:54 UTC (rev 13237)
+++
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer/producer.xhtml 2009-04-20
18:10:27 UTC (rev 13238)
@@ -9,11 +9,12 @@
<ui:define name="content">
<h:form id="producer-form">
<h:panelGrid columns="2" width="100%">
- <h:selectBooleanCheckbox id="cons-reg-req-check"
value="#{producer.registrationRequiredForFullDescription}"/>
+ <h:selectBooleanCheckbox id="cons-reg-req-check"
+
value="#{producer.registrationRequiredForFullDescription}"/>
<h:outputText
value="#{i18n.producer_config_sd_requires_reg}"/>
- <h:selectBooleanCheckbox id="req-reg-check"
value="#{producer.registrationRequired}" immediate="true"
- onchange="this.form.submit()"
+ <h:selectBooleanCheckbox id="req-reg-check"
value="#{producer.registrationRequired}" immediate="true"
+ onclick="this.form.submit()"
valueChangeListener="#{producer.requireRegistrationListener}"/>
<h:outputText value="#{i18n.producer_config_requires_reg}"/>
@@ -84,7 +85,8 @@
<h:panelGroup styleClass="portlet-section-buttonrow">
<h:commandButton id="save-producer"
action="#{producer.save}" value="#{i18n.producer_config_save}"
styleClass="portlet-form-button"/>
- <h:commandButton id="reload-producer"
action="#{producer.reloadConfiguration}"
value="#{i18n.producer_config_cancel}"
+ <h:commandButton id="reload-producer"
action="#{producer.reloadConfiguration}"
+ value="#{i18n.producer_config_cancel}"
styleClass="portlet-form-button"/>
</h:panelGroup>
</h:panelGrid>