JBoss Portal SVN: r11987 - in branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf: common and 1 other directory.
by portal-commits@lists.jboss.org
Author: prabhat.jha(a)jboss.com
Date: 2008-09-25 15:54:26 -0400 (Thu, 25 Sep 2008)
New Revision: 11987
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml
Log:
[JBPORTAL-2166] adding missing ids again
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml 2008-09-25 19:50:52 UTC (rev 11986)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml 2008-09-25 19:54:26 UTC (rev 11987)
@@ -12,11 +12,11 @@
<ui:param name="portalObjectScreen" value="#{bundle.COMMON_DELETE}"/>
<ui:define name="content">
- <f:subview rendered="#{empty portalobjectmgr.selectedDeletingObject}">
+ <f:subview rendered="#{empty portalobjectmgr.selectedDeletingObject}">
<p class="portlet-msg-error">#{bundle.COMMON_INCONSISTENT_STATE}</p>
</f:subview>
- <f:subview rendered="#{not empty portalobjectmgr.selectedDeletingObject}">
+ <f:subview id="delete-view" rendered="#{not empty portalobjectmgr.selectedDeletingObject}">
<div class="portlet-msg">
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml 2008-09-25 19:50:52 UTC (rev 11986)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectTemplate.xhtml 2008-09-25 19:54:26 UTC (rev 11987)
@@ -26,9 +26,9 @@
<ui:decorate template="common/tabContainer.xhtml">
<ui:define name="tab-container-content">
<!-- Path nav -->
- <h:form>
+ <h:form id="obj-temp-form">
<ul class="objectpath">
- <c:forEach items="#{portalobjectmgr.selectedObjectPath}" var="node">
+ <c:forEach items="#{portalobjectmgr.selectedObjectPath}" var="node" varStatus="status">
<c:if test="#{node.type != PortalObject.TYPE_CONTEXT}">
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
</c:if>
@@ -41,7 +41,7 @@
</h:panelGroup>
</c:when>
<c:otherwise>
- <h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="#{node.typeName == 'portal' ? 'actionSelectPortal' : ''}">
+ <h:commandLink id="object-link-#{status.index}" action="#{portalobjectmgr.selectObject}" styleClass="#{node.typeName == 'portal' ? 'actionSelectPortal' : ''}">
<f:param name="id" value="#{node.id}"/>
<c:choose>
<c:when test="#{node.type == PortalObject.TYPE_CONTEXT}">#{bundle.PORTALS}</c:when>
17 years, 7 months
JBoss Portal SVN: r11986 - in branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf: common and 1 other directory.
by portal-commits@lists.jboss.org
Author: prabhat.jha(a)jboss.com
Date: 2008-09-25 15:50:52 -0400 (Thu, 25 Sep 2008)
New Revision: 11986
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml
Log:
[JBPORTAL-2166] adding missing ids again
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml 2008-09-25 19:50:52 UTC (rev 11986)
@@ -13,11 +13,11 @@
<ui:param name="portalObjectScreen" value="#{bundle.COMMON_DELETE}"/>
<ui:define name="content">
- <f:subview rendered="#{empty portalobjectmgr.selectedDeletingObject}">
+ <f:subview rendered="#{empty portalobjectmgr.selectedDeletingObject}">
<p class="portlet-msg-error">#{bundle.COMMON_INCONSISTENT_STATE}</p>
</f:subview>
- <f:subview rendered="#{not empty portalobjectmgr.selectedDeletingObject}">
+ <f:subview id="delete-view" rendered="#{not empty portalobjectmgr.selectedDeletingObject}">
<div class="portlet-msg">
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml 2008-09-25 19:50:52 UTC (rev 11986)
@@ -26,9 +26,9 @@
<ui:decorate template="common/tabContainer.xhtml">
<ui:define name="tab-container-content">
<!-- Path nav -->
- <h:form>
+ <h:form id="obj-temp-form">
<ul class="objectpath">
- <c:forEach items="#{portalobjectmgr.selectedObjectPath}" var="node">
+ <c:forEach items="#{portalobjectmgr.selectedObjectPath}" var="node" varStatus="status">
<c:if test="#{node.type != PortalObject.TYPE_CONTEXT}">
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
</c:if>
@@ -41,7 +41,7 @@
</h:panelGroup>
</c:when>
<c:otherwise>
- <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <h:commandLink id="object-link-#{status.index}" action="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{node.id}"/>
<c:choose>
<c:when test="#{node.type == PortalObject.TYPE_CONTEXT}">#{bundle.PORTALS}</c:when>
17 years, 7 months
JBoss Portal SVN: r11985 - in branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf: common and 1 other directories.
by portal-commits@lists.jboss.org
Author: prabhat.jha(a)jboss.com
Date: 2008-09-25 14:54:59 -0400 (Thu, 25 Sep 2008)
New Revision: 11985
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml
Log:
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/confirm.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -36,12 +36,12 @@
<p class="portlet-class">#{bundle.COMMON_SURE_DELETE} #{portalobjectmgr.selectedObjectType}?</p>
- <h:form>
- <h:commandButton value="#{bundle.COMMON_DELETE}" action="objects" actionListener="#{portalobjectmgr.destroyObject}"
+ <h:form id="confirm-form">
+ <h:commandButton id="delete" value="#{bundle.COMMON_DELETE}" action="objects" actionListener="#{portalobjectmgr.destroyObject}"
styleClass="portlet-form-button portlet-section-buttonrow">
<f:attribute name="objectId" value="#{portalobjectmgr.selectedDeletingObject.id}"/>
</h:commandButton>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="objects"
+ <h:commandButton id="cancel" value="#{bundle.COMMON_CANCEL}" action="objects"
actionListener="#{portalobjectmgr.selectParentObject}"
styleClass="portlet-form-button portlet-section-buttonrow"/>
</h:form>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageErrorHandling.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -14,7 +14,7 @@
</tr>
<tr>
<td valign="top" class="portlet-section-body">
-<h:form>
+<h:form id="edit-page-error-form">
<table class="datatable full-width">
<thead class="portlet-section-header">
<tr>
@@ -29,13 +29,13 @@
<h:outputText value="#{properties.pageControlAccessDenied.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.pageControlAccessDenied.inheritable}"
+ <h:selectBooleanCheckbox id="page-access-check" disabled="#{!properties.pageControlAccessDenied.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.pageControlAccessDenied.inherit}"
value="#{properties.pageControlAccessDenied.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.pageControlAccessDenied.value}"
+ <h:selectOneMenu id="page-access-select" value="#{properties.pageControlAccessDenied.value}"
disabled="#{properties.pageControlAccessDenied.inherited}" onchange="submit();">
<f:selectItems value="#{properties.pageSelectItems}"/>
</h:selectOneMenu>
@@ -46,13 +46,13 @@
<h:outputText value="#{properties.pageControlUnavailable.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.pageControlUnavailable.inheritable}"
+ <h:selectBooleanCheckbox id="page-control-check" disabled="#{!properties.pageControlUnavailable.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.pageControlUnavailable.inherit}"
value="#{properties.pageControlUnavailable.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.pageControlUnavailable.value}"
+ <h:selectOneMenu id="page-control-select" value="#{properties.pageControlUnavailable.value}"
disabled="#{properties.pageControlUnavailable.inherited}" onchange="submit();">
<f:selectItems value="#{properties.pageSelectItems}"/>
</h:selectOneMenu>
@@ -63,13 +63,13 @@
<h:outputText value="#{properties.pageControlError.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.pageControlError.inheritable}"
+ <h:selectBooleanCheckbox id="page-error-check" disabled="#{!properties.pageControlError.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.pageControlError.inherit}"
value="#{properties.pageControlError.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.pageControlError.value}"
+ <h:selectOneMenu id="page-error-select" value="#{properties.pageControlError.value}"
disabled="#{properties.pageControlError.inherited}" onchange="submit();">
<f:selectItems value="#{properties.pageSelectItems}"/>
</h:selectOneMenu>
@@ -80,13 +80,13 @@
<h:outputText value="#{properties.pageControlInternalError.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.pageControlInternalError.inheritable}"
+ <h:selectBooleanCheckbox id="page-internal-check" disabled="#{!properties.pageControlInternalError.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.pageControlInternalError.inherit}"
value="#{properties.pageControlInternalError.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.pageControlInternalError.value}"
+ <h:selectOneMenu id="page-internal-select" value="#{properties.pageControlInternalError.value}"
disabled="#{properties.pageControlInternalError.inherited}" onchange="submit();">
<f:selectItems value="#{properties.pageSelectItems}"/>
</h:selectOneMenu>
@@ -97,13 +97,13 @@
<h:outputText value="#{properties.pageControlNotFound.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.pageControlNotFound.inheritable}"
+ <h:selectBooleanCheckbox id="page-not-found-check" disabled="#{!properties.pageControlNotFound.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.pageControlNotFound.inherit}"
value="#{properties.pageControlNotFound.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.pageControlNotFound.value}"
+ <h:selectOneMenu id="page-not-found-select" value="#{properties.pageControlNotFound.value}"
disabled="#{properties.pageControlNotFound.inherited}" onchange="submit();">
<f:selectItems value="#{properties.pageSelectItems}"/>
</h:selectOneMenu>
@@ -114,19 +114,19 @@
<h:outputText value="#{properties.pageControlResourceURI.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.pageControlResourceURI.inheritable}"
+ <h:selectBooleanCheckbox id="page-res-check" disabled="#{!properties.pageControlResourceURI.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.pageControlResourceURI.inherit}"
value="#{properties.pageControlResourceURI.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:inputText value="#{properties.pageControlResourceURI.value}" size="60"
+ <h:inputText id="page-res-select" value="#{properties.pageControlResourceURI.value}" size="60"
disabled="#{properties.pageControlResourceURI.inherited}"/>
</td>
</tr>
</tbody>
</table>
-<h:commandButton value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button portlet-section-buttonrow"/>
+<h:commandButton id="update" value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button portlet-section-buttonrow"/>
</h:form>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -151,7 +151,7 @@
</div>
</td>
<td>
- <h:selectManyListbox
+ <h:selectManyListbox id="windows-select"
value="#{pageManager.assignedWindows['unknown']}"
size="7" styleClass="windowList portlet-form-field">
<f:selectItems
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPortalErrorHandling.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -16,7 +16,7 @@
<tr>
<td valign="top" class="portlet-section-body">
-<h:form>
+<h:form id="edit-portal-error-form">
<table class="datatable full-width">
<thead class="portlet-section-header">
<tr>
@@ -31,13 +31,13 @@
<h:outputText value="#{properties.portalControlAccessDenied.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.portalControlAccessDenied.inheritable}"
+ <h:selectBooleanCheckbox id="portal-access-check" disabled="#{!properties.portalControlAccessDenied.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.portalControlAccessDenied.inherit}"
value="#{properties.portalControlAccessDenied.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.portalControlAccessDenied.value}"
+ <h:selectOneMenu id="portal-access-select" value="#{properties.portalControlAccessDenied.value}"
disabled="#{properties.portalControlAccessDenied.inherited}"
onchange="submit();">
<f:selectItems value="#{properties.portalSelectItems}"/>
@@ -49,13 +49,13 @@
<h:outputText value="#{properties.portalControlUnavailable.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.portalControlUnavailable.inheritable}"
+ <h:selectBooleanCheckbox id="portal-unavail-check" disabled="#{!properties.portalControlUnavailable.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.portalControlUnavailable.inherit}"
value="#{properties.portalControlUnavailable.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.portalControlUnavailable.value}"
+ <h:selectOneMenu id="portal-unavail-select" value="#{properties.portalControlUnavailable.value}"
disabled="#{properties.portalControlUnavailable.inherited}"
onchange="submit();">
<f:selectItems value="#{properties.portalSelectItems}"/>
@@ -67,13 +67,13 @@
<h:outputText value="#{properties.portalControlError.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.portalControlError.inheritable}"
+ <h:selectBooleanCheckbox id="portal-error-check" disabled="#{!properties.portalControlError.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.portalControlError.inherit}"
value="#{properties.portalControlError.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.portalControlError.value}"
+ <h:selectOneMenu id="portal-error-select" value="#{properties.portalControlError.value}"
disabled="#{properties.portalControlError.inherited}" onchange="submit();">
<f:selectItems value="#{properties.portalSelectItems}"/>
</h:selectOneMenu>
@@ -84,13 +84,13 @@
<h:outputText value="#{properties.portalControlInternalError.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.portalControlInternalError.inheritable}"
+ <h:selectBooleanCheckbox id="portal-internal-check" disabled="#{!properties.portalControlInternalError.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.portalControlInternalError.inherit}"
value="#{properties.portalControlInternalError.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.portalControlInternalError.value}"
+ <h:selectOneMenu id="portal-internal-select" value="#{properties.portalControlInternalError.value}"
disabled="#{properties.portalControlInternalError.inherited}"
onchange="submit();">
<f:selectItems value="#{properties.portalSelectItems}"/>
@@ -102,13 +102,13 @@
<h:outputText value="#{properties.portalControlNotFound.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.portalControlNotFound.inheritable}"
+ <h:selectBooleanCheckbox id="portal-not-found-check" disabled="#{!properties.portalControlNotFound.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.portalControlNotFound.inherit}"
value="#{properties.portalControlNotFound.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:selectOneMenu value="#{properties.portalControlNotFound.value}"
+ <h:selectOneMenu id="portal-not-found-select" value="#{properties.portalControlNotFound.value}"
disabled="#{properties.portalControlNotFound.inherited}" onchange="submit();">
<f:selectItems value="#{properties.portalSelectItems}"/>
</h:selectOneMenu>
@@ -119,19 +119,19 @@
<h:outputText value="#{properties.portalControlResourceURI.displayName}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="#{!properties.portalControlResourceURI.inheritable}"
+ <h:selectBooleanCheckbox id="portal-res-check" disabled="#{!properties.portalControlResourceURI.inheritable}"
onclick="submit();"
valueChangeListener="#{properties.portalControlResourceURI.inherit}"
value="#{properties.portalControlResourceURI.inherited}"/>#{bundle.COMMON_INHERIT_ACTION}
</td>
<td>
- <h:inputText value="#{properties.portalControlResourceURI.value}" size="60"
+ <h:inputText id="portal-res-input" value="#{properties.portalControlResourceURI.value}" size="60"
disabled="#{properties.portalControlResourceURI.inherited}"/>
</td>
</tr>
</tbody>
</table>
-<h:commandButton value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button portlet-section-buttonrow"/>
+<h:commandButton id="update" value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button portlet-section-buttonrow"/>
</h:form>
</td>
</tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPreferences.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -7,7 +7,7 @@
<c:choose>
<c:when test="#{not empty prefs.entries}">
- <h:form>
+ <h:form id="edit-pref-form">
<table class="full-width datatable">
<thead class="portlet-section-header" style="text-align:left;">
<tr>
@@ -25,7 +25,7 @@
<td>
<c:choose>
<c:when test="#{prefs.mutable and pref.readOnly == false}">
- <h:commandLink
+ <h:commandLink id="pref-link-#{status.index}"
rendered="#{pref.readOnly == false}"
action="#{pref.select}">#{pref.name}</h:commandLink>
</c:when>
@@ -36,7 +36,7 @@
<h:outputText value="#{pref.displayName.value}"/>
</td>
<td>
- <h:selectBooleanCheckbox disabled="true" value="#{pref.readOnly}"/>
+ <h:selectBooleanCheckbox id="pref-check-#{status.index}" disabled="true" value="#{pref.readOnly}"/>
</td>
<c:if test="#{prefs.mutable}">
<td>
@@ -55,7 +55,7 @@
</c:choose>
<c:if test="#{prefs.selectedEntry != null}">
- <h:form style="padding: 1em 0 1em 0">
+ <h:form id="edit-exisiting-form" style="padding: 1em 0 1em 0">
<fieldset style="border: 1px solid;">
<legend>#{bundle.COMMON_EDIT_EXISTING_VALUES}</legend>
<table>
@@ -68,7 +68,7 @@
</h:outputLabel>
</td>
<td>
- <h:inputText value="#{prefs.selectedEntry[index]}" styleClass="portlet-form-input-field"/>
+ <h:inputText id="pref-input-#{status.index}" value="#{prefs.selectedEntry[index]}" styleClass="portlet-form-input-field"/>
</td>
<td>
<h:commandButton
@@ -81,7 +81,7 @@
</c:forEach>
<tr>
<td colspan="3">
- <h:commandButton value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button"/>
+ <h:commandButton id="update" value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button"/>
</td>
</tr>
</tbody>
@@ -89,14 +89,14 @@
</fieldset>
</h:form>
- <h:form>
+ <h:form id="append-form">
<fieldset style="border: 1px solid;">
<legend>#{bundle.COMMON_APPEND_VALUE}</legend>
<h:outputLabel for="new_value">
<h:outputText value="#{bundle.COMMON_NEW_VALUE}: " styleClass="portlet-form-field-label"/>
</h:outputLabel>
<h:inputText id="new_value" value="#{prefs.selectedEntry.line}" styleClass="portlet-form-input-field"/>
- <h:commandButton action="#{prefs.selectedEntry.appendLine}" value="#{bundle.COMMON_APPEND}"
+ <h:commandButton id="append-button" action="#{prefs.selectedEntry.appendLine}" value="#{bundle.COMMON_APPEND}"
styleClass="portlet-form-button"/>
</fieldset>
</h:form>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editProperties.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -20,7 +20,7 @@
<tr>
<td class="dotted-blue-vert-rt">
- <h:form>
+ <h:form id="edit-prop-form">
<!-- defines layout of property form -->
<table>
<tbody>
@@ -57,7 +57,7 @@
</tbody>
</table>
<!-- ends layout of property form -->
- <h:commandButton value="#{bundle.COMMON_ADD_PROPERTY_BUTTON}"
+ <h:commandButton id="add-property" value="#{bundle.COMMON_ADD_PROPERTY_BUTTON}"
styleClass="portlet-form-button portlet-section-buttonrow"
action="#{properties.action.updateProperty}"/></h:form>
@@ -79,9 +79,9 @@
<tr>
<td class="portlet-section-body" valign="top">
- <h:form>
+ <h:form id="manage-prop-form">
<!-- defines layout of property table -->
- <h:dataTable value="#{properties.entries}" width="100%" headerClass="portlet-section-header"
+ <h:dataTable id="prop-data-table" value="#{properties.entries}" width="100%" headerClass="portlet-section-header"
styleClass="datatable full-width"
rowClasses="portlet-section-body, portlet-section-alternate" var="prop">
<h:column>
@@ -98,15 +98,15 @@
</h:column>
<h:column>
<f:facet name="header">#{bundle.COMMON_VALUE}</f:facet>
- <h:selectBooleanCheckbox value="#{prop.value}"
+ <h:selectBooleanCheckbox id="prop-read-check" value="#{prop.value}"
readonly="#{prop.readOnly}"
rendered="#{prop.type == 'java.lang.Boolean'}"/>
- <h:inputText styleClass="portlet-form-input-field" value="#{prop.value}"
+ <h:inputText id="prop-value-input" styleClass="portlet-form-input-field" value="#{prop.value}"
readonly="#{prop.readOnly}"
rendered="#{prop.type eq 'java.lang.String' and prop.name ne 'portal.windowInitialState'}"/>
- <h:selectOneMenu styleClass="portlet-form-input-field"
+ <h:selectOneMenu id="prop-value-select" styleClass="portlet-form-input-field"
value="#{prop.value}"
rendered="#{prop.type eq 'java.lang.String' and prop.name eq 'portal.windowInitialState' and (!portalobjectmgr.maximizedStateExists or prop.value eq 'MAXIMIZED')}">
<f:selectItem itemLabel="Choose One..." itemValue=""/>
@@ -115,7 +115,7 @@
<f:selectItem itemLabel="Normal" itemValue="NORMAL"/>
</h:selectOneMenu>
- <h:selectOneMenu styleClass="portlet-form-input-field"
+ <h:selectOneMenu id="prop-value-select1" styleClass="portlet-form-input-field"
value="#{prop.value}" disabled="true"
rendered="#{prop.type eq 'java.lang.String' and prop.name eq 'portal.windowInitialState' and (portalobjectmgr.maximizedStateExists and prop.value ne 'MAXIMIZED')}">
<f:selectItem itemLabel="Minimized" itemValue="MINIMIZED"/>
@@ -125,7 +125,7 @@
</h:column>
<h:column>
<f:facet name="header">#{bundle.COMMON_DELETE}</f:facet>
- <h:commandLink action="#{properties.action.removeProperty}"
+ <h:commandLink id="delete" action="#{properties.action.removeProperty}"
rendered="#{!prop.inherited}">
<h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
<f:param name="name" value="#{prop.name}"/>
@@ -134,9 +134,8 @@
</h:dataTable>
<!-- ends property list -->
- <h:commandButton value="#{bundle.COMMON_UPDATE}"
+ <h:commandButton id="update" value="#{bundle.COMMON_UPDATE}"
styleClass="portlet-form-button portlet-section-buttonrow"/></h:form>
-
</td>
</tr>
</table>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editSecurity.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -5,7 +5,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core">
- <h:form>
+ <h:form id="edit-security-form">
<table class="datatable full-width">
<thead class="portlet-section-header">
<tr>
@@ -36,8 +36,8 @@
</table>
<br />
<div>
- <h:commandButton value="#{bundle.COMMON_UPDATE}" action="#{auth.submit}" styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{auth.cancel}" styleClass="portlet-form-button" immediate="true"/>
+ <h:commandButton id="update" value="#{bundle.COMMON_UPDATE}" action="#{auth.submit}" styleClass="portlet-form-button"/>
+ <h:commandButton id="cancel" value="#{bundle.COMMON_CANCEL}" action="#{auth.cancel}" styleClass="portlet-form-button" immediate="true"/>
</div>
</h:form>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editTheme.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -1,7 +1,7 @@
<div xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
- <h:form>
+ <h:form id="edit-theme-form">
<table class="full-width datatable">
<thead class="portlet-section-header">
<tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editWindowTheme.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -4,7 +4,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
- <h:form>
+ <h:form id="edit-window-theme-form">
<table class="full-width datatable">
<thead class="portlet-section-header">
<tr>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -7,13 +7,13 @@
xmlns:portal="http://www.jboss.org/portal">
<div class="details-container">
-<h:form>
+<h:form id="show-portlet-detail-form">
<div class="full-width details-header">
<div class="main-header">
<br/>
<img src="#{portlet.smallIconLocation}" alt="" style="margin: 0 5px 0 5px;" class="float-left"/>
- <h:commandLink
+ <h:commandLink id="select"
action="#{portletmgr.selectPortlet}">
<f:param name="id" value="#{portlet.context.id}"/>
<f:param name="plugin" value="manager"/>
@@ -131,12 +131,12 @@
<h3 class="blue">#{bundle.COMMON_ADD_INSTANCE_DISPLAY_NAMES}</h3>
<div class="pad5">
- <h:form style="background-color:transparent;width:100%;margin:0;padding:0;display:inline;">
+ <h:form id="add-display-name-form" style="background-color:transparent;width:100%;margin:0;padding:0;display:inline;">
<h:inputText id="newName" value="#{instanceDisplayNameAction.newText}" required="true"/>
<h:selectOneMenu id="locales" value="#{instanceDisplayNameAction.newLocale}">
<f:selectItems value="#{instanceDisplayNameAction.locales}"/>
</h:selectOneMenu>
- <h:commandButton value="#{instanceDisplayNameAction.newText ne null ? 'Modify' : 'Add'} Name"
+ <h:commandButton id="addDisplay" value="#{instanceDisplayNameAction.newText ne null ? 'Modify' : 'Add'} Name"
action="#{instanceDisplayNameAction.addDisplayName}"
styleClass="portlet-form-button"/>
</h:form>
@@ -145,8 +145,8 @@
<h3 class="blue">#{bundle.COMMON_CURRENT_INSTANCE_DISPLAY_NAMES}</h3>
<div class="pad5">
- <h:form style="display:inline;width:100%;">
- <h:dataTable var="value" value="#{instanceDisplayNameAction.currentLocales}"
+ <h:form id="instance-display-form" style="display:inline;width:100%;">
+ <h:dataTable id="locale-datatable" var="value" value="#{instanceDisplayNameAction.currentLocales}"
styleClass="objectList datatable"
rowClasses="portlet-section-body,portlet-section-alternate-blue"
columnClasses="objectNameColumn, objectActionColumn"
@@ -168,7 +168,7 @@
<h:outputText value="#{bundle.COMMON_DELETE}"/>
</f:facet>
- <div style="width:150px"><h:commandLink action="#{instanceDisplayNameAction.editDisplayName}">
+ <div style="width:150px"><h:commandLink id="delete-link" action="#{instanceDisplayNameAction.editDisplayName}">
<h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
<f:param name="locale" value="#{value.locale}"/>
<f:param name="editAction" value="delete"/>
@@ -180,7 +180,7 @@
</f:facet>
<div style="width:150px">
- <h:commandLink action="#{instanceDisplayNameAction.editDisplayName}">
+ <h:commandLinkid="edit-link" action="#{instanceDisplayNameAction.editDisplayName}">
<h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
<f:param name="locale" value="#{value.locale}"/>
<f:param name="editAction" value="rename"/>
@@ -229,6 +229,4 @@
</div>
<br class="clear"/>
</div>
-
-
</div>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteInstance.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -10,10 +10,10 @@
<ui:composition template="instancesTemplate.xhtml">
<ui:define name="content">
- <h:form>
+ <h:form id="confirm-delete-form">
<ul class="objectpath">
<li class="pathItem">
- <h:commandLink action="instances">#{bundle.PORTLET_INSTANCES}</h:commandLink>
+ <h:commandLink id="instance-link" action="instances">#{bundle.PORTLET_INSTANCES}</h:commandLink>
</li>
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
@@ -35,12 +35,12 @@
<p class="portlet-class">#{bundle.ARE_YOU_SURE_DELETE}</p>
- <h:form>
- <h:commandButton value="#{bundle.COMMON_DELETE}" action="instances" actionListener="#{instancemgr.deleteInstance}"
+ <h:form id="confirm-delete-form1">
+ <h:commandButton id="delete" value="#{bundle.COMMON_DELETE}" action="instances" actionListener="#{instancemgr.deleteInstance}"
styleClass="portlet-form-button portlet-section-buttonrow">
<f:attribute name="instanceId" value="#{instancemgr.selectedInstance.id}"/>
</h:commandButton>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="instances" actionListener="objects"
+ <h:commandButton id="cancel" value="#{bundle.COMMON_CANCEL}" action="instances" actionListener="objects"
styleClass="portlet-form-button portlet-section-buttonrow"/>
</h:form>
</div>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/dashboardsTemplate.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -8,17 +8,17 @@
<!-- Common nav -->
<f:loadBundle basename="Resource" var="bundle" />
- <h:form>
+ <h:form id="dashboard-temp-form">
<ul class="topnav">
<li>
- <h:commandLink value="#{bundle.PORTAL_OBJECTS}" action="objects"
+ <h:commandLink id="obj-link" value="#{bundle.PORTAL_OBJECTS}" action="objects"
actionListener="#{portalobjectmgr.selectRootObject}"/>
</li>
<li>
- <h:commandLink value="#{bundle.PORTLET_INSTANCES}" action="instances"/>
+ <h:commandLink id="instance-link" value="#{bundle.PORTLET_INSTANCES}" action="instances"/>
</li>
<li>
- <h:commandLink value="#{bundle.PORTLET_DEFINITIONS}" action="#{portletmgr.selectPortlet}"/>
+ <h:commandLink id="def-link" value="#{bundle.PORTLET_DEFINITIONS}" action="#{portletmgr.selectPortlet}"/>
</li>
<li id="currentTab">#{bundle.DASHBOARDS}</li>
</ul>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/displayNameObject.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -10,7 +10,7 @@
<ui:define name="content">
<br/><br/>
<div class="float-left third-width-pad5">
- <h:form id="displayNameForm">
+ <h:form id="display-name-form">
<h3 class="sectionTitle zero">#{bundle.ADD_DISPLAY_NAMES}</h3>
<div class="portlet-area-body">
@@ -18,19 +18,19 @@
<h:selectOneMenu id="locales" value="#{addDisplayNameAction.newLocale}">
<f:selectItems value="#{addDisplayNameAction.locales}"/>
</h:selectOneMenu>
- <h:commandButton value="#{addDisplayNameAction.newText ne null ? 'Modify' : 'Add'} Name" action="#{addDisplayNameAction.addDisplayName}"
+ <h:commandButton id="add-display" value="#{addDisplayNameAction.newText ne null ? 'Modify' : 'Add'} Name" action="#{addDisplayNameAction.addDisplayName}"
styleClass="portlet-form-button"/>
</div>
</h:form>
</div>
<div class="float-left two-third-width-pad5">
- <h:form>
+ <h:form id="display-name-form1">
<h3 class="sectionTitle zero">#{bundle.CURRENT_DISPLAY_NAMES}</h3>
<div class="portlet-area-body">
- <h:dataTable var="value" value="#{addDisplayNameAction.currentLocales}" styleClass="objectList datatable"
+ <h:dataTable id="locale-datatable" var="value" value="#{addDisplayNameAction.currentLocales}" styleClass="objectList datatable"
rowClasses="portlet-section-body,portlet-section-alternate"
columnClasses="objectNameColumn, objectActionColumn"
headerClass="portlet-section-header">
@@ -51,7 +51,7 @@
<h:outputText value="#{bundle.COMMON_DELETE}"/>
</f:facet>
- <div style="width:150px"><h:commandLink action="#{addDisplayNameAction.editDisplayName}">
+ <div style="width:150px"><h:commandLink id="delete" action="#{addDisplayNameAction.editDisplayName}">
<h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
<f:param name="locale" value="#{value.locale}"/>
<f:param name="editAction" value="delete"/>
@@ -62,7 +62,7 @@
<h:outputText value="#{bundle.RENAME}"/>
</f:facet>
- <div style="width:150px"><h:commandLink action="#{addDisplayNameAction.editDisplayName}">
+ <div style="width:150px"><h:commandLink id="rename" action="#{addDisplayNameAction.editDisplayName}">
<h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
<f:param name="locale" value="#{value.locale}"/>
<f:param name="editAction" value="rename"/>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editContext.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -15,8 +15,8 @@
<c:otherwise><span class="objectName">#{portalobjectmgr.selectedObject.name}</span> #{bundle.PORTAL}</c:otherwise>
</c:choose>
</h3>
- <h:form>
- <h:commandLink action="editProperties" actionListener="#{portalobjectmgr.selectObject}"
+ <h:form id="edit-context-form">
+ <h:commandLink id="object-link" action="editProperties" actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionProperties">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.COMMON_PROPERTIES}
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -12,45 +12,45 @@
#{portalobjectmgr.selectedObject.typeName}</h3>
<h:form id="admin-portal-form">
- <h:panelGrid columns="11" cellpadding="0" cellspacing="0" border="0">
- <h:commandLink rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}"
+ <h:panelGrid id="page-panel" columns="11" cellpadding="0" cellspacing="0" border="0">
+ <h:commandLink id="edit-layout-link" rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}"
action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionLayout">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.PAGE_LAYOUT}
</h:commandLink>
- <h:commandLink action="editPageSecurity" styleClass="actionSecurity"
+ <h:commandLink id="edit-security-link" action="editPageSecurity" styleClass="actionSecurity"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.SECURITY}
</h:commandLink>
- <h:commandLink action="editProperties" styleClass="actionProperties"
+ <h:commandLink id="edit-prop-link" action="editProperties" styleClass="actionProperties"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.COMMON_PROPERTIES}
</h:commandLink>
- <h:commandLink action="editPageTheme" styleClass="actionTheme"
+ <h:commandLink id="edit-theme-link" action="editPageTheme" styleClass="actionTheme"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.THEME}
</h:commandLink>
- <h:commandLink rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template')))}"
+ <h:commandLink id="rename-link" rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template')))}"
action="renameObject" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
#{bundle.RENAME}
</h:commandLink>
- <h:commandLink
+ <h:commandLink id="rename-display-link"
action="#{addDisplayNameAction.editDisplayNames}" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionDisplayNames">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}" />
#{bundle.DISPLAY_NAMES}
</h:commandLink>
- <h:commandLink action="#{coordinationManager.editCoordination}"
+ <h:commandLink id="edit-coord-link" action="#{coordinationManager.editCoordination}"
rendered="#{'page' eq portalobjectmgr.selectedObjectType}"
actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionCoordination">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}" />
#{bundle.COORDINATION_COORDINATION}
</h:commandLink>
- <h:commandLink action="confirm" styleClass="actionDelete"
+ <h:commandLink id="delete-link" action="confirm" styleClass="actionDelete"
rendered="#{!((portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or (portalobjectmgr.selectedObject.name == 'template') or (portalobjectmgr.selectedObject.default)))}"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editProperties.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -15,14 +15,14 @@
<p class="portlet-area-header">#{bundle.EVENT_LISTENER_BINDING}</p>
<div class="portlet-area-body tenpx-top-bottom">
- <h:form>
+ <h:form id="edit-prop-form">
<h:outputLabel for="listener" styleClass="portlet-form-field-label">
#{bundle.CHOOSE_ID_PORTALEVENTLISTENER} #{portalobjectmgr.selectedObjectType}:
</h:outputLabel>
<h:selectOneMenu id="listener" value="#{portalobjectmgr.selectedObject.listener}">
<f:selectItems value="#{portalobjectmgr.listenerIds}"/>
</h:selectOneMenu>
- <h:commandButton value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button"/>
+ <h:commandButton id="update" value="#{bundle.COMMON_UPDATE}" styleClass="portlet-form-button"/>
</h:form>
</div>
</div>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/instances.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -85,7 +85,7 @@
<c:forEach begin="0" end="#{(instancemgr.instanceCount - 1)/ instancemgr.paginationSize}" step="1"
var="index">
<li class="#{index == (instancemgr.selectedFrom / instancemgr.paginationSize)? 'selected' : ''}">
- <h:commandLink action="#{instancemgr.selectFrom}">
+ <h:commandLink id="pagination-#{index}" action="#{instancemgr.selectFrom}">
<f:param name="from" value="#{index * instancemgr.paginationSize}"/>
<h:outputText value="#{index * instancemgr.paginationSize}"/>
</h:commandLink>
@@ -99,10 +99,10 @@
<c:if test="#{instancemgr.selectedPlugin == 'info'}">
<!-- Path nav -->
- <h:form>
+ <h:form id="instance-form1">
<ul class="objectpath">
<li class="pathItem">
- <h:commandLink action="#{instancemgr.selectInstance}">#{bundle.PORTLET_INSTANCES}</h:commandLink>
+ <h:commandLink id="instance-link" action="#{instancemgr.selectInstance}">#{bundle.PORTLET_INSTANCES}</h:commandLink>
</li>
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
@@ -127,10 +127,10 @@
<c:if test="#{instancemgr.selectedPlugin == 'preferences'}">
<!-- Path nav -->
- <h:form>
+ <h:form id="instance-form2">
<ul class="objectpath">
<li class="pathItem">
- <h:commandLink action="#{instancemgr.selectInstance}">#{bundle.PORTLET_INSTANCES}</h:commandLink>
+ <h:commandLink id="instance-link" action="#{instancemgr.selectInstance}">#{bundle.PORTLET_INSTANCES}</h:commandLink>
</li>
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
@@ -141,23 +141,23 @@
<br/>
<div class="property-container">
- <ui:include src="common/editPreferences.xhtml">
- <ui:param name="prefs" value="#{instancemgr.selectedPrefs}"/>
- </ui:include>
- <br />
- <h:form>
- <h:commandButton value="#{bundle.SAVE}" action="#{instancemgr.updatePrefs}" styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{instancemgr.cancelPrefs}" styleClass="portlet-form-button"/>
- </h:form>
+ <ui:include src="common/editPreferences.xhtml">
+ <ui:param name="prefs" value="#{instancemgr.selectedPrefs}"/>
+ </ui:include>
+ <br />
+ <h:form>
+ <h:commandButton id="save" value="#{bundle.SAVE}" action="#{instancemgr.updatePrefs}" styleClass="portlet-form-button"/>
+ <h:commandButton id="cancel" value="#{bundle.COMMON_CANCEL}" action="#{instancemgr.cancelPrefs}" styleClass="portlet-form-button"/>
+ </h:form>
</div>
</c:if>
<c:if test="#{instancemgr.selectedPlugin == 'security'}">
<!-- Path nav -->
- <h:form>
+ <h:form id="instance-form3">
<ul class="objectpath">
<li class="pathItem">
- <h:commandLink action="#{instancemgr.selectInstance}">#{bundle.PORTLET_INSTANCES}</h:commandLink>
+ <h:commandLink id="instance-link" action="#{instancemgr.selectInstance}">#{bundle.PORTLET_INSTANCES}</h:commandLink>
</li>
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -7,10 +7,10 @@
xmlns:pfc="http://www.jboss.com/portal/facelet/common"
xmlns:c="http://java.sun.com/jstl/core">
-<h:form>
+<h:form id="obj-nav-form">>
<c:if test="#{not empty portalobjectmgr.selectedObject.portals}">
- <h:dataTable var="object" value="#{portalobjectmgr.selectedObject.portals}" styleClass="objectList datatable"
+ <h:dataTable id="portal-datatable" var="object" value="#{portalobjectmgr.selectedObject.portals}" styleClass="objectList datatable"
rowClasses="portlet-section-body,portlet-section-alternate"
columnClasses="objectNameColumn, objectActionColumn"
headerClass="portlet-section-header">
@@ -18,7 +18,7 @@
<f:facet name="header">
<h:outputText value="#{bundle.WIZARD_PORTAL}"/>
</f:facet>
- <h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="actionSelectPortal">#{object.name}
+ <h:commandLink id="object-iid-link" action="#{portalobjectmgr.selectObject}" styleClass="actionSelectPortal">#{object.name}
<f:param name="id" value="#{object.id}"/>
</h:commandLink>
</h:column>
@@ -27,20 +27,20 @@
<h:outputText value="#{bundle.ACTIONS}"/>
</f:facet>
<h:panelGrid columns="7" cellpadding="0" cellspacing="0" border="0">
- <h:commandLink action="editPortalSecurity" actionListener="#{portalobjectmgr.selectObject}"
+ <h:commandLink id="security-link" action="editPortalSecurity" actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionSecurity">
<f:param name="id" value="#{object.id}"/>#{bundle.SECURITY}
</h:commandLink>
- <h:commandLink action="editProperties" styleClass="actionProperties"
+ <h:commandLink id="prop-link" action="editProperties" styleClass="actionProperties"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>#{bundle.COMMON_PROPERTIES}
</h:commandLink>
- <h:commandLink action="editPortalTheme" styleClass="actionTheme"
+ <h:commandLink id="theme-link" action="editPortalTheme" styleClass="actionTheme"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.THEME}
</h:commandLink>
- <h:commandLink action="renameObject" actionListener="#{portalobjectmgr.selectObject}"
+ <h:commandLink id="rename" action="renameObject" actionListener="#{portalobjectmgr.selectObject}"
rendered="#{(object.name != 'admin') and (object.name != 'template')}"
styleClass="actionRename">
<h:outputText value="#{bundle.RENAME}"/>
@@ -48,13 +48,13 @@
</h:commandLink>
- <h:commandLink action="confirm" styleClass="actionDelete" rendered="#{(object.name != 'admin') and (object.name != 'template') and (not object.default)}"
+ <h:commandLink id="delete" action="confirm" styleClass="actionDelete" rendered="#{(object.name != 'admin') and (object.name != 'template') and (not object.default)}"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.COMMON_DELETE}
</h:commandLink>
- <h:commandLink styleClass="actionMakeDefault" rendered="#{not object.default}"
+ <h:commandLink id="default-link" styleClass="actionMakeDefault" rendered="#{not object.default}"
action="#{portalobjectmgr.makeObjectDefault}">
<f:param name="id" value="#{object.id}"/>
#{bundle.MAKE_DEFAULT}
@@ -67,7 +67,7 @@
</c:if>
<c:if test="#{not empty portalobjectmgr.selectedObject.pages}">
- <h:dataTable var="object" value="#{portalobjectmgr.selectedObject.pages}" styleClass="objectList datatable"
+ <h:dataTable id="pages-datatable" var="object" value="#{portalobjectmgr.selectedObject.pages}" styleClass="objectList datatable"
columnClasses="objectNameColumn, objectActionColumn"
rowClasses="portlet-section-body,portlet-section-alternate"
headerClass="portlet-section-header">
@@ -75,7 +75,7 @@
<f:facet name="header">
<h:outputText value="#{bundle.WIZARD_PAGE}"/>
</f:facet>
- <h:commandLink action="#{portalobjectmgr.selectObject}">#{object.name}
+ <h:commandLink id="object-link" action="#{portalobjectmgr.selectObject}">#{object.name}
<f:param name="id" value="#{object.id}"/>
</h:commandLink>
</h:column>
@@ -84,45 +84,45 @@
<h:outputText value="#{bundle.ACTIONS}"/>
</f:facet>
- <h:commandLink action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}"
+ <h:commandLink id="edit-page-layout" action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionLayout float-left">
<f:param name="id" value="#{object.id}"/>
#{bundle.PAGE_LAYOUT}
</h:commandLink>
- <h:commandLink action="editPageSecurity" styleClass="actionSecurity float-left"
+ <h:commandLink id="security-link action="editPageSecurity" styleClass="actionSecurity float-left"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>#{bundle.SECURITY}
</h:commandLink>
- <h:commandLink action="editProperties" styleClass="actionProperties float-left"
+ <h:commandLink id="prop-link" action="editProperties" styleClass="actionProperties float-left"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>#{bundle.COMMON_PROPERTIES}
</h:commandLink>
- <h:commandLink action="editPageTheme" styleClass="actionTheme float-left"
+ <h:commandLink id="theme-link" action="editPageTheme" styleClass="actionTheme float-left"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.THEME}
</h:commandLink>
- <h:commandLink action="renameObject" styleClass="actionRename float-left"
+ <h:commandLink id="rename-link" action="renameObject" styleClass="actionRename float-left"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.RENAME}
</h:commandLink>
- <h:commandLink action="#{addDisplayNameAction.editDisplayNames}" styleClass="actionDisplayNames float-left"
+ <h:commandLink id="rename-display" action="#{addDisplayNameAction.editDisplayNames}" styleClass="actionDisplayNames float-left"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.DISPLAY_NAMES}
</h:commandLink>
- <h:commandLink action="#{coordinationManager.editCoordination}" styleClass="actionCoordination float-left"
+ <h:commandLink id="edit-coord" action="#{coordinationManager.editCoordination}" styleClass="actionCoordination float-left"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.COORDINATION_COORDINATION}
</h:commandLink>
- <h:commandLink rendered="#{not object.default}" action="confirm" styleClass="actionDelete float-left"
+ <h:commandLink id="delete-link" rendered="#{not object.default}" action="confirm" styleClass="actionDelete float-left"
actionListener="#{portalobjectmgr.selectDeletingObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.COMMON_DELETE}
</h:commandLink>
- <h:commandLink styleClass="actionMakeDefault float-left" rendered="#{not object.default}"
+ <h:commandLink id="default-link" styleClass="actionMakeDefault float-left" rendered="#{not object.default}"
action="#{portalobjectmgr.makeObjectDefault}">
<f:param name="id" value="#{object.id}"/>
#{bundle.MAKE_DEFAULT}
@@ -141,7 +141,7 @@
<ui:param name="maximizedStateExists" value="#{portalobjectmgr.selectedObject.maximizedStateExists}"/>
- <h:dataTable var="object" value="#{portalobjectmgr.selectedObject.windows}" styleClass="objectList datatable"
+ <h:dataTable id="windows-datatable" var="object" value="#{portalobjectmgr.selectedObject.windows}" styleClass="objectList datatable"
rowClasses="portlet-section-body,portlet-section-alternate"
columnClasses="objectNameColumn, objectActionColumn"
headerClass="portlet-section-header">
@@ -169,7 +169,7 @@
<h:outputText value="#{object.name}"
rendered="#{fn:startsWith(object.declaredProperties['portal.windowContentType'], 'widget/')}"/>
- <h:commandLink action="#{portalobjectmgr.selectObject}"
+ <h:commandLink id="window-name-link" action="#{portalobjectmgr.selectObject}"
rendered="#{! fn:startsWith(object.declaredProperties['portal.windowContentType'], 'widget/')}">
<h:outputText value="#{object.name}"/>
<f:param name="id" value="#{object.id}"/>
@@ -182,19 +182,19 @@
<h:outputText value="#{bundle.ACTIONS}"/>
</f:facet>
<h:panelGrid columns="7" cellpadding="0" cellspacing="0" border="0">
- <h:commandLink action="editWindowTheme" actionListener="#{portalobjectmgr.selectObject}"
+ <h:commandLink id="theme-link" action="editWindowTheme" actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionTheme">
<f:param name="id" value="#{object.id}"/>
#{bundle.THEME}
- </h:commandLink> <h:commandLink action="editProperties" styleClass="actionProperties"
+ </h:commandLink> <h:commandLink id="edit-prop-link" action="editProperties" styleClass="actionProperties"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
<f:param name="maximizedStateExists" value="#{portalobjectmgr.selectedObject.maximizedStateExists}"/>#{bundle.COMMON_PROPERTIES}
- </h:commandLink> <h:commandLink action="renameObject" styleClass="actionRename"
+ </h:commandLink> <h:commandLink id="rename-link" action="renameObject" styleClass="actionRename"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.RENAME}
- </h:commandLink> <h:commandLink action="confirm" actionListener="#{portalobjectmgr.selectDeletingObject}"
+ </h:commandLink> <h:commandLink id="delete-link" action="confirm" actionListener="#{portalobjectmgr.selectDeletingObject}"
styleClass="actionDelete">
<f:param name="id" value="#{object.id}"/>
#{bundle.COMMON_DELETE}
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/portlets.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -113,10 +113,10 @@
<c:if test="#{portletmgr.selectedPlugin == 'manager'}">
<!-- Path nav -->
- <h:form>
+ <h:form id="man-form">
<ul class="objectpath">
<li class="pathItem">
- <h:commandLink action="#{portletmgr.selectPortlet}">#{bundle.PORTLET_DEFINITIONS}</h:commandLink>
+ <h:commandLink id="def-link" action="#{portletmgr.selectPortlet}">#{bundle.PORTLET_DEFINITIONS}</h:commandLink>
</li>
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
@@ -133,10 +133,10 @@
<c:if test="#{portletmgr.selectedPlugin == 'preferences'}">
<!-- Path nav -->
- <h:form>
+ <h:form id="pref-form">
<ul class="objectpath">
<li class="pathItem">
- <h:commandLink action="#{portletmgr.selectPortlet}">#{bundle.PORTLET_DEFINITIONS}</h:commandLink>
+ <h:commandLink id="def-link" action="#{portletmgr.selectPortlet}">#{bundle.PORTLET_DEFINITIONS}</h:commandLink>
</li>
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/renameObject.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -14,9 +14,9 @@
<p>#{bundle.RENAME_THE} <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
#{portalobjectmgr.selectedObjectType} #{bundle.TO}:
<h:inputText id="newName" value="#{renameAction.newName}"/>
- <h:commandButton value="#{bundle.RENAME}" action="#{renameAction.execute}"
+ <h:commandButton id="rename" value="#{bundle.RENAME}" action="#{renameAction.execute}"
styleClass="portlet-form-button portlet-section-buttonrow"/>
- <h:commandButton value="#{bundle.CANCEL}" action="objects"
+ <h:commandButton id="cancel" value="#{bundle.CANCEL}" action="objects"
styleClass="portlet-form-button portlet-section-buttonrow"/>
</p>
</h:form>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowTpl.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -26,7 +26,7 @@
<c:otherwise>
<c:choose>
<c:when test="#{newWindowWizard.enabled[0]}">
- <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <h:form id="new-window-wiz-form"><h:commandLink id="goto-link" action="#{newWindowWizard.goTo}">
<f:param name="step" value="0"/>
<div class="wizardStepBox">
@@ -58,7 +58,7 @@
<c:otherwise>
<c:choose>
<c:when test="#{newWindowWizard.enabled[1]}">
- <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <h:form id="new-window-wiz-form"><h:commandLink id="goto-link" action="#{newWindowWizard.goTo}">
<f:param name="step" value="1"/>
<div class="wizardStepBox">
@@ -90,7 +90,7 @@
<c:otherwise>
<c:choose>
<c:when test="#{newWindowWizard.enabled[2]}">
- <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <h:form id="new-window-wiz-form"><h:commandLink id="goto-link" action="#{newWindowWizard.goTo}">
<f:param name="step" value="2"/>
<div class="wizardStepBox">
@@ -122,7 +122,7 @@
<c:otherwise>
<c:choose>
<c:when test="#{newWindowWizard.enabled[3]}">
- <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <h:form id="new-window-wiz-form"><h:commandLink id="goto-link" action="#{newWindowWizard.goTo}">
<f:param name="step" value="3"/>
<div class="wizardStepBox">
@@ -154,7 +154,7 @@
<c:otherwise>
<c:choose>
<c:when test="#{newWindowWizard.enabled[4]}">
- <h:form><h:commandLink action="#{newWindowWizard.goTo}">
+ <h:form id="new-window-wiz-form"><h:commandLink id="goto-link" action="#{newWindowWizard.goTo}">
<f:param name="step" value="4"/>
<div class="wizardStepBox">
@@ -186,17 +186,17 @@
</div>
<div class="wizardButtonBox">
- <h:form>
- <h:commandButton rendered="#{newWindowWizard.currentStep gt 0}" value="#{bundle.WIZARD_PREVIOUS}"
+ <h:form id="wiz-nav-form">
+ <h:commandButton id="previous" rendered="#{newWindowWizard.currentStep gt 0}" value="#{bundle.WIZARD_PREVIOUS}"
action="#{newWindowWizard.previous}" styleClass="portlet-form-button"/>
- <h:commandButton
+ <h:commandButton id="next"
rendered="#{newWindowWizard.currentStep lt 4 and newWindowWizard.enabled[newWindowWizard.currentStep + 1]}"
value="#{bundle.WIZARD_NEXT}" action="#{newWindowWizard.next}" styleClass="portlet-form-button"/>
</h:form>
</div>
-<h:form>
- <p style="text-align: right;"><h:commandLink action="advancedMode">#{bundle.WIZARD_SWITCH_ADVANCED_MODE}</h:commandLink></p>
+<h:form id="advance-form">
+ <p style="text-align: right;"><h:commandLink id="advanced-link" action="advancedMode">#{bundle.WIZARD_SWITCH_ADVANCED_MODE}</h:commandLink></p>
</h:form>
</div>
</div>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/newWindowWizardConfirm.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -28,9 +28,9 @@
</tr>
</table>
- <h:form>
- <h:commandButton value="#{bundle.WIZARD_CONFIRM}" action="#{newWindowWizard.createWindow}" styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{newWindowWizard.cancel}" styleClass="portlet-form-button"/>
+ <h:form id="wiz-conf-form">
+ <h:commandButton id="confirm" value="#{bundle.WIZARD_CONFIRM}" action="#{newWindowWizard.createWindow}" styleClass="portlet-form-button"/>
+ <h:commandButton id="cancel" value="#{bundle.COMMON_CANCEL}" action="#{newWindowWizard.cancel}" styleClass="portlet-form-button"/>
</h:form>
</ui:define>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPage.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -17,8 +17,8 @@
</tr>
</tbody>
<tbody>
- <h:form>
- <h:commandLink action="#{newWindowWizard.up}"
+ <h:form id="wiz-page-form">
+ <h:commandLink id="parent-link" action="#{newWindowWizard.up}"
rendered="#{newWindowWizard.selectedParentPage.type != PortalObject.TYPE_PORTAL}">
<h:outputText value="#{bundle.COMMON_UP}"/>
<f:param name="id" value="#{newWindowWizard.selectedParentPageId}"/>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortal.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -16,12 +16,12 @@
</tr>
</tbody>
<tbody>
- <h:form>
+ <h:form id="portal-wiz-form">
<c:forEach items="#{newWindowWizard.portals}" var="object" varStatus="status">
<tr
class="#{object.id == newWindowWizard.selectedPortalId ? 'portlet-section-selected' : status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
<td>
- <h:commandLink action="#{newWindowWizard.selectPortal}">
+ <h:commandLink id="portal-link-#{status.index}" action="#{newWindowWizard.selectPortal}">
<h:outputText value="#{object.name}"/>
<f:param name="id" value="#{object.id}"/>
</h:commandLink>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectPortlet.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -7,17 +7,17 @@
<f:loadBundle basename="Resource" var="bundle" />
<ui:composition template="newWindowTpl.xhtml">
<ui:define name="content">
- <h:form>
+ <h:form id="portlet-wiz-form">
<h:outputLabel for="menu">
<h:outputText value="#{bundle.WIZARD_PORTLET_PROVIDER}: " styleClass="portlet-form-field-label"/>
</h:outputLabel>
<h:selectOneMenu id="menu" styleClass="portlet-form-field" value="#{portletmgr.selectedPortletInvokerId}">
<f:selectItems value="#{portletmgr.portletInvokerItems}"/>
</h:selectOneMenu>
- <h:commandButton value="#{bundle.WIZARD_CHANGE}" styleClass="portlet-form-button"/>
+ <h:commandButton id="wiz-change" value="#{bundle.WIZARD_CHANGE}" styleClass="portlet-form-button"/>
</h:form>
- <h:form>
+ <h:form id="portlet-wiz-form1">
<ul class="pagination property-container">
<c:forEach begin="0" end="#{(portletmgr.portletCount - 1)/portletmgr.paginationSize}" step="1"
var="index">
@@ -40,7 +40,7 @@
<tr
class="#{portlet.context.id == newWindowWizard.selectedPortletId ? 'portlet-section-selected' : (status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate')}">
<td title="#{portlet.description.value}">
- <h:commandLink action="#{newWindowWizard.selectPortlet}">
+ <h:commandLink id="portlet-link-#{status.index}" action="#{newWindowWizard.selectPortlet}">
<h:outputText>#{portlet.name}</h:outputText>
<f:param name="id" value="#{portlet.context.id}"/>
<f:param name="portletInvokerId" value="#{portletmgr.selectedPortletInvokerId}"/>
@@ -58,7 +58,7 @@
<c:forEach begin="0" end="#{(portletmgr.portletCount - 1)/portletmgr.paginationSize}" step="1"
var="index">
<li class="#{index == portletmgr.selectedFrom ? 'selected' : ''}">
- <h:commandLink action="#{portletmgr.selectFrom}">
+ <h:commandLink id="pagination-#{index}" action="#{portletmgr.selectFrom}">
<f:param name="from" value="#{index * portletmgr.paginationSize}"/>
<h:outputText value="#{index * portletmgr.paginationSize}"/>
</h:commandLink>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/wizard/selectRegion.xhtml 2008-09-25 18:54:59 UTC (rev 11985)
@@ -17,12 +17,12 @@
</tr>
</tbody>
<tbody>
- <h:form>
+ <h:form id="region-wiz-form">
<c:forEach items="#{newWindowWizard.regions}" var="object" varStatus="status">
<tr
class="#{object == newWindowWizard.selectedRegionId ? 'portlet-section-selected' : status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
<td>
- <h:commandLink action="#{newWindowWizard.selectRegion}">
+ <h:commandLink id="region-#{status.index}" action="#{newWindowWizard.selectRegion}">
<h:outputText value="#{object}"/>
<f:param name="name" value="#{object}"/>
</h:commandLink>
17 years, 7 months
JBoss Portal SVN: r11984 - in branches/JBoss_Portal_Branch_2_7: core-admin/src/resources/portal-admin-war/WEB-INF and 8 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-09-25 11:47:41 -0400 (Thu, 25 Sep 2008)
New Revision: 11984
Added:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java
Removed:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/CoordinationManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/EventWiringManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/ParameterBindingManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/QNameSelectItem.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/common/template.xhtml
Log:
- JBPORTAL-2148:
+ Moved ManagedBean and BeanContext to faces module.
+ Extracted methods to ManagedBean
- Coordination GUI:
+ Fixed localization of parameterized messages.
+ Removed value change listener that wasn't used
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/CoordinationManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/CoordinationManagerBean.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/CoordinationManagerBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -22,7 +22,6 @@
package org.jboss.portal.core.admin.ui.coordination;
-import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.core.admin.ui.PortalObjectManagerBean;
import org.jboss.portal.core.controller.coordination.CoordinationConfigurator;
import org.jboss.portal.core.controller.coordination.IllegalCoordinationException;
@@ -36,6 +35,7 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.faces.gui.ManagedBean;
import org.jboss.portal.portlet.info.PortletInfo;
import javax.faces.context.FacesContext;
@@ -50,7 +50,7 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
-public class CoordinationManagerBean
+public class CoordinationManagerBean extends ManagedBean
{
private PortalObjectManagerBean pomb;
@@ -68,21 +68,24 @@
private enum CoordinationType
{
- wiring() {
- String localizationKey()
- {
- return "COORDINATION_WIRING";
- }},
- parameter() {
- String localizationKey()
- {
- return "COORDINATION_PARAMETER";
- }},
- alias() {
- String localizationKey()
- {
- return "COORDINATION_ALIAS";
- }};
+ wiring()
+ {
+ String localizationKey()
+ {
+ return "COORDINATION_WIRING";
+ }},
+ parameter()
+ {
+ String localizationKey()
+ {
+ return "COORDINATION_PARAMETER";
+ }},
+ alias()
+ {
+ String localizationKey()
+ {
+ return "COORDINATION_ALIAS";
+ }};
private CoordinationBean bean;
@@ -99,7 +102,7 @@
abstract String localizationKey();
}
- abstract static class CoordinationBean
+ abstract static class CoordinationBean extends ManagedBean
{
protected CoordinationManagerBean managerBean;
@@ -272,11 +275,14 @@
// reset the different managers as they are in session scope but need to be re-initialized each time a new
// page is reloaded
AliasBindingManagerBean aliasManager = new AliasBindingManagerBean(this);
+ aliasManager.setBeanContext(beanContext);
EventWiringManagerBean eventManager = new EventWiringManagerBean(this);
+ eventManager.setBeanContext(beanContext);
ParameterBindingManagerBean parameterManager = new ParameterBindingManagerBean(this);
- managers.put(CoordinationType.alias.name(), replaceInSession("aliasManager", aliasManager));
- managers.put(CoordinationType.wiring.name(), replaceInSession("eventManager", eventManager));
- managers.put(CoordinationType.parameter.name(), replaceInSession("parameterManager", parameterManager));
+ parameterManager.setBeanContext(beanContext);
+ managers.put(CoordinationType.alias.name(), beanContext.replaceInSession("aliasManager", aliasManager));
+ managers.put(CoordinationType.wiring.name(), beanContext.replaceInSession("eventManager", eventManager));
+ managers.put(CoordinationType.parameter.name(), beanContext.replaceInSession("parameterManager", parameterManager));
Page selectedPage = getSelectedPage();
@@ -335,86 +341,7 @@
return EDIT_COORDINATION;
}
- // JSF helper methods
-
/**
- * Purges a session bean from the session so that it will be recreated by JSF when needed.
- * todo: JSF COMMON
- *
- * @param beanName name of the bean to be purged, must match an entry in <code>faces-config.xml</code>
- * @param otherNames additional names of beans to be purged
- */
- void purgeFromSession(String beanName, String... otherNames)
- {
- Map<String, Object> sessionMap = getFacesSessionMap();
- sessionMap.remove(beanName);
- if (otherNames != null)
- {
- for (String name : otherNames)
- {
- sessionMap.remove(name);
- }
- }
- }
-
- /**
- * Retrieves the JSF session map.
- * todo: JSF COMMON
- *
- * @return the JSF session map
- */
- Map<String, Object> getFacesSessionMap()
- {
- return FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
- }
-
- /**
- * Replaces the bean identified by the given name by the specified new one. Passing <code>null</code> for the new
- * bean value will remove the bean reference from the session. If a bean was previously assigned to this name, then
- * only a bean of the same type (as defined by {@link Class#isAssignableFrom(Class)}) can be assigned to this name.
- * todo: JSF COMMON
- *
- * @param beanName the name identifying the bean to be replaced
- * @param newBean the new value for the bean to be replaced or <code>null</code> if the bean is to be removed
- * @param <T> the type of the given bean
- * @return the new value for the bean or <code>null</code> if the remove semantics was used
- */
- <T> T replaceInSession(String beanName, T newBean)
- {
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(beanName, "bean Name", "replaceInSession");
- Map<String, Object> sessionMap = getFacesSessionMap();
-
- // if we passed null, use the remove semantics
- if (newBean == null)
- {
- sessionMap.remove(beanName);
- return null;
- }
-
- Object current = sessionMap.get(beanName);
- // check that the new bean is compatible with the previously assigned
- if (current != null && !newBean.getClass().isAssignableFrom(current.getClass()))
- {
- throw new IllegalArgumentException("Provided bean: " + newBean + " is not compatible with previously assigned '"
- + beanName + "' bean: " + current);
- }
- sessionMap.put(beanName, newBean);
- return newBean;
- }
-
- /**
- * Retrieves the value of the parameter which name is given from the JSF request.
- * todo: JSF COMMON
- *
- * @param name name of the parameter which value we want to retrieve
- * @return
- */
- public String getFacesParam(String name)
- {
- return FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(name);
- }
-
- /**
* Util: Parse PortalObjectId for given portlet object.
*
* @param id
@@ -429,8 +356,8 @@
public void select(ActionEvent event)
{
- selectedName = getFacesParam(SELECTED_NAME);
- selectedType = CoordinationType.valueOf(getFacesParam(SELECTED_TYPE));
+ selectedName = beanContext.getParameter(SELECTED_NAME);
+ selectedType = CoordinationType.valueOf(beanContext.getParameter(SELECTED_TYPE));
selectedType.setBean(managers.get(selectedType.name()));
}
@@ -467,9 +394,7 @@
return EDIT_COORDINATION;
}
- /**
- * Refreshes the page data.
- */
+ /** Refreshes the page data. */
public void refresh()
{
editCoordination();
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/EventWiringManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/EventWiringManagerBean.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/EventWiringManagerBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -31,7 +31,6 @@
import org.jboss.portal.portlet.info.EventingInfo;
import org.jboss.portal.portlet.info.PortletInfo;
-import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import javax.xml.namespace.QName;
import java.util.ArrayList;
@@ -110,34 +109,16 @@
return existing;
}
- public void selectSourceEvent(ValueChangeEvent event)
+ public String getStep2Message()
{
- System.out.println("selectSourceEvent");
- System.out.println("old value = " + event.getOldValue());
- System.out.println("new value = " + event.getNewValue());
+ return beanContext.getMessageFromBundle("COORDINATION_EVENT_CREATE_STEP2", selectedSourceEvent);
}
- public void selectSourceWindows(ValueChangeEvent event)
+ public String getStep4Message()
{
- System.out.println("selectSourceWindows");
- System.out.println("old value = " + event.getOldValue());
- System.out.println("new value = " + event.getNewValue());
+ return beanContext.getMessageFromBundle("COORDINATION_EVENT_CREATE_STEP4", selectedDestinationEvent);
}
- public void selectDestinationEvent(ValueChangeEvent event)
- {
- System.out.println("selectDestinationEvent");
- System.out.println("old value = " + event.getOldValue());
- System.out.println("new value = " + event.getNewValue());
- }
-
- public void selectDestinationWindows(ValueChangeEvent event)
- {
- System.out.println("selectDestinationWindows");
- System.out.println("old value = " + event.getOldValue());
- System.out.println("new value = " + event.getNewValue());
- }
-
public Collection<DisplayEventWiring> getDisplayEventWirings()
{
if (displayEventWirings == null)
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/ParameterBindingManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/ParameterBindingManagerBean.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/ParameterBindingManagerBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -23,8 +23,8 @@
package org.jboss.portal.core.admin.ui.coordination;
import org.jboss.portal.core.controller.coordination.IllegalCoordinationException;
+import org.jboss.portal.core.controller.coordination.Utils;
import org.jboss.portal.core.controller.coordination.WindowBindingInfo;
-import org.jboss.portal.core.controller.coordination.Utils;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.Window;
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/QNameSelectItem.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/QNameSelectItem.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/QNameSelectItem.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -27,8 +27,8 @@
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
-* @version $Revision$
-*/
+ * @version $Revision$
+ */
public class QNameSelectItem extends SelectItem implements Comparable
{
public QNameSelectItem(QName qName)
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2008-09-25 15:47:41 UTC (rev 11984)
@@ -51,6 +51,13 @@
<converter-class>org.jboss.portal.core.admin.ui.conversion.PortalObjectIdConverter</converter-class>
</converter>
+ <!-- bean context for managed beans -->
+ <managed-bean>
+ <managed-bean-name>beanContext</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.faces.gui.JSFBeanContext</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
<!-- The portal object manager bean -->
<managed-bean>
<managed-bean-name>portalobjectmgr</managed-bean-name>
@@ -421,21 +428,41 @@
<property-name>aliasManager</property-name>
<value>#{aliasManager}</value>
</managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>eventManager</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.coordination.EventWiringManagerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>parameterManager</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.coordination.ParameterBindingManagerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>aliasManager</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.coordination.AliasBindingManagerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
</managed-bean>
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
@@ -186,15 +186,15 @@
<h:panelGroup>
#{bundle.COORDINATION_EVENT_CREATE_STEP1}
<h:selectOneListbox id="sourceEvent" size="5" value="#{eventManager.selectedSourceEvent}" immediate="true"
- valueChangeListener="#{eventManager.selectSourceEvent}" onchange="this.form.submit()">
+ onchange="this.form.submit()">
<f:selectItems value="#{eventManager.sourceEvents}"/>
</h:selectOneListbox>
</h:panelGroup>
<h:panelGroup rendered="#{!empty eventManager.selectedSourceEvent}">
- #{bundle.COORDINATION_EVENT_CREATE_STEP2}
+ #{eventManager.step2Message} <!-- this uses bundle.COORDINATION_EVENT_CREATE_STEP2 -->
<h:selectManyListbox id="sourceWindows" size="5" value="#{eventManager.selectedSourceWindows}" immediate="true"
- valueChangeListener="#{eventManager.selectSourceWindows}" onchange="this.form.submit()">
+ onchange="this.form.submit()">
<f:selectItems value="#{eventManager.sourceWindows}"/>
</h:selectManyListbox>
</h:panelGroup>
@@ -202,15 +202,15 @@
<h:panelGroup rendered="#{!empty eventManager.selectedSourceWindows}">
#{bundle.COORDINATION_EVENT_CREATE_STEP3}
<h:selectOneListbox id="destEvent" size="5" value="#{eventManager.selectedDestinationEvent}" immediate="true"
- valueChangeListener="#{eventManager.selectDestinationEvent}" onchange="this.form.submit()">
+ onchange="this.form.submit()">
<f:selectItems value="#{eventManager.destinationEvents}"/>
</h:selectOneListbox>
</h:panelGroup>
<h:panelGroup rendered="#{!empty eventManager.selectedDestinationEvent}">
- #{bundle.COORDINATION_EVENT_CREATE_STEP4}
+ #{eventManager.step4Message} <!-- this uses bundle.COORDINATION_EVENT_CREATE_STEP4 -->
<h:selectManyListbox id="destWindows" size="5" value="#{eventManager.selectedDestinationWindows}" immediate="true"
- valueChangeListener="#{eventManager.selectDestinationWindows}" onchange="this.form.submit()">
+ onchange="this.form.submit()">
<f:selectItems value="#{eventManager.destinationWindows}"/>
</h:selectManyListbox>
</h:panelGroup>
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/test/wsrp/other/ConsumerBeanTestCase.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -25,11 +25,12 @@
import junit.framework.TestCase;
import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.faces.gui.BeanContext;
import org.jboss.portal.test.wsrp.framework.support.MockConsumerRegistry;
-import org.jboss.portal.wsrp.admin.ui.BeanContext;
import org.jboss.portal.wsrp.admin.ui.ConsumerBean;
import java.util.Locale;
+import java.util.Map;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -74,7 +75,7 @@
private static class TestBeanContext extends BeanContext
{
- protected String getParameter(String key)
+ public String getParameter(String key)
{
throw new NotYetImplemented();
}
@@ -98,5 +99,10 @@
{
return Locale.getDefault();
}
+
+ public Map<String, Object> getSessionMap()
+ {
+ throw new NotYetImplemented();
+ }
}
}
Deleted: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -1,111 +0,0 @@
-/******************************************************************************
- * 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 java.text.MessageFormat;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-/**
- * todo: JSF COMMON
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public abstract class BeanContext
-{
- protected static final String STATUS = "status";
- private static final String RESOURCE_NAME = "WSRPConfigurationResource";
- private static final String UNEXPECTED_ERROR = "bean_support_unexpected_error";
- private static final String CAUSE = "bean_support_cause";
-
- protected abstract String getParameter(String key);
-
- protected abstract void createMessage(String target, String message, Object severity);
-
- protected abstract Object getErrorSeverity();
-
- protected abstract Object getInfoSeverity();
-
- protected abstract Locale getLocale();
-
- protected void createErrorMessage(String message, Object... params)
- {
- createLocalizedMessage(STATUS, message, getErrorSeverity(), params);
- }
-
- protected void createErrorMessage(String target, String message, Object... params)
- {
- createLocalizedMessage(target, message, getErrorSeverity(), params);
- }
-
- protected void createLocalizedMessage(String target, String message, Object severity, Object... params)
- {
- createMessage(target, getMessageFromBundle(message, params), severity);
- }
-
- protected String getMessageFromBundle(String message, Object... params)
- {
- return getLocalizedMessage(message, getLocale(), params);
- }
-
- public static String getLocalizedMessage(String localizationKey, Locale locale, Object... params)
- {
- ResourceBundle rb = ResourceBundle.getBundle(RESOURCE_NAME, locale);
- return MessageFormat.format(rb.getString(localizationKey), params);
- }
-
- protected void createErrorMessageFrom(Exception e)
- {
- createErrorMessageFrom(STATUS, e);
- }
-
- protected void createErrorMessageFrom(String target, Exception e)
- {
- Throwable cause = e.getCause();
- String localizedMessage = getLocalizedMessageOrExceptionName(e);
- String message = localizedMessage + (cause != null ? "\n" + getMessageFromBundle(CAUSE) + getLocalizedMessageOrExceptionName(cause) : "");
- createMessage(target, message, getErrorSeverity());
- }
-
- private String getLocalizedMessageOrExceptionName(Throwable e)
- {
- String localizedMessage = e.getLocalizedMessage();
- if (localizedMessage == null)
- {
- localizedMessage = getMessageFromBundle(UNEXPECTED_ERROR) + e.getClass().getName();
- }
- return localizedMessage;
- }
-
- protected void createInfoMessage(String target, String message)
- {
- createLocalizedMessage(target, message, getInfoSeverity());
- }
-
- protected void createInfoMessage(String message)
- {
- createInfoMessage(STATUS, message);
- }
-}
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -23,6 +23,7 @@
package org.jboss.portal.wsrp.admin.ui;
+import org.jboss.portal.faces.gui.ManagedBean;
import org.jboss.portal.wsrp.WSRPConsumer;
import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
import org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo;
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -23,6 +23,7 @@
package org.jboss.portal.wsrp.admin.ui;
import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.faces.gui.ManagedBean;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.wsrp.WSRPConsumer;
import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
@@ -333,8 +334,7 @@
private void setConsumerIdInSession(boolean remove)
{
- // todo: JSF COMMON extract this behavior into common class
- Map<String, Object> sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
+ Map<String, Object> sessionMap = beanContext.getSessionMap();
String consumerBeanName = "consumer"; // must match ConsumerBean name in faces-config.xml
// force recreation of ConsumerBean otherwise switching to the consumer view might not show the proper consumer
Deleted: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -1,74 +0,0 @@
-/******************************************************************************
- * 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 javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public class JSFBeanContext extends BeanContext
-{
- protected String getParameter(String key)
- {
- Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- return (String)pmap.get(key);
- }
-
- protected void createMessage(String target, String message, Object severity)
- {
- FacesMessage.Severity jsfSeverity;
- if (severity instanceof FacesMessage.Severity)
- {
- jsfSeverity = (FacesMessage.Severity)severity;
- }
- else
- {
- jsfSeverity = FacesMessage.SEVERITY_ERROR;
- }
-
- FacesMessage msg = new FacesMessage(jsfSeverity, message, message);
- FacesContext.getCurrentInstance().addMessage(target, msg);
- }
-
- protected Object getErrorSeverity()
- {
- return FacesMessage.SEVERITY_ERROR;
- }
-
- protected Object getInfoSeverity()
- {
- return FacesMessage.SEVERITY_INFO;
- }
-
- protected Locale getLocale()
- {
- return FacesContext.getCurrentInstance().getExternalContext().getRequestLocale();
- }
-}
Deleted: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -1,45 +0,0 @@
-/******************************************************************************
- * 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.logging.Logger;
-
-
-/**
- * todo: JSF COMMON
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- * @since 2.6
- */
-public class ManagedBean
-{
- protected Logger log = Logger.getLogger(getClass());
-
- protected BeanContext beanContext;
-
- public void setBeanContext(BeanContext beanContext)
- {
- this.beanContext = beanContext;
- }
-}
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -23,6 +23,8 @@
package org.jboss.portal.wsrp.admin.ui;
+import org.jboss.portal.faces.gui.BeanContext;
+import org.jboss.portal.faces.gui.ManagedBean;
import org.jboss.portal.registration.RegistrationPolicy;
import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/StatusConverter.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -22,6 +22,7 @@
package org.jboss.portal.wsrp.admin.ui;
+import org.jboss.portal.faces.gui.BeanContext;
import org.jboss.portal.wsrp.consumer.RegistrationProperty;
import javax.faces.component.UIComponent;
Copied: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties (from rev 11967, branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties 2008-09-25 15:47:41 UTC (rev 11984)
@@ -0,0 +1,173 @@
+################################################################################
+# JBoss, a division of Red Hat #
+# Copyright 2008, 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. #
+################################################################################
+
+## WSRP GUI localization
+
+# JBoss Portal display information
+org.jboss.portal.object.name.WSRPConfigurationPortlet = WSRP Configuration
+org.jboss.portal.instance.name.WSRPConfigurationPortletInstance = WSRP Configuration Portlet
+
+# Tabs
+nav_tabs_consumers = Consumers Configuration
+nav_tabs_producer_config = Producer Configuration
+nav_tabs_producer_management = Producer Management
+
+# Object path in consumer template
+path_consumers_root = Consumers
+path_consumers_consumer = Consumer ''{0}'' configuration
+path_consumers_active = active
+path_consumers_inactive = inactive
+path_consumers_refreshNeeded = (refresh needed)
+
+# Confirm deletion of a consumer screen
+confirm_delete_consumer_title = Delete ''{0}'' consumer?
+confirm_delete_consumer_message = You are about to delete the ''{0}'' consumer!
+confirm_detete_consumer_proceed = Are you sure you want to proceed?
+confirm_delete_consumer_submit = Delete consumer
+confirm_delete_consumer_cancel = Cancel
+
+# Confirm deletion of local registration information screen
+confirm_delete_registration_title = Delete local registration for ''{0}'' consumer?
+confirm_delete_registration_message = You are about to delete the local registration information for the ''{0}'' consumer! \n\
+This is only needed if this consumer had previously registered with the remote producer and this producer \n\
+has been modified to not require registration anymore. \n\
+Only erase local registration information if you experience errors with the producer due to this \n\
+particular situation. Erasing local registration when not required might lead to inability to work with \n\
+this producer anymore.
+confirm_delete_registration_proceed = Are you sure you want to proceed?
+confirm_delete_registration_submit = Erase local registration
+confirm_delete_registration_cancel = Cancel
+
+# Consumers screen
+consumers_title = Manage Consumers
+consumers_create_title = Create a consumer named:
+consumers_create_submit = Create Consumer
+
+# Consumers list
+consumers_table_column_consumer = Consumer
+consumers_table_column_consumer_status = status:
+consumers_table_column_actions = Actions
+consumers_table_action_configure = Configure
+consumers_table_action_refresh = Refresh
+consumers_table_action_activate = Activate
+consumers_table_action_deactivate = Deactivate
+consumers_table_action_register = Register
+consumers_table_action_deregister = Deregister
+consumers_table_action_delete = Delete
+
+# Consumer editing screen
+edit_consumer_producer = Producer id:
+edit_consumer_cache = Cache expiration:
+edit_consumer_cache_seconds = (seconds before expiration)
+edit_consumer_endpoint = Endpoint configuration:
+edit_consumer_endpoint_wsdl = Use WSDL?
+edit_consumer_endpoint_sd = Service Description URL:
+edit_consumer_endpoint_m = Markup URL:
+edit_consumer_endpoint_r = Registration URL:
+edit_consumer_endpoint_pm = Portlet Management URL:
+edit_consumer_registration = Registration information:
+edit_consumer_registration_current = Current registration information:
+edit_consumer_prop_name = Name
+edit_consumer_prop_desc = Description
+edit_consumer_prop_value = Value
+edit_consumer_registration_update_props = Update properties
+edit_consumer_registration_no_props = Registration is indicated as required without registration properties.
+edit_consumer_registration_modify = Modify registration
+edit_consumer_registration_modify_title = Modify the registration held with this producer
+edit_consumer_registration_expected = Expected registration information:
+edit_consumer_no_registration = Producer doesn't require registration.
+edit_consumer_registration_context = Registration context:
+edit_consumer_registration_context_handle = Handle:
+edit_consumer_registration_context_erase = Erase local registration
+edit_consumer_registration_context_erase_title = Erase local registration information (potentially dangerous!)
+edit_consumer_refresh = Refresh & Save
+edit_consumer_refresh_title = Save changes and refresh information from producer
+edit_consumer_cancel = Cancel
+
+# Confirm registration property deletion screen
+confirm_delete_reg_property_title = Delete ''{0}'' registration property description?
+confirm_delete_reg_property_message = You are about to delete the ''{0}'' registration property description! \n\
+This will trigger invalidation of consumer registrations which will have to modify their registration \n\
+information.
+confirm_delete_reg_property_proceed = Are you sure you want to proceed?
+confirm_delete_reg_property_submit = Delete property
+confirm_delete_reg_property_cancel = Cancel
+
+# Producer configuration screen
+producer_config_title = Producer configuration
+producer_config_sd_requires_reg = Access to full service description requires consumers to be registered.
+producer_config_strict = Use strict WSRP compliance.
+producer_config_requires_reg = Requires registration. Modifying this information will trigger invalidation of consumer registrations.
+producer_config_reg_policy = Registration policy class name:
+producer_config_reg_prop_validator = Registration property validator class name:
+producer_config_reg_props = Registration properties
+producer_config_reg_prop_name = Name
+producer_config_reg_prop_type = Type
+producer_config_reg_prop_label = Label
+producer_config_reg_prop_hint = Hint
+producer_config_reg_prop_action = Action
+producer_config_reg_prop_remove = Remove
+producer_config_no_reg_props = No specified required registration properties.
+producer_config_add_reg_prop = Add property
+producer_config_save = Save
+producer_config_cancel = Cancel
+
+## Localized messages in JSF beans
+
+bean_support_unexpected_error = An unexpected error occured:
+bean_support_cause = Cause:
+
+# ConsumerBean
+bean_consumer_cannot_find_consumer = Couldn't find consumer ''{0}''!
+bean_consumer_cannot_update_consumer = Couldn't update consumer!
+bean_consumer_cannot_refresh_consumer = Couldn't refresh consumer!
+bean_consumer_modify_reg_success = Successfully modified registration!
+bean_consumer_invalid_modify = Invalid attempt to modify a registration that hasn't been locally modified!
+bean_consumer_cannot_modify_reg = Couldn't modify registration!
+bean_consumer_cannot_erase_reg = Couldn't erase local registration!
+bean_consumer_malformed_url = ''{0}'' is not a valid URL: {1}
+bean_consumer_update_success = Successfully updated consumer!
+
+# ConsumerManagerBean
+bean_consumermanager_invalid_new_consumer_name = Need a non-null, non-empty name for the new consumer!
+bean_consumermanager_no_consumer = No consumer was selected!
+bean_consumermanager_refresh_bypassed = Refresh was not necessary.
+bean_consumermanager_refresh_success = Refresh was successful.
+bean_consumermanager_refresh_failure = Refresh failed (probably because the registration information was not valid).
+bean_consumermanager_refresh_exception = An unexpected error occurred.
+bean_consumermanager_refresh_modify = Either local or remote information has been changed, you should modify your registration with the remote producer.
+
+# ProducerBean
+bean_producer_regpolicy_unset = RegistrationPolicy unset
+bean_producer_cannot_save = Couldn't save producer configuration. Cause: {0}
+bean_producer_cannot_reload = Couldn't reload producer configuration. Cause: {0}
+bean_producer_save_success = Producer configuration successfully saved!
+bean_producer_cancel_success = All modifications made to the producer configuration have been cancelled!
+
+## RegistrationProperty Status localization
+registration_property_status_inexistent = Inexistent on producer
+registration_property_status_missing = Missing
+registration_property_status_missing_value = Missing value
+registration_property_status_unchecked_value = Undetermined status
+registration_property_status_invalid_value = Invalid value
+registration_property_status_valid = Valid
\ No newline at end of file
Copied: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties (from rev 11967, branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties 2008-09-25 15:47:41 UTC (rev 11984)
@@ -0,0 +1,143 @@
+################################################################################
+# JBoss, a division of Red Hat #
+# Copyright 2008, 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. #
+################################################################################
+# JBoss Portal display information
+org.jboss.portal.object.name.WSRPConfigurationPortlet = Configuration WSRP
+org.jboss.portal.instance.name.WSRPConfigurationPortletInstance = Portlet de Configuration pour WSRP
+
+nav_tabs_consumers = Configuration Consommateurs
+nav_tabs_producer_config = Configuration Producteur
+nav_tabs_producer_management = Gestion Producteur
+
+path_consumers_root = Consommateurs
+path_consumers_consumer = Configuration du consommateur ''{0}''
+path_consumers_active = actif
+path_consumers_inactive = inactif
+path_consumers_refreshNeeded = (rafra\u00eechissement requis)
+confirm_delete_consumer_cancel=Annuler
+confirm_delete_consumer_message=Vous \u00eates sur le point d'effacer le concommateur ''{0}''!
+confirm_delete_consumer_submit=Effacer consommateur
+confirm_delete_consumer_title=Voulez-vous r\u00e9ellement effacer le consommateur ''{0}''?
+confirm_detete_consumer_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
+confirm_delete_registration_cancel=Annuler
+confirm_delete_registration_message=Vous \u00eates sur le point d'effacer les informations locales d'enregistrement pour le consommateur ''{0}''! \n\
+Ceci n'est uniquement requis dans le cas o\u00f9 ce consommateur se serait enregistr\u00e9 aupr\u00e8s d'un producteur distant \n\
+qui aurait ensuite \u00e9t\u00e9 modifi\u00e9 pour ne plus requerir d'enregistrement. \n\
+N'effacez les informations locales d'enregistrement que si vous rencontrez des probl\u00e8mes, sp\u00e9cifiques \u00e0 cette \n\
+situation, avec le producteur distant. Effacer les donn\u00e9es d'enregistrement quand ce n'est pas requis peut entra\u00eener \n\
+l'incapacit\u00e9 future d'acc\u00e9der \u00e0 ce producteur.
+confirm_delete_registration_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
+confirm_delete_registration_submit=Effacer enregistrement
+confirm_delete_registration_title=Voulez-vous r\u00e9ellement effacer l'enregistrement du consommateur ''{0}''?
+consumers_create_submit=Cr\u00e9er Consommateur
+consumers_create_title=Cr\u00e9er un consommateur nomm\u00e9:
+consumers_table_action_activate=Activer
+consumers_table_action_configure=Configurer
+consumers_table_action_deactivate=D\u00e9sactiver
+consumers_table_action_delete=Effacer
+consumers_table_action_deregister=D\u00e9senregistrer
+consumers_table_action_refresh=Rafra\u00eechir
+consumers_table_action_register=Enregister
+consumers_table_column_actions=Actions
+consumers_table_column_consumer=Consommateur
+consumers_table_column_consumer_status=status:
+consumers_title=Gestion des Consommateurs
+edit_consumer_cache=Expiration du cache:
+edit_consumer_cache_seconds=(secondes avant expiration)
+edit_consumer_cancel=Annuler
+edit_consumer_endpoint=Configuration du endpoint:
+edit_consumer_endpoint_m=URL Markup:
+edit_consumer_endpoint_pm=URL Portlet Management:
+edit_consumer_endpoint_r=URL Registration:
+edit_consumer_endpoint_sd=URL Service Description:
+edit_consumer_endpoint_wsdl=Utiliser WSDL?
+edit_consumer_no_registration=Enregistrement non-requis par le producteur.
+edit_consumer_producer=Identifiant du producteur:
+edit_consumer_prop_desc=Description
+edit_consumer_prop_name=Nom
+edit_consumer_prop_value=Valeur
+edit_consumer_refresh=Rafra\u00eechir & Sauvegarder
+edit_consumer_refresh_title=Sauvegarde des changements et rafra\u00eechissement \u00e0 partir du producteur
+edit_consumer_registration=Information d'enregistrement:
+edit_consumer_registration_context=Contexte d'enregistrement:
+edit_consumer_registration_context_erase=Effacer enregistrement local
+edit_consumer_registration_context_erase_title=Effacer l'information locale d'enregistrement (potentiellement dangereux!)
+edit_consumer_registration_context_handle=Identifiant:
+edit_consumer_registration_current=Information actuelle d'enregistrement:
+edit_consumer_registration_expected=Information attendue d'enregistrement:
+edit_consumer_registration_modify=Modifier l'enregistrement
+edit_consumer_registration_modify_title=Modifier l'enregistrement avec ce producteur
+edit_consumer_registration_no_props=Enregistrement indiqu\u00e9 sans besoin de propri\u00e9t\u00e9s d'enregistrement
+edit_consumer_registration_update_props=Mettre les propri\u00e9t\u00e9s \u00e0 jour
+bean_consumer_cannot_erase_reg=L'effacement de l'enregistrement n'a pu \u00eatre effectu\u00e9!
+bean_consumer_cannot_find_consumer=Le consommateur ''{0}'' n'a pu \u00eatre trouv\u00e9!
+bean_consumer_cannot_modify_reg=La modification de l'enregistrement n'a pu \u00eatre effectu\u00e9e!
+bean_consumer_cannot_refresh_consumer=Le rafra\u00eechissement du consommateur n'a pu \u00eatre effectu\u00e9!
+bean_consumer_cannot_update_consumer=La mise \u00e0 jour du consommateur n'a pu \u00eatre effectu\u00e9e!
+bean_consumer_invalid_modify=Tentative invalide de modification d'enregistrement sans modifications locales.
+bean_consumer_malformed_url=''{0}'' n'est pas une URL valide: {1}
+bean_consumer_modify_reg_success=Enregistrement modifi\u00e9!
+bean_support_cause=Cause:
+bean_support_unexpected_error=Une erreur inattendue s'est produite:
+bean_consumermanager_invalid_new_consumer_name=Un consommateur requiert un nom non-nul et non-vide!
+bean_consumermanager_no_consumer=Aucun consommateur n'a \u00e9t\u00e9 s\u00e9lectionn\u00e9!
+bean_producer_cannot_reload=Le rechargement de la configuration du producteur a \u00e9chou\u00e9. Cause: {0}
+bean_producer_cannot_save=La sauvegarde de la configuration du producteur a \u00e9chou\u00e9. Cause: {0}
+bean_producer_regpolicy_unset=RegistrationPolicy non sp\u00e9cifi\u00e9e
+confirm_delete_reg_property_cancel=Annuler
+confirm_delete_reg_property_message=Vous \u00eates sur le point d'effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''! \n\
+Cel\u00e0 va entra\u00eener l'invalidation des enregistrements des consommateurs qui devront alors modifier \n\
+leur information d'enregistrement.
+confirm_delete_reg_property_submit=Effacer la propri\u00e9t\u00e9
+confirm_delete_reg_property_title=Voulez-vous r\u00e9ellement effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''?
+confirm_delete_reg_property_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
+producer_config_add_reg_prop=Ajouter une propri\u00e9t\u00e9
+producer_config_cancel=Annuler
+producer_config_no_reg_props=Aucune propri\u00e9t\u00e9 d'enregistrement sp\u00e9cifi\u00e9e.
+producer_config_reg_policy=Nom de la classe de la politique d'enregistrement:
+producer_config_reg_prop_action=Action
+producer_config_reg_prop_hint=Indice
+producer_config_reg_prop_label=\u00c9tiquette
+producer_config_reg_prop_name=Nom
+producer_config_reg_prop_remove=Enlever
+producer_config_reg_prop_type=Type
+producer_config_reg_prop_validator=Nom de la classe de validation des propri\u00e9t\u00e9s d'enregistrement:
+producer_config_reg_props=Propri\u00e9t\u00e9s d'enregistrement
+producer_config_requires_reg=N\u00e9cessite l'enregistrement. Modifier cette information entra\u00eene l'invalidation des enregistrements consommateurs.
+producer_config_save=Sauvegarder
+producer_config_sd_requires_reg=L'acc\u00e8s \u00e0 la description compl\u00e8te des services requiert l'enregistrement.
+producer_config_strict=Utiliser la validation WSRP stricte.
+producer_config_title=Configuration producteur
+bean_consumermanager_refresh_bypassed=Le rafra\u00eechissement n'\u00e9tait pas requis.
+bean_consumermanager_refresh_exception=Une erreur inattendue s'est produite.
+bean_consumermanager_refresh_failure=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'informations d'enregistrement non valides)
+bean_consumermanager_refresh_success=Le rafra\u00eechissement a r\u00e9ussi.
+bean_producer_cancel_success=Toutes les modifications faites \u00e0 la configuration du producteur ont \u00e9t\u00e9 annull\u00e9es!
+bean_producer_save_success=La configuration du producteur a bien \u00e9t\u00e9 sauvegard\u00e9e!
+bean_consumermanager_refresh_modify=Les informations locales ou distantes ont chang\u00e9, vous devriez modifier votre enregistrement avec le producteur.
+bean_consumer_update_success=Consommateur mis \u00e0 jour!
+registration_property_status_inexistent=Inexistant sur le producteur
+registration_property_status_invalid_value=Invalide valeur
+registration_property_status_missing=Manquant
+registration_property_status_missing_value=Valeur manquante
+registration_property_status_unchecked_value=Status ind\u00e9termin\u00e9
+registration_property_status_valid=Valide
\ No newline at end of file
Deleted: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource.properties 2008-09-25 15:47:41 UTC (rev 11984)
@@ -1,173 +0,0 @@
-################################################################################
-# JBoss, a division of Red Hat #
-# Copyright 2008, 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. #
-################################################################################
-
-## WSRP GUI localization
-
-# JBoss Portal display information
-org.jboss.portal.object.name.WSRPConfigurationPortlet = WSRP Configuration
-org.jboss.portal.instance.name.WSRPConfigurationPortletInstance = WSRP Configuration Portlet
-
-# Tabs
-nav_tabs_consumers = Consumers Configuration
-nav_tabs_producer_config = Producer Configuration
-nav_tabs_producer_management = Producer Management
-
-# Object path in consumer template
-path_consumers_root = Consumers
-path_consumers_consumer = Consumer ''{0}'' configuration
-path_consumers_active = active
-path_consumers_inactive = inactive
-path_consumers_refreshNeeded = (refresh needed)
-
-# Confirm deletion of a consumer screen
-confirm_delete_consumer_title = Delete ''{0}'' consumer?
-confirm_delete_consumer_message = You are about to delete the ''{0}'' consumer!
-confirm_detete_consumer_proceed = Are you sure you want to proceed?
-confirm_delete_consumer_submit = Delete consumer
-confirm_delete_consumer_cancel = Cancel
-
-# Confirm deletion of local registration information screen
-confirm_delete_registration_title = Delete local registration for ''{0}'' consumer?
-confirm_delete_registration_message = You are about to delete the local registration information for the ''{0}'' consumer! \n\
-This is only needed if this consumer had previously registered with the remote producer and this producer \n\
-has been modified to not require registration anymore. \n\
-Only erase local registration information if you experience errors with the producer due to this \n\
-particular situation. Erasing local registration when not required might lead to inability to work with \n\
-this producer anymore.
-confirm_delete_registration_proceed = Are you sure you want to proceed?
-confirm_delete_registration_submit = Erase local registration
-confirm_delete_registration_cancel = Cancel
-
-# Consumers screen
-consumers_title = Manage Consumers
-consumers_create_title = Create a consumer named:
-consumers_create_submit = Create Consumer
-
-# Consumers list
-consumers_table_column_consumer = Consumer
-consumers_table_column_consumer_status = status:
-consumers_table_column_actions = Actions
-consumers_table_action_configure = Configure
-consumers_table_action_refresh = Refresh
-consumers_table_action_activate = Activate
-consumers_table_action_deactivate = Deactivate
-consumers_table_action_register = Register
-consumers_table_action_deregister = Deregister
-consumers_table_action_delete = Delete
-
-# Consumer editing screen
-edit_consumer_producer = Producer id:
-edit_consumer_cache = Cache expiration:
-edit_consumer_cache_seconds = (seconds before expiration)
-edit_consumer_endpoint = Endpoint configuration:
-edit_consumer_endpoint_wsdl = Use WSDL?
-edit_consumer_endpoint_sd = Service Description URL:
-edit_consumer_endpoint_m = Markup URL:
-edit_consumer_endpoint_r = Registration URL:
-edit_consumer_endpoint_pm = Portlet Management URL:
-edit_consumer_registration = Registration information:
-edit_consumer_registration_current = Current registration information:
-edit_consumer_prop_name = Name
-edit_consumer_prop_desc = Description
-edit_consumer_prop_value = Value
-edit_consumer_registration_update_props = Update properties
-edit_consumer_registration_no_props = Registration is indicated as required without registration properties.
-edit_consumer_registration_modify = Modify registration
-edit_consumer_registration_modify_title = Modify the registration held with this producer
-edit_consumer_registration_expected = Expected registration information:
-edit_consumer_no_registration = Producer doesn't require registration.
-edit_consumer_registration_context = Registration context:
-edit_consumer_registration_context_handle = Handle:
-edit_consumer_registration_context_erase = Erase local registration
-edit_consumer_registration_context_erase_title = Erase local registration information (potentially dangerous!)
-edit_consumer_refresh = Refresh & Save
-edit_consumer_refresh_title = Save changes and refresh information from producer
-edit_consumer_cancel = Cancel
-
-# Confirm registration property deletion screen
-confirm_delete_reg_property_title = Delete ''{0}'' registration property description?
-confirm_delete_reg_property_message = You are about to delete the ''{0}'' registration property description! \n\
-This will trigger invalidation of consumer registrations which will have to modify their registration \n\
-information.
-confirm_delete_reg_property_proceed = Are you sure you want to proceed?
-confirm_delete_reg_property_submit = Delete property
-confirm_delete_reg_property_cancel = Cancel
-
-# Producer configuration screen
-producer_config_title = Producer configuration
-producer_config_sd_requires_reg = Access to full service description requires consumers to be registered.
-producer_config_strict = Use strict WSRP compliance.
-producer_config_requires_reg = Requires registration. Modifying this information will trigger invalidation of consumer registrations.
-producer_config_reg_policy = Registration policy class name:
-producer_config_reg_prop_validator = Registration property validator class name:
-producer_config_reg_props = Registration properties
-producer_config_reg_prop_name = Name
-producer_config_reg_prop_type = Type
-producer_config_reg_prop_label = Label
-producer_config_reg_prop_hint = Hint
-producer_config_reg_prop_action = Action
-producer_config_reg_prop_remove = Remove
-producer_config_no_reg_props = No specified required registration properties.
-producer_config_add_reg_prop = Add property
-producer_config_save = Save
-producer_config_cancel = Cancel
-
-## Localized messages in JSF beans
-
-bean_support_unexpected_error = An unexpected error occured:
-bean_support_cause = Cause:
-
-# ConsumerBean
-bean_consumer_cannot_find_consumer = Couldn't find consumer ''{0}''!
-bean_consumer_cannot_update_consumer = Couldn't update consumer!
-bean_consumer_cannot_refresh_consumer = Couldn't refresh consumer!
-bean_consumer_modify_reg_success = Successfully modified registration!
-bean_consumer_invalid_modify = Invalid attempt to modify a registration that hasn't been locally modified!
-bean_consumer_cannot_modify_reg = Couldn't modify registration!
-bean_consumer_cannot_erase_reg = Couldn't erase local registration!
-bean_consumer_malformed_url = ''{0}'' is not a valid URL: {1}
-bean_consumer_update_success = Successfully updated consumer!
-
-# ConsumerManagerBean
-bean_consumermanager_invalid_new_consumer_name = Need a non-null, non-empty name for the new consumer!
-bean_consumermanager_no_consumer = No consumer was selected!
-bean_consumermanager_refresh_bypassed = Refresh was not necessary.
-bean_consumermanager_refresh_success = Refresh was successful.
-bean_consumermanager_refresh_failure = Refresh failed (probably because the registration information was not valid).
-bean_consumermanager_refresh_exception = An unexpected error occurred.
-bean_consumermanager_refresh_modify = Either local or remote information has been changed, you should modify your registration with the remote producer.
-
-# ProducerBean
-bean_producer_regpolicy_unset = RegistrationPolicy unset
-bean_producer_cannot_save = Couldn't save producer configuration. Cause: {0}
-bean_producer_cannot_reload = Couldn't reload producer configuration. Cause: {0}
-bean_producer_save_success = Producer configuration successfully saved!
-bean_producer_cancel_success = All modifications made to the producer configuration have been cancelled!
-
-## RegistrationProperty Status localization
-registration_property_status_inexistent = Inexistent on producer
-registration_property_status_missing = Missing
-registration_property_status_missing_value = Missing value
-registration_property_status_unchecked_value = Undetermined status
-registration_property_status_invalid_value = Invalid value
-registration_property_status_valid = Valid
\ No newline at end of file
Deleted: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/WSRPConfigurationResource_fr.properties 2008-09-25 15:47:41 UTC (rev 11984)
@@ -1,143 +0,0 @@
-################################################################################
-# JBoss, a division of Red Hat #
-# Copyright 2008, 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. #
-################################################################################
-# JBoss Portal display information
-org.jboss.portal.object.name.WSRPConfigurationPortlet = Configuration WSRP
-org.jboss.portal.instance.name.WSRPConfigurationPortletInstance = Portlet de Configuration pour WSRP
-
-nav_tabs_consumers = Configuration Consommateurs
-nav_tabs_producer_config = Configuration Producteur
-nav_tabs_producer_management = Gestion Producteur
-
-path_consumers_root = Consommateurs
-path_consumers_consumer = Configuration du consommateur ''{0}''
-path_consumers_active = actif
-path_consumers_inactive = inactif
-path_consumers_refreshNeeded = (rafra\u00eechissement requis)
-confirm_delete_consumer_cancel=Annuler
-confirm_delete_consumer_message=Vous \u00eates sur le point d'effacer le concommateur ''{0}''!
-confirm_delete_consumer_submit=Effacer consommateur
-confirm_delete_consumer_title=Voulez-vous r\u00e9ellement effacer le consommateur ''{0}''?
-confirm_detete_consumer_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
-confirm_delete_registration_cancel=Annuler
-confirm_delete_registration_message=Vous \u00eates sur le point d'effacer les informations locales d'enregistrement pour le consommateur ''{0}''! \n\
-Ceci n'est uniquement requis dans le cas o\u00f9 ce consommateur se serait enregistr\u00e9 aupr\u00e8s d'un producteur distant \n\
-qui aurait ensuite \u00e9t\u00e9 modifi\u00e9 pour ne plus requerir d'enregistrement. \n\
-N'effacez les informations locales d'enregistrement que si vous rencontrez des probl\u00e8mes, sp\u00e9cifiques \u00e0 cette \n\
-situation, avec le producteur distant. Effacer les donn\u00e9es d'enregistrement quand ce n'est pas requis peut entra\u00eener \n\
-l'incapacit\u00e9 future d'acc\u00e9der \u00e0 ce producteur.
-confirm_delete_registration_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
-confirm_delete_registration_submit=Effacer enregistrement
-confirm_delete_registration_title=Voulez-vous r\u00e9ellement effacer l'enregistrement du consommateur ''{0}''?
-consumers_create_submit=Cr\u00e9er Consommateur
-consumers_create_title=Cr\u00e9er un consommateur nomm\u00e9:
-consumers_table_action_activate=Activer
-consumers_table_action_configure=Configurer
-consumers_table_action_deactivate=D\u00e9sactiver
-consumers_table_action_delete=Effacer
-consumers_table_action_deregister=D\u00e9senregistrer
-consumers_table_action_refresh=Rafra\u00eechir
-consumers_table_action_register=Enregister
-consumers_table_column_actions=Actions
-consumers_table_column_consumer=Consommateur
-consumers_table_column_consumer_status=status:
-consumers_title=Gestion des Consommateurs
-edit_consumer_cache=Expiration du cache:
-edit_consumer_cache_seconds=(secondes avant expiration)
-edit_consumer_cancel=Annuler
-edit_consumer_endpoint=Configuration du endpoint:
-edit_consumer_endpoint_m=URL Markup:
-edit_consumer_endpoint_pm=URL Portlet Management:
-edit_consumer_endpoint_r=URL Registration:
-edit_consumer_endpoint_sd=URL Service Description:
-edit_consumer_endpoint_wsdl=Utiliser WSDL?
-edit_consumer_no_registration=Enregistrement non-requis par le producteur.
-edit_consumer_producer=Identifiant du producteur:
-edit_consumer_prop_desc=Description
-edit_consumer_prop_name=Nom
-edit_consumer_prop_value=Valeur
-edit_consumer_refresh=Rafra\u00eechir & Sauvegarder
-edit_consumer_refresh_title=Sauvegarde des changements et rafra\u00eechissement \u00e0 partir du producteur
-edit_consumer_registration=Information d'enregistrement:
-edit_consumer_registration_context=Contexte d'enregistrement:
-edit_consumer_registration_context_erase=Effacer enregistrement local
-edit_consumer_registration_context_erase_title=Effacer l'information locale d'enregistrement (potentiellement dangereux!)
-edit_consumer_registration_context_handle=Identifiant:
-edit_consumer_registration_current=Information actuelle d'enregistrement:
-edit_consumer_registration_expected=Information attendue d'enregistrement:
-edit_consumer_registration_modify=Modifier l'enregistrement
-edit_consumer_registration_modify_title=Modifier l'enregistrement avec ce producteur
-edit_consumer_registration_no_props=Enregistrement indiqu\u00e9 sans besoin de propri\u00e9t\u00e9s d'enregistrement
-edit_consumer_registration_update_props=Mettre les propri\u00e9t\u00e9s \u00e0 jour
-bean_consumer_cannot_erase_reg=L'effacement de l'enregistrement n'a pu \u00eatre effectu\u00e9!
-bean_consumer_cannot_find_consumer=Le consommateur ''{0}'' n'a pu \u00eatre trouv\u00e9!
-bean_consumer_cannot_modify_reg=La modification de l'enregistrement n'a pu \u00eatre effectu\u00e9e!
-bean_consumer_cannot_refresh_consumer=Le rafra\u00eechissement du consommateur n'a pu \u00eatre effectu\u00e9!
-bean_consumer_cannot_update_consumer=La mise \u00e0 jour du consommateur n'a pu \u00eatre effectu\u00e9e!
-bean_consumer_invalid_modify=Tentative invalide de modification d'enregistrement sans modifications locales.
-bean_consumer_malformed_url=''{0}'' n'est pas une URL valide: {1}
-bean_consumer_modify_reg_success=Enregistrement modifi\u00e9!
-bean_support_cause=Cause:
-bean_support_unexpected_error=Une erreur inattendue s'est produite:
-bean_consumermanager_invalid_new_consumer_name=Un consommateur requiert un nom non-nul et non-vide!
-bean_consumermanager_no_consumer=Aucun consommateur n'a \u00e9t\u00e9 s\u00e9lectionn\u00e9!
-bean_producer_cannot_reload=Le rechargement de la configuration du producteur a \u00e9chou\u00e9. Cause: {0}
-bean_producer_cannot_save=La sauvegarde de la configuration du producteur a \u00e9chou\u00e9. Cause: {0}
-bean_producer_regpolicy_unset=RegistrationPolicy non sp\u00e9cifi\u00e9e
-confirm_delete_reg_property_cancel=Annuler
-confirm_delete_reg_property_message=Vous \u00eates sur le point d'effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''! \n\
-Cel\u00e0 va entra\u00eener l'invalidation des enregistrements des consommateurs qui devront alors modifier \n\
-leur information d'enregistrement.
-confirm_delete_reg_property_submit=Effacer la propri\u00e9t\u00e9
-confirm_delete_reg_property_title=Voulez-vous r\u00e9ellement effacer la description de la propri\u00e9t\u00e9 d'enregistrement ''{0}''?
-confirm_delete_reg_property_proceed=\u00cates-vous certains de vouloir proc\u00e9der?
-producer_config_add_reg_prop=Ajouter une propri\u00e9t\u00e9
-producer_config_cancel=Annuler
-producer_config_no_reg_props=Aucune propri\u00e9t\u00e9 d'enregistrement sp\u00e9cifi\u00e9e.
-producer_config_reg_policy=Nom de la classe de la politique d'enregistrement:
-producer_config_reg_prop_action=Action
-producer_config_reg_prop_hint=Indice
-producer_config_reg_prop_label=\u00c9tiquette
-producer_config_reg_prop_name=Nom
-producer_config_reg_prop_remove=Enlever
-producer_config_reg_prop_type=Type
-producer_config_reg_prop_validator=Nom de la classe de validation des propri\u00e9t\u00e9s d'enregistrement:
-producer_config_reg_props=Propri\u00e9t\u00e9s d'enregistrement
-producer_config_requires_reg=N\u00e9cessite l'enregistrement. Modifier cette information entra\u00eene l'invalidation des enregistrements consommateurs.
-producer_config_save=Sauvegarder
-producer_config_sd_requires_reg=L'acc\u00e8s \u00e0 la description compl\u00e8te des services requiert l'enregistrement.
-producer_config_strict=Utiliser la validation WSRP stricte.
-producer_config_title=Configuration producteur
-bean_consumermanager_refresh_bypassed=Le rafra\u00eechissement n'\u00e9tait pas requis.
-bean_consumermanager_refresh_exception=Une erreur inattendue s'est produite.
-bean_consumermanager_refresh_failure=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'informations d'enregistrement non valides)
-bean_consumermanager_refresh_success=Le rafra\u00eechissement a r\u00e9ussi.
-bean_producer_cancel_success=Toutes les modifications faites \u00e0 la configuration du producteur ont \u00e9t\u00e9 annull\u00e9es!
-bean_producer_save_success=La configuration du producteur a bien \u00e9t\u00e9 sauvegard\u00e9e!
-bean_consumermanager_refresh_modify=Les informations locales ou distantes ont chang\u00e9, vous devriez modifier votre enregistrement avec le producteur.
-bean_consumer_update_success=Consommateur mis \u00e0 jour!
-registration_property_status_inexistent=Inexistant sur le producteur
-registration_property_status_invalid_value=Invalide valeur
-registration_property_status_missing=Manquant
-registration_property_status_missing_value=Valeur manquante
-registration_property_status_unchecked_value=Status ind\u00e9termin\u00e9
-registration_property_status_valid=Valide
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2008-09-25 15:47:41 UTC (rev 11984)
@@ -52,7 +52,7 @@
<managed-bean>
<managed-bean-name>beanContext</managed-bean-name>
- <managed-bean-class>org.jboss.portal.wsrp.admin.ui.JSFBeanContext</managed-bean-class>
+ <managed-bean-class>org.jboss.portal.faces.gui.JSFBeanContext</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
@@ -66,7 +66,7 @@
</managed-property>
<managed-property>
<property-name>beanContext</property-name>
- <property-class>org.jboss.portal.wsrp.admin.ui.BeanContext</property-class>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
<value>#{beanContext}</value>
</managed-property>
</managed-bean>
@@ -89,7 +89,7 @@
</managed-property>
<managed-property>
<property-name>beanContext</property-name>
- <property-class>org.jboss.portal.wsrp.admin.ui.BeanContext</property-class>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
<value>#{beanContext}</value>
</managed-property>
</managed-bean>
@@ -104,7 +104,7 @@
</managed-property>
<managed-property>
<property-name>beanContext</property-name>
- <property-class>org.jboss.portal.wsrp.admin.ui.BeanContext</property-class>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
<value>#{beanContext}</value>
</managed-property>
</managed-bean>
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/common/template.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/common/template.xhtml 2008-09-25 14:53:22 UTC (rev 11983)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/jsf/common/template.xhtml 2008-09-25 15:47:41 UTC (rev 11984)
@@ -1,7 +1,7 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <f:loadBundle basename="WSRPConfigurationResource" var="i18n"/>
+ <f:loadBundle basename="Resource" var="i18n"/>
<div class="wsrp-consumers-ui">
<ui:insert name="topnav">Top navigation</ui:insert>
Copied: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java (from rev 11963, branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/BeanContext.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -0,0 +1,183 @@
+/******************************************************************************
+ * 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.faces.gui;
+
+import org.jboss.portal.common.util.ParameterValidation;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public abstract class BeanContext
+{
+ public static final String STATUS = "status";
+ private static final String RESOURCE_NAME = "Resource";
+ private static final String UNEXPECTED_ERROR = "bean_support_unexpected_error";
+ private static final String CAUSE = "bean_support_cause";
+
+
+ /**
+ * Retrieves the value of the parameter which name is given from the JSF request.
+ *
+ * @param key name of the parameter which value we want to retrieve
+ * @return
+ */
+ public abstract String getParameter(String key);
+
+ protected abstract void createMessage(String target, String message, Object severity);
+
+ protected abstract Object getErrorSeverity();
+
+ protected abstract Object getInfoSeverity();
+
+ protected abstract Locale getLocale();
+
+ public void createErrorMessage(String message, Object... params)
+ {
+ createLocalizedMessage(STATUS, message, getErrorSeverity(), params);
+ }
+
+ protected void createErrorMessage(String target, String message, Object... params)
+ {
+ createLocalizedMessage(target, message, getErrorSeverity(), params);
+ }
+
+ protected void createLocalizedMessage(String target, String message, Object severity, Object... params)
+ {
+ createMessage(target, getMessageFromBundle(message, params), severity);
+ }
+
+ public String getMessageFromBundle(String message, Object... params)
+ {
+ return getLocalizedMessage(message, getLocale(), params);
+ }
+
+ public static String getLocalizedMessage(String localizationKey, Locale locale, Object... params)
+ {
+ ResourceBundle rb = ResourceBundle.getBundle(RESOURCE_NAME, locale);
+ return MessageFormat.format(rb.getString(localizationKey), params);
+ }
+
+ public void createErrorMessageFrom(Exception e)
+ {
+ createErrorMessageFrom(STATUS, e);
+ }
+
+ public void createErrorMessageFrom(String target, Exception e)
+ {
+ Throwable cause = e.getCause();
+ String localizedMessage = getLocalizedMessageOrExceptionName(e);
+ String message = localizedMessage + (cause != null ? "\n" + getMessageFromBundle(CAUSE) + getLocalizedMessageOrExceptionName(cause) : "");
+ createMessage(target, message, getErrorSeverity());
+ }
+
+ private String getLocalizedMessageOrExceptionName(Throwable e)
+ {
+ String localizedMessage = e.getLocalizedMessage();
+ if (localizedMessage == null)
+ {
+ localizedMessage = getMessageFromBundle(UNEXPECTED_ERROR) + e.getClass().getName();
+ }
+ return localizedMessage;
+ }
+
+ protected void createInfoMessage(String target, String message)
+ {
+ createLocalizedMessage(target, message, getInfoSeverity());
+ }
+
+ public void createInfoMessage(String message)
+ {
+ createInfoMessage(STATUS, message);
+ }
+
+ /**
+ * Removes the object identified by the specified name(s) from the session. For a JSF backed implementation, this
+ * will allow for the object/bean (defined as session-scoped in <code>faces-config.xml</code>) to be recreated by JSF
+ * when needed.
+ *
+ * @param name name of the object to be removed
+ * @param otherNames additional names of objects to be removed
+ */
+ public void removeFromSession(String name, String... otherNames)
+ {
+ Map<String, Object> sessionMap = getSessionMap();
+ sessionMap.remove(name);
+ if (otherNames != null)
+ {
+ for (String other : otherNames)
+ {
+ sessionMap.remove(other);
+ }
+ }
+ }
+
+ /**
+ * Retrieves the session map where "session" is a concept left up to implementations (for JSF, the session
+ * corresponds quite logically to the HTTP session)
+ *
+ * @return the session map
+ */
+ public abstract Map<String, Object> getSessionMap();
+
+ /**
+ * Replaces the session object identified by the given name by the specified new one. Passing <code>null</code> for
+ * the new value will remove the object reference from the session. If an object was previously assigned to this
+ * name, then only an object of the same type (as defined by {@link Class#isAssignableFrom(Class)}) can be assigned
+ * to this name.
+ *
+ * @param name the name identifying the object to be replaced
+ * @param newValue the new value for the object to be replaced or <code>null</code> if the object is to be removed
+ * @param <T> the type of the object to be replaced
+ * @return the new value for the object or <code>null</code> if the remove semantics is used
+ */
+ public <T> T replaceInSession(String name, T newValue)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(name, "name", "replaceInSession");
+ Map<String, Object> sessionMap = getSessionMap();
+
+ // if we passed null, use the remove semantics
+ if (newValue == null)
+ {
+ sessionMap.remove(name);
+ return null;
+ }
+
+ Object current = sessionMap.get(name);
+ // check that the new bean is compatible with the previously assigned
+ if (current != null && !newValue.getClass().isAssignableFrom(current.getClass()))
+ {
+ throw new IllegalArgumentException("Provided object: " + newValue + " is not compatible with previously assigned '"
+ + name + "' object: " + current);
+ }
+ sessionMap.put(name, newValue);
+ return newValue;
+ }
+}
Property changes on: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate LastChangedBy LastChangedRevision Id
Copied: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java (from rev 11963, branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/JSFBeanContext.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * 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.faces.gui;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class JSFBeanContext extends BeanContext
+{
+ public String getParameter(String key)
+ {
+ Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ return (String)pmap.get(key);
+ }
+
+ public Map<String, Object> getSessionMap()
+ {
+ return FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
+ }
+
+ protected void createMessage(String target, String message, Object severity)
+ {
+ FacesMessage.Severity jsfSeverity;
+ if (severity instanceof FacesMessage.Severity)
+ {
+ jsfSeverity = (FacesMessage.Severity)severity;
+ }
+ else
+ {
+ jsfSeverity = FacesMessage.SEVERITY_ERROR;
+ }
+
+ FacesMessage msg = new FacesMessage(jsfSeverity, message, message);
+ FacesContext.getCurrentInstance().addMessage(target, msg);
+ }
+
+ protected Object getErrorSeverity()
+ {
+ return FacesMessage.SEVERITY_ERROR;
+ }
+
+ protected Object getInfoSeverity()
+ {
+ return FacesMessage.SEVERITY_INFO;
+ }
+
+ protected Locale getLocale()
+ {
+ return FacesContext.getCurrentInstance().getExternalContext().getRequestLocale();
+ }
+}
Property changes on: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate LastChangedBy LastChangedRevision Id
Copied: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java (from rev 11963, branches/JBoss_Portal_Branch_2_7/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java 2008-09-25 15:47:41 UTC (rev 11984)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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.faces.gui;
+
+import org.apache.log4j.Logger;
+
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class ManagedBean
+{
+ protected Logger log = Logger.getLogger(getClass());
+
+ protected BeanContext beanContext;
+
+ public void setBeanContext(BeanContext beanContext)
+ {
+ this.beanContext = beanContext;
+ }
+}
Property changes on: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate LastChangedBy LastChangedRevision Id
17 years, 7 months
JBoss Portal SVN: r11983 - branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-09-25 10:53:22 -0400 (Thu, 25 Sep 2008)
New Revision: 11983
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
Log:
https://jira.jboss.org/jira/browse/JBPORTAL-2175
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-09-25 14:50:14 UTC (rev 11982)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-09-25 14:53:22 UTC (rev 11983)
@@ -109,20 +109,15 @@
String iconLocation = getIcon(info);
String linkId="portlet-instance-link"+"_"+index;
+ String displayNameId = "info-container-" + displayName.replace("'","/'");
%>
<portlet:actionURL var="url">
<portlet:param name="content.action.select" value="true"/>
<portlet:param name="content.uri" value="<%= instance.getId() %>"/>
</portlet:actionURL>
- <script type="text/javascript">
- //escape single quote and others for js
- var infoContainerId<%=index%> = "<%= displayName %>".replace(/'/,"/'");
- infoContainerId<%=index%> = 'info-container-' + infoContainerId<%=index%>;
- </script>
-
<div style="display:none">
- <div class="darktip" id="" name="darktip<%=index%>">
+ <div class="darktip" id="<%=displayNameId%>">
<div class="toolbar" style="width: 250px;">
<div class="title"><%= getLocalizedValue(portletMetaInfo.getMetaValue(MetaInfo.TITLE), locale) %>
</div>
@@ -137,21 +132,16 @@
</div>
</div>
-
<script type="text/javascript">
- //assign dynamically generated id
- var darktip<%=index%> = document.getElementsByName('darktip<%=index%>')[0];
- try{
- darktip<%=index%>.setAttribute("id", infoContainerId<%=index%>);
- }catch(e){
- //alert(e);
+ function showToolTip<%=index%>(element,event){
+ return domTT_activate(element, event, "content", document.getElementById("<%=displayNameId%>"),"delay", 0, "trail", false, "fade", "both", "fadeMax", 95, "styleClass", "none");
}
</script>
<tr class="<%= rowClass %>">
<td>
<img src="<%= iconLocation %>" align="middle" style="margin:0 4px 0 0" alt="icon"/>
- <span onmouseover="domTT_activate(this, event, 'content', document.getElementById(infoContainerId<%=index%>),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a
+ <span onmouseover="showToolTip<%=index%>(this,event);"><a
href="<%= url %>" id="<%= linkId %>"><%= displayName %>
</a></span></td>
</tr>
17 years, 7 months
JBoss Portal SVN: r11982 - branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-09-25 10:50:14 -0400 (Thu, 25 Sep 2008)
New Revision: 11982
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
Log:
https://jira.jboss.org/jira/browse/JBPORTAL-2175
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-09-25 13:05:42 UTC (rev 11981)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-09-25 14:50:14 UTC (rev 11982)
@@ -133,20 +133,15 @@
String iconLocation = getIcon(info);
String linkId="portlet-instance-link"+"_"+index;
+ String displayNameId = "info-container-" + displayName.replace("'","/'");
%>
<portlet:actionURL var="url">
<portlet:param name="content.action.select" value="true"/>
<portlet:param name="content.uri" value="<%= instance.getId() %>"/>
</portlet:actionURL>
- <script type="text/javascript">
- //escape single quote and others for js
- var infoContainerId<%=index%> = "<%= displayName %>".replace(/'/,"/'");
- infoContainerId<%=index%> = 'info-container-' + infoContainerId<%=index%>;
- </script>
-
<div style="display:none">
- <div class="darktip" id="" name="darktip<%=index%>">
+ <div class="darktip" id="<%=displayNameId%>">
<div class="toolbar" style="width: 250px;">
<div class="title"><%= getLocalizedValue(portletMetaInfo.getMetaValue(MetaInfo.TITLE), locale) %>
</div>
@@ -160,13 +155,10 @@
</div>
</div>
</div>
+
<script type="text/javascript">
- //assign dynamically generated id
- var darktip<%=index%> = document.getElementsByName('darktip<%=index%>')[0];
- try{
- darktip<%=index%>.setAttribute("id", infoContainerId<%=index%>);
- }catch(e){
- //alert(e);
+ function showToolTip<%=index%>(element,event){
+ return domTT_activate(element, event, "content", document.getElementById("<%=displayNameId%>"),"delay", 0, "trail", false, "fade", "both", "fadeMax", 95, "styleClass", "none");
}
</script>
@@ -174,7 +166,7 @@
<td>
<img src="<%= iconLocation %>" align="middle" class="editor-icon" alt="icon"/>
<span
- onmouseover="domTT_activate(this, event, 'content', document.getElementById(infoContainerId<%=index%>),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a
+ onmouseover="showToolTip<%=index%>(this,event);"><a
href="javascript:void(0);" onclick="submitForm('<%= url %>');return false"
id="<%= linkId %>"><%= displayName %>
</a></span>
17 years, 7 months
JBoss Portal SVN: r11981 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-09-25 09:05:42 -0400 (Thu, 25 Sep 2008)
New Revision: 11981
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
Log:
update from 2.6
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-09-25 13:05:42 UTC (rev 11981)
@@ -6,10 +6,14 @@
import org.testng.Assert;
import com.sun.java_cup.internal.internal_error;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "cms_dashboard" }, enabled = true, description = "Dashboard issues test case.")
public class DashboardTestCase extends JBossPortalSeleniumTestCase {
+ private static final String LINK_CONFIGURE_DASHBOARD = "link=Configure dashboard";
+ private static final String LINK_DASHBOARD = "link=Dashboard";
private static final String SELECT_PAGE = "page-selector-form:pageNameSelector";
private static final String INPUT_PAGENAME = "dashboard-form:pageName";
private static final String SUBMIT_CREATEPAGE = "dashboard-form:save-button";
@@ -20,7 +24,6 @@
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
- //selenium.setSpeed("3000");
login("admin", "admin");
}
@@ -31,14 +34,14 @@
@Test(enabled = true)
public void testCreatePage() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.type(INPUT_PAGENAME, "DashTestPage");
selenium.click(SUBMIT_CREATEPAGE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=DashTestPage"));
selenium.click("link=DashTestPage");
@@ -48,24 +51,19 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
-
- System.out.println(selenium.getSelectedLabel(SELECT_PAGE));
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
-
- //selenium.waitForPageToLoad(PAGE_LOAD);
+ selectIfNotSelected("DashTestPage");
selenium.select(SELECT_THEME, "label=renaissance");
selenium.click(SUBMIT_THEMESEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage")) {
@@ -73,30 +71,31 @@
selenium.waitForPageToLoad(PAGE_LOAD);
}
- //System.out.println(selenium.isElementPresent("_id15jbpnsabcsnpbj:themeSelector"));
- //System.out.println(selenium.getSelectedLabel("_id15jbpnsabcsnpbj:themeSelector"));
- Assert.assertEquals("renaissance", selenium.getSelectedLabel(SELECT_THEME));
+ Assert.assertEquals(selenium.getSelectedLabel(SELECT_THEME), "renaissance","Previously selected theme other then expected.");
}
+ private void selectIfNotSelected(String label) {
+ if (!selenium.getSelectedLabel(SELECT_PAGE).equals(label))
+ selenium.select(SELECT_PAGE, "label="+label);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateLayout() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
- //selenium.waitForPageToLoad(PAGE_LOAD);
+ selectIfNotSelected("DashTestPage");
+ Assert.assertEquals(selenium.getSelectedLabel(SELECT_LAYOUT),"default","Default layout is not called \"default\".");
- Assert.assertEquals("default", selenium.getSelectedLabel(SELECT_LAYOUT));
-
selenium.select(SELECT_LAYOUT, "label=generic");
selenium.click(SUBMIT_LAYOUTSEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage")) {
@@ -104,24 +103,22 @@
selenium.waitForPageToLoad(PAGE_LOAD);
}
- Assert.assertEquals("generic", selenium.getSelectedLabel(SELECT_LAYOUT));
+ Assert.assertEquals(selenium.getSelectedLabel(SELECT_LAYOUT),"generic","Previously selected layout other then expected.");
}
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testAddPortlet() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
- //selenium.waitForPageToLoad(PAGE_LOAD);
+ selectIfNotSelected("DashTestPage");
selenium.click("link=Who's online portlet");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("layoutForm:a_center");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -130,30 +127,25 @@
Assert.assertTrue(selenium.isTextPresent("[admin]"));
}
- @Test(enabled = true, dependsOnMethods = { "testCreatePage" })
+ @Test(enabled = false, dependsOnMethods = { "testCreatePage" })
public void testAddGooglePortlet() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
- //selenium.waitForPageToLoad(PAGE_LOAD);
+ selectIfNotSelected("DashTestPage");
selenium.select("abc:instanceId", "label=widget/google");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Hindu God of the Week");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("layoutForm:a_center");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- //selenium.setSpeed("10000");
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Hindu God of the Week"));
- //Assert.assertTrue(selenium.isTextPresent("powered by Google"));
- //selenium.setSpeed("0");
}
@Test(enabled = false, dependsOnMethods = { "testCreatePage" })
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-09-25 13:05:42 UTC (rev 11981)
@@ -6,10 +6,19 @@
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
public class JBossPortalSeleniumTestCase {
+ private static final String LINK_LOGOUT = "link=Logout";
+ private static final String SUBMIT_LOGIN = "login";
+ private static final String ADDR_PORTAL = "/portal/";
+ private static final String FRAME_LOGIN_CONTENT = "login-content";
+ private static final String LINK_LOGIN = "link=Login";
+ private static final String INPUT_PASSWORD = "j_password";
+ private static final String INPUT_USERNAME = "j_username";
protected Selenium selenium;
- protected static final String PAGE_LOAD = "50000";
+ protected static final String PAGE_LOAD = "250000";
@BeforeClass
public void setupChromeForLogin() throws Exception {
@@ -41,7 +50,6 @@
}
}
for (String link : selenium.getAllFields()) {
- //System.out.println(link);
if (link.equals(id)) {
return true;
}
@@ -60,24 +68,32 @@
protected void login(String username, String password) {
selenium.setTimeout("0");
- selenium.open("/portal/");
+ selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
- selenium.click("link=Login");
- selenium.selectFrame("login-content");
- selenium.type("j_username", username);
- selenium.type("j_password", password);
- Assert.assertTrue(selenium.isElementPresent("login"));
- selenium.click("login");
+
+ selenium.click(LINK_LOGIN);
+ selenium.selectFrame(FRAME_LOGIN_CONTENT);
+
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ selenium.type(INPUT_USERNAME, username);
+ selenium.type(INPUT_PASSWORD, password);
+ Assert.assertTrue(selenium.isElementPresent(SUBMIT_LOGIN));
+ selenium.click(SUBMIT_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Logged in as: "+username), "Not logged in, login message missing.");
}
protected void logout() {
- selenium.open("/portal/");
+ selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=Logout"));
- selenium.click("link=Logout");
+ Assert.assertTrue(selenium.isElementPresent(LINK_LOGOUT));
+ selenium.click(LINK_LOGOUT);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "Not logged in, login message missing.");
Assert.assertTrue(selenium.isElementPresent("Link=Login"), "Login link not present.");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java 2008-09-25 13:05:42 UTC (rev 11981)
@@ -10,7 +10,9 @@
import org.testng.annotations.Test;
import com.sun.org.apache.xerces.internal.impl.dtd.models.DFAContentModel;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "cms_user_interceptor" }, enabled = true, description = "Checking the log of logging of users.")
public class UserInterceptorPortletTestCase extends JBossPortalSeleniumTestCase {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-09-25 13:05:42 UTC (rev 11981)
@@ -8,7 +8,9 @@
import org.testng.Assert;
import com.sun.java_cup.internal.internal_error;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "cms_wsrp" }, enabled = true, description = "WSRP test case.")
public class WSRPTestCase extends JBossPortalSeleniumTestCase {
@@ -34,9 +36,9 @@
private static final String INPUT_CACHEEXP = "edit-cons-form:cache";
private static final String SUBMIT_ADDPROP_INIT = "producer-form:add-reg-prop";
private static final String SUBMIT_ADDPROP = "producer-form:add-reg-prop";
- private static final String INPUT_PROPHINT = "producer-form:reg-properties:0:_id33jbpns_2fadmin_2fWSRP_2fWSRPConfigurationPortletWindowsnpbj";
- private static final String INPUT_PROPLABEL = "producer-form:reg-properties:0:_id30jbpns_2fadmin_2fWSRP_2fWSRPConfigurationPortletWindowsnpbj";
- private static final String INPUT_PROPNAME = "producer-form:reg-properties:0:_id24jbpns_2fadmin_2fWSRP_2fWSRPConfigurationPortletWindowsnpbj";
+ private static final String INPUT_PROPHINT = "producer-form:reg-properties:0:hint";
+ private static final String INPUT_PROPLABEL = "producer-form:reg-properties:0:label";
+ private static final String INPUT_PROPNAME = "producer-form:reg-properties:0:name";
private static final String SUBMIT_CREATECONS = "createConsumer:createConsumerButton";
private static final String INPUT_CREATECONS = "createConsumer:consumerName";
private static final String ID_LINK_PRODCONF = "cons-temp-form:producer-link";
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-09-25 13:05:42 UTC (rev 11981)
@@ -4,7 +4,6 @@
import org.jboss.portal.test.selenium.IdentityAdminTestCase;
import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
-import org.jboss.portal.test.selenium.portal.AdminPortalTestCase;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
@@ -17,6 +16,21 @@
@Test(groups = { "cms_secure" }, enabled = true, description = "Setting permissions on the default portlet.")
public class CMSSecureTestCase extends JBossPortalSeleniumTestCase {
+ private static final String LINK_EXPLORE = "link=Explore";
+ private static final String LINK_SUPPORT_HTML = "link=support.html";
+ private static final String LINK_MEMBERS = "link=Members";
+ private static final String SUBMIT_SECURITY_SET = "submit";
+ private static final String SELECT_SECUREUSERS_MANAGE = "secureusers:manage";
+ private static final String SELECT_SECUREROLES_MANAGE = "secureroles:manage";
+ private static final String SELECT_SECUREUSERS_WRITE = "secureusers:write";
+ private static final String SELECT_SECUREROLES_WRITE = "secureroles:write";
+ private static final String SELECT_SECUREUSERS_READ = "secureusers:read";
+ private static final String SELECT_SECUREROLES_READ = "secureroles:read";
+ private static final String LINK_INDEX_HTML = "link=index.html";
+ private static final String LINK_DEFAULT = "link=default";
+ private static final String LINK_CMS = "link=CMS";
+ private static final String LINK_ADMIN = "link=Admin";
+ private static final String LINK_LOGOUT = "link=Logout";
private static final String SELECT_CMS_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
@AfterMethod(groups = { "log" })
@@ -24,34 +38,33 @@
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- if (selenium.isElementPresent("link=Logout")) {
- selenium.click("link=Logout");
+ if (selenium.isElementPresent(LINK_LOGOUT)) {
+ selenium.click(LINK_LOGOUT);
selenium.waitForPageToLoad(PAGE_LOAD);
}
resetSecurity();
}
- // @AfterMethod()
private void resetSecurity() {
login("admin", "admin");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Anonymous");
- selenium.select("secureusers:read", "label=admin");
- selenium.select("secureroles:write", "label=Administrators");
- selenium.select("secureusers:write", "label=admin");
- selenium.select("secureroles:manage", "label=Administrators");
- selenium.select("secureusers:manage", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Anonymous");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.select(SELECT_SECUREROLES_WRITE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_WRITE, "label=admin");
+ selenium.select(SELECT_SECUREROLES_MANAGE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_MANAGE, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
}
@@ -63,9 +76,9 @@
login("admin", "admin");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Members");
+ selenium.click(LINK_MEMBERS);
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(IdentityAdminTestCase.ID_LINK_ROLETAB);
@@ -85,77 +98,67 @@
public void testSetAdminReadPer() {
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Administrators");
- selenium.select("secureusers:read", "label=admin");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
- selenium.click("submit");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#1");
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#2");
logout();
- resetSecurity();
}
@Test(enabled = true, description = "Set user read permissions, login as user.")
public void testSetUserReadPer() {
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Administrators");
- selenium.select("secureusers:read", "label=user");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=user");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#1");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- //Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#2");
logout();
- resetSecurity();
}
@Test(enabled = true, description = "Set admin/secRole read permissions, login as user w secRole.")
@@ -164,40 +167,35 @@
assignRole("user", "user(a)portal.com", "secRole", "secRoleDisp");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=secRoleDisp");
- selenium.select("secureusers:read", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible after logout.");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- //Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible for the \"user\".");
logout();
- resetSecurity();
}
- @Test(enabled = true, description = "Set admin/secRole read permissions, login as user w/o secRole.")
+ @Test(enabled = true,description = "Set admin/secRole read permissions, login as user w/o secRole.")
public void testSetRoleReadPer2() {
login("admin", "admin");
@@ -206,34 +204,30 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=secRoleDisp");
- selenium.select("secureusers:read", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+
login("user", "user");
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
logout();
- resetSecurity();
}
@Test(enabled = false, description = "Recursive permission test")
@@ -245,23 +239,22 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=secRoleDisp");
- selenium.select("secureusers:read", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- resetSecurity();
}
@Test(enabled = true, description = "Subpage permission test")
@@ -271,43 +264,44 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
- selenium.click("link=Explore");
+ selenium.click(LINK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
login("admin", "admin");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=support.html");
+ selenium.click(LINK_SUPPORT_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Administrators");
- selenium.select("secureusers:read", "label=admin");
- selenium.select("secureroles:write", "label=Administrators");
- selenium.select("secureusers:write", "label=admin");
- selenium.select("secureroles:manage", "label=Administrators");
- selenium.select("secureusers:manage", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.select(SELECT_SECUREROLES_WRITE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_WRITE, "label=admin");
+ selenium.select(SELECT_SECUREROLES_MANAGE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_MANAGE, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
selenium.open("/portal/portal/default");
- selenium.click("link=Explore");
selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.click(LINK_EXPLORE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
- resetSecurity();
}
+ //TODO these functions should be used from indetity admin
void assignRole(String user, String email, String role, String roleDisplay) {
searchUser(user, email);
@@ -356,9 +350,9 @@
void searchUser(String username, String email) {
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Members");
+ selenium.click(LINK_MEMBERS);
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(IdentityAdminTestCase.ID_LINK_USERTAB);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-09-25 13:05:42 UTC (rev 11981)
@@ -8,40 +8,44 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "admin_portal" }, enabled = true, description = "Partal administrating.")
public class AdminPortalTestCase extends JBossPortalSeleniumTestCase {
- private static final String INPUT_SUBMIT_PAGECREATE = "_id65jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id67jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private static final String INPUT_PAGENAME = "_id65jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:pageName";
- private static final String INPUT_PORTALNAME = "_id33jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:name";
- private static final String INPUT_SUBMIT_CREATEPORTAL = "_id33jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id35jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
+ private static final String SUBMIT_RENAME_PORTAL = "renameForm:rename";
+ private static final String INPUT_RENAME_PORTAL = "renameForm:newName";
+ private static final String SUBMIT_DELETE_PORTAL_CONF = "_id29jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:confirm-form:delete";
+ private static final String INPUT_SUBMIT_PAGECREATE = "create-page-form:create-page";
+ private static final String INPUT_PAGENAME = "create-page-form:pageName";
+ private static final String INPUT_PORTALNAME = "create-portal-form:name";
+ private static final String INPUT_SUBMIT_CREATEPORTAL = "create-portal-form:create-portal";
private final String TAB_PORTALOBJ_ID = "//div[@id='current']/a";
- // private final String LINK_PORTALS_ID =
- // "_id12jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id15jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj"
- // ;
+
private final String LINK_PORTALS_ID = "link=*Portal Objects*";
- private final String LINK_PORTAL_HOME = "_id12jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id15jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
+ private final String LINK_PORTAL_HOME = "_id8jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id11jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String TABLE_PORTAL_ADMIN = "//form[@id='_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj']/table";
- private final String POR_TL_MAIN = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id43jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_SECURITY = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id48jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_PROPERTIES = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id52jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_THEME = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id56jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_RENAME = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id61jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_DELETE = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id66jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_MAKEDEF = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
+ private final String TABLE_PORTAL_ADMIN = "obj-nav-form:portal-datatable";
+ private final String POR_TL_MAIN = "obj-nav-form:portal-datatable:{0}:object-iid-link";
+ private final String POR_TL_SECURITY = "obj-nav-form:portal-datatable:{0}:security-link";
+ private final String POR_TL_PROPERTIES = "obj-nav-form:portal-datatable:{0}:prop-link";
+ private final String POR_TL_THEME = "obj-nav-form:portal-datatable:{0}:theme-link";
+ private final String POR_TL_RENAME = "obj-nav-form:portal-datatable:{0}:rename";
+ private final String POR_TL_DELETE = "obj-nav-form:portal-datatable:{0}:delete";
+ private final String POR_TL_MAKEDEF = "obj-nav-form:portal-datatable:{0}:default-link";
- private final String TABLE_PORTALPAGE_ADMIN = "//form[@id='_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj']/table";
- private final String PAG_TL_MAIN = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id75jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_LAYOUT = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id80jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_SECURITY = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id84jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_PROPERTIES = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id88jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_THEME = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id92jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_RENAME = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id96jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_DISPLAY = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id100jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_DELETE = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id105jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_MAKEDEF = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id110jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
+ private final String TABLE_PORTALPAGE_ADMIN = "obj-nav-form:pages-datatable";
+ private final String PAG_TL_MAIN = "obj-nav-form:pages-datatable:{0}:object-link";
+ private final String PAG_TL_LAYOUT = "obj-nav-form:pages-datatable:{0}:edit-page-layout";
+ private final String PAG_TL_SECURITY = "obj-nav-form:pages-datatable:{0}:security-link";
+ private final String PAG_TL_PROPERTIES = "obj-nav-form:pages-datatable:{0}:prop-link";
+ private final String PAG_TL_THEME = "obj-nav-form:pages-datatable:{0}:theme-link";
+ private final String PAG_TL_RENAME = "obj-nav-form:pages-datatable:{0}:rename-link_1";
+ private final String PAG_TL_DISPLAY = "obj-nav-form:pages-datatable:{0}:rename-display";
+ private final String PAG_TL_DELETE = "obj-nav-form:pages-datatable:{0}:delete-link";
+ private final String PAG_TL_MAKEDEF = "obj-nav-form:pages-datatable:{0}:default-link";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -95,8 +99,8 @@
selenium.click(MessageFormat.format(POR_TL_RENAME, r));
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.type("renameForm:newName", "AestPortal");
- selenium.click("renameForm:_id34jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj");
+ selenium.type(INPUT_RENAME_PORTAL, "AestPortal");
+ selenium.click(SUBMIT_RENAME_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("TestPortal"));
@@ -124,8 +128,7 @@
Assert.assertTrue(selenium.isTextPresent("WARNING! You are about to delete the TestDelete portal from the context!"));
Assert.assertTrue(selenium.isTextPresent("Delete portal"));
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portal?"));
- selenium
- .click("_id33jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj");
+ selenium.click(SUBMIT_DELETE_PORTAL_CONF);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("TestDelete has successfully been destroyed"));
@@ -147,8 +150,6 @@
final String portalName = "TestAddPortal";
final String portalPage = "tPage";
- // selenium.setSpeed("5000");
-
selenium.type(INPUT_PORTALNAME, portalName);
selenium.click(INPUT_SUBMIT_CREATEPORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -157,8 +158,8 @@
selenium.click(MessageFormat.format(POR_TL_MAIN, r));
selenium.waitForPageToLoad(PAGE_LOAD);
-
- Assert.assertFalse(selenium.isTextPresent(portalPage),"Portal page already present");
+
+ Assert.assertFalse(selenium.isTextPresent(portalPage), "Portal page already present");
Assert.assertTrue(selenium.isTextPresent("Create a page named:"));
selenium.type(INPUT_PAGENAME, portalPage);
@@ -254,6 +255,7 @@
private void createPage(String portalName, String pageName) {
selenium.open("/portal/");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
selenium.waitForPageToLoad(PAGE_LOAD);
17 years, 7 months
JBoss Portal SVN: r11980 - in branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-09-25 08:57:45 -0400 (Thu, 25 Sep 2008)
New Revision: 11980
Modified:
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileManipulationTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
Log:
code refactorring, cleaning, bugfixing
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
@@ -6,10 +6,14 @@
import org.testng.Assert;
import com.sun.java_cup.internal.internal_error;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "cms_dashboard" }, enabled = true, description = "Dashboard issues test case.")
public class DashboardTestCase extends JBossPortalSeleniumTestCase {
+ private static final String LINK_CONFIGURE_DASHBOARD = "link=Configure dashboard";
+ private static final String LINK_DASHBOARD = "link=Dashboard";
private static final String SELECT_PAGE = "page-selector-form:pageNameSelector";
private static final String INPUT_PAGENAME = "dashboard-form:pageName";
private static final String SUBMIT_CREATEPAGE = "dashboard-form:save-button";
@@ -30,14 +34,14 @@
@Test(enabled = true)
public void testCreatePage() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.type(INPUT_PAGENAME, "DashTestPage");
selenium.click(SUBMIT_CREATEPAGE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=DashTestPage"));
selenium.click("link=DashTestPage");
@@ -47,21 +51,19 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
- selenium.waitForPageToLoad(PAGE_LOAD);
+ selectIfNotSelected("DashTestPage");
selenium.select(SELECT_THEME, "label=renaissance");
selenium.click(SUBMIT_THEMESEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage")) {
@@ -70,26 +72,30 @@
}
- Assert.assertEquals("renaissance", selenium.getSelectedLabel(SELECT_THEME));
+ Assert.assertEquals(selenium.getSelectedLabel(SELECT_THEME), "renaissance","Previously selected theme other then expected.");
}
+ private void selectIfNotSelected(String label) {
+ if (!selenium.getSelectedLabel(SELECT_PAGE).equals(label))
+ selenium.select(SELECT_PAGE, "label="+label);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateLayout() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
- selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertEquals("default", selenium.getSelectedLabel(SELECT_LAYOUT));
+ selectIfNotSelected("DashTestPage");
+ Assert.assertEquals(selenium.getSelectedLabel(SELECT_LAYOUT),"default","Default layout is not called \"default\".");
selenium.select(SELECT_LAYOUT, "label=generic");
selenium.click(SUBMIT_LAYOUTSEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage")) {
@@ -97,24 +103,22 @@
selenium.waitForPageToLoad(PAGE_LOAD);
}
- Assert.assertEquals("generic", selenium.getSelectedLabel(SELECT_LAYOUT));
+ Assert.assertEquals(selenium.getSelectedLabel(SELECT_LAYOUT),"generic","Previously selected layout other then expected.");
}
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testAddPortlet() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
- selenium.waitForPageToLoad(PAGE_LOAD);
+ selectIfNotSelected("DashTestPage");
selenium.click("link=Who's online portlet");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("layoutForm:a_center");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -125,27 +129,23 @@
@Test(enabled = false, dependsOnMethods = { "testCreatePage" })
public void testAddGooglePortlet() {
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Configure dashboard");
+ selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
- selenium.select(SELECT_PAGE, "label=DashTestPage");
- selenium.waitForPageToLoad(PAGE_LOAD);
+ selectIfNotSelected("DashTestPage");
selenium.select("abc:instanceId", "label=widget/google");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Hindu God of the Week");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("layoutForm:a_center");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Dashboard");
+ selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Hindu God of the Week"));
- //Assert.assertTrue(selenium.isTextPresent("powered by Google"));
- //selenium.setSpeed("0");
}
@Test(enabled = false, dependsOnMethods = { "testCreatePage" })
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
@@ -6,10 +6,19 @@
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
public class JBossPortalSeleniumTestCase {
+ private static final String LINK_LOGOUT = "link=Logout";
+ private static final String SUBMIT_LOGIN = "login";
+ private static final String ADDR_PORTAL = "/portal/";
+ private static final String FRAME_LOGIN_CONTENT = "login-content";
+ private static final String LINK_LOGIN = "link=Login";
+ private static final String INPUT_PASSWORD = "j_password";
+ private static final String INPUT_USERNAME = "j_username";
protected Selenium selenium;
- protected static final String PAGE_LOAD = "150000";
+ protected static final String PAGE_LOAD = "250000";
@BeforeClass
public void setupChromeForLogin() throws Exception {
@@ -41,7 +50,6 @@
}
}
for (String link : selenium.getAllFields()) {
- //System.out.println(link);
if (link.equals(id)) {
return true;
}
@@ -60,11 +68,11 @@
protected void login(String username, String password) {
selenium.setTimeout("0");
- selenium.open("/portal/");
+ selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Login");
- selenium.selectFrame("login-content");
+ selenium.click(LINK_LOGIN);
+ selenium.selectFrame(FRAME_LOGIN_CONTENT);
try {
Thread.sleep(2000);
@@ -73,20 +81,19 @@
e.printStackTrace();
}
- //selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.type("j_username", username);
- selenium.type("j_password", password);
- Assert.assertTrue(selenium.isElementPresent("login"));
- selenium.click("login");
+ selenium.type(INPUT_USERNAME, username);
+ selenium.type(INPUT_PASSWORD, password);
+ Assert.assertTrue(selenium.isElementPresent(SUBMIT_LOGIN));
+ selenium.click(SUBMIT_LOGIN);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Logged in as: "+username), "Not logged in, login message missing.");
}
protected void logout() {
- selenium.open("/portal/");
+ selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=Logout"));
- selenium.click("link=Logout");
+ Assert.assertTrue(selenium.isElementPresent(LINK_LOGOUT));
+ selenium.click(LINK_LOGOUT);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "Not logged in, login message missing.");
Assert.assertTrue(selenium.isElementPresent("Link=Login"), "Login link not present.");
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
@@ -10,7 +10,9 @@
import org.testng.annotations.Test;
import com.sun.org.apache.xerces.internal.impl.dtd.models.DFAContentModel;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "cms_user_interceptor" }, enabled = true, description = "Checking the log of logging of users.")
public class UserInterceptorPortletTestCase extends JBossPortalSeleniumTestCase {
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
@@ -8,7 +8,9 @@
import org.testng.Assert;
import com.sun.java_cup.internal.internal_error;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "cms_wsrp" }, enabled = true, description = "WSRP test case.")
public class WSRPTestCase extends JBossPortalSeleniumTestCase {
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileManipulationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileManipulationTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileManipulationTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
@@ -5,7 +5,9 @@
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "cms_file" }, enabled = true)
public class CMSFileManipulationTestCase extends JBossPortalSeleniumTestCase {
private static final String SELECT_CMS_MAIN = "//div[@id='center']/div/div/div[1]/div/select";
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
@@ -4,7 +4,6 @@
import org.jboss.portal.test.selenium.IdentityAdminTestCase;
import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
-import org.jboss.portal.test.selenium.portal.AdminPortalTestCase;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
@@ -17,6 +16,21 @@
@Test(groups = { "cms_secure" }, enabled = true, description = "Setting permissions on the default portlet.")
public class CMSSecureTestCase extends JBossPortalSeleniumTestCase {
+ private static final String LINK_EXPLORE = "link=Explore";
+ private static final String LINK_SUPPORT_HTML = "link=support.html";
+ private static final String LINK_MEMBERS = "link=Members";
+ private static final String SUBMIT_SECURITY_SET = "submit";
+ private static final String SELECT_SECUREUSERS_MANAGE = "secureusers:manage";
+ private static final String SELECT_SECUREROLES_MANAGE = "secureroles:manage";
+ private static final String SELECT_SECUREUSERS_WRITE = "secureusers:write";
+ private static final String SELECT_SECUREROLES_WRITE = "secureroles:write";
+ private static final String SELECT_SECUREUSERS_READ = "secureusers:read";
+ private static final String SELECT_SECUREROLES_READ = "secureroles:read";
+ private static final String LINK_INDEX_HTML = "link=index.html";
+ private static final String LINK_DEFAULT = "link=default";
+ private static final String LINK_CMS = "link=CMS";
+ private static final String LINK_ADMIN = "link=Admin";
+ private static final String LINK_LOGOUT = "link=Logout";
private static final String SELECT_CMS_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
@AfterMethod(groups = { "log" })
@@ -24,8 +38,8 @@
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- if (selenium.isElementPresent("link=Logout")) {
- selenium.click("link=Logout");
+ if (selenium.isElementPresent(LINK_LOGOUT)) {
+ selenium.click(LINK_LOGOUT);
selenium.waitForPageToLoad(PAGE_LOAD);
}
@@ -34,23 +48,23 @@
private void resetSecurity() {
login("admin", "admin");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Anonymous");
- selenium.select("secureusers:read", "label=admin");
- selenium.select("secureroles:write", "label=Administrators");
- selenium.select("secureusers:write", "label=admin");
- selenium.select("secureroles:manage", "label=Administrators");
- selenium.select("secureusers:manage", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Anonymous");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.select(SELECT_SECUREROLES_WRITE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_WRITE, "label=admin");
+ selenium.select(SELECT_SECUREROLES_MANAGE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_MANAGE, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
}
@@ -62,9 +76,9 @@
login("admin", "admin");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Members");
+ selenium.click(LINK_MEMBERS);
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(IdentityAdminTestCase.ID_LINK_ROLETAB);
@@ -84,33 +98,33 @@
public void testSetAdminReadPer() {
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Administrators");
- selenium.select("secureusers:read", "label=admin");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
- selenium.click("submit");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#1");
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#2");
logout();
}
@@ -119,30 +133,30 @@
public void testSetUserReadPer() {
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Administrators");
- selenium.select("secureusers:read", "label=user");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=user");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#1");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#2");
logout();
}
@@ -153,35 +167,35 @@
assignRole("user", "user(a)portal.com", "secRole", "secRoleDisp");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=secRoleDisp");
- selenium.select("secureusers:read", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible after logout.");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible for the \"user\".");
logout();
}
- @Test(enabled = true, description = "Set admin/secRole read permissions, login as user w/o secRole.")
+ @Test(enabled = true,description = "Set admin/secRole read permissions, login as user w/o secRole.")
public void testSetRoleReadPer2() {
login("admin", "admin");
@@ -190,19 +204,19 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=secRoleDisp");
- selenium.select("secureusers:read", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -225,19 +239,19 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=index.html");
+ selenium.click(LINK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=secRoleDisp");
- selenium.select("secureusers:read", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -250,42 +264,44 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
- selenium.click("link=Explore");
+ selenium.click(LINK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
login("admin", "admin");
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LINK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=default");
+ selenium.click(LINK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=support.html");
+ selenium.click(LINK_SUPPORT_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("secureroles:read", "label=Administrators");
- selenium.select("secureusers:read", "label=admin");
- selenium.select("secureroles:write", "label=Administrators");
- selenium.select("secureusers:write", "label=admin");
- selenium.select("secureroles:manage", "label=Administrators");
- selenium.select("secureusers:manage", "label=admin");
- selenium.click("submit");
+ selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.select(SELECT_SECUREROLES_WRITE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_WRITE, "label=admin");
+ selenium.select(SELECT_SECUREROLES_MANAGE, "label=Administrators");
+ selenium.select(SELECT_SECUREUSERS_MANAGE, "label=admin");
+ selenium.click(SUBMIT_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
selenium.open("/portal/portal/default");
- selenium.click("link=Explore");
selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.click(LINK_EXPLORE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
}
+ //TODO these functions should be used from indetity admin
void assignRole(String user, String email, String role, String roleDisplay) {
searchUser(user, email);
@@ -334,9 +350,9 @@
void searchUser(String username, String email) {
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Admin");
+ selenium.click(LINK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=Members");
+ selenium.click(LINK_MEMBERS);
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(IdentityAdminTestCase.ID_LINK_USERTAB);
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-09-25 12:57:45 UTC (rev 11980)
@@ -8,6 +8,9 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+/**
+ * @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ */
@Test(groups = { "admin_portal" }, enabled = true, description = "Partal administrating.")
public class AdminPortalTestCase extends JBossPortalSeleniumTestCase {
@@ -20,7 +23,7 @@
private static final String INPUT_SUBMIT_CREATEPORTAL = "create-portal-form:create-portal";
private final String TAB_PORTALOBJ_ID = "//div[@id='current']/a";
-
+
private final String LINK_PORTALS_ID = "link=*Portal Objects*";
private final String LINK_PORTAL_HOME = "_id8jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id11jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
@@ -125,8 +128,7 @@
Assert.assertTrue(selenium.isTextPresent("WARNING! You are about to delete the TestDelete portal from the context!"));
Assert.assertTrue(selenium.isTextPresent("Delete portal"));
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portal?"));
- selenium
- .click(SUBMIT_DELETE_PORTAL_CONF);
+ selenium.click(SUBMIT_DELETE_PORTAL_CONF);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("TestDelete has successfully been destroyed"));
@@ -148,8 +150,6 @@
final String portalName = "TestAddPortal";
final String portalPage = "tPage";
- // selenium.setSpeed("5000");
-
selenium.type(INPUT_PORTALNAME, portalName);
selenium.click(INPUT_SUBMIT_CREATEPORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -158,8 +158,8 @@
selenium.click(MessageFormat.format(POR_TL_MAIN, r));
selenium.waitForPageToLoad(PAGE_LOAD);
-
- Assert.assertFalse(selenium.isTextPresent(portalPage),"Portal page already present");
+
+ Assert.assertFalse(selenium.isTextPresent(portalPage), "Portal page already present");
Assert.assertTrue(selenium.isTextPresent("Create a page named:"));
selenium.type(INPUT_PAGENAME, portalPage);
@@ -255,6 +255,7 @@
private void createPage(String portalName, String pageName) {
selenium.open("/portal/");
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Admin");
selenium.waitForPageToLoad(PAGE_LOAD);
17 years, 7 months
JBoss Portal SVN: r11979 - in branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-09-25 07:41:52 -0400 (Thu, 25 Sep 2008)
New Revision: 11979
Modified:
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
Log:
timeout fix
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-09-25 10:44:44 UTC (rev 11978)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
@@ -62,9 +62,18 @@
selenium.setTimeout("0");
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.click("link=Login");
selenium.selectFrame("login-content");
+
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ //selenium.waitForPageToLoad(PAGE_LOAD);
selenium.type("j_username", username);
selenium.type("j_password", password);
Assert.assertTrue(selenium.isElementPresent("login"));
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-09-25 10:44:44 UTC (rev 11978)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-09-25 11:41:52 UTC (rev 11979)
@@ -32,7 +32,6 @@
resetSecurity();
}
- // @AfterMethod()
private void resetSecurity() {
login("admin", "admin");
selenium.click("link=Admin");
@@ -109,16 +108,11 @@
logout();
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
login("user", "user");
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
logout();
- resetSecurity();
}
@Test(enabled = true, description = "Set user read permissions, login as user.")
@@ -146,16 +140,11 @@
logout();
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
login("user", "user");
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- //Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
logout();
- resetSecurity();
}
@Test(enabled = true, description = "Set admin/secRole read permissions, login as user w secRole.")
@@ -185,16 +174,11 @@
logout();
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
login("user", "user");
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
- //Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
logout();
- resetSecurity();
}
@Test(enabled = true, description = "Set admin/secRole read permissions, login as user w/o secRole.")
@@ -224,16 +208,12 @@
logout();
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
+
login("user", "user");
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
- //Assert.assertTrue(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
-
logout();
- resetSecurity();
}
@Test(enabled = false, description = "Recursive permission test")
@@ -261,7 +241,6 @@
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- resetSecurity();
}
@Test(enabled = true, description = "Subpage permission test")
@@ -305,7 +284,6 @@
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
- resetSecurity();
}
void assignRole(String user, String email, String role, String roleDisplay) {
17 years, 7 months
JBoss Portal SVN: r11978 - in branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium: portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-09-25 06:44:44 -0400 (Thu, 25 Sep 2008)
New Revision: 11978
Modified:
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
Log:
dashboard and portal admin fix
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-09-25 07:04:17 UTC (rev 11977)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-09-25 10:44:44 UTC (rev 11978)
@@ -20,7 +20,6 @@
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
- //selenium.setSpeed("3000");
login("admin", "admin");
}
@@ -53,12 +52,9 @@
selenium.click("link=Configure dashboard");
selenium.waitForPageToLoad(PAGE_LOAD);
-
- System.out.println(selenium.getSelectedLabel(SELECT_PAGE));
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
selenium.select(SELECT_PAGE, "label=DashTestPage");
-
- //selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_THEME, "label=renaissance");
selenium.click(SUBMIT_THEMESEL);
@@ -85,8 +81,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
selenium.select(SELECT_PAGE, "label=DashTestPage");
- //selenium.waitForPageToLoad(PAGE_LOAD);
-
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("default", selenium.getSelectedLabel(SELECT_LAYOUT));
selenium.select(SELECT_LAYOUT, "label=generic");
@@ -114,7 +109,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
selenium.select(SELECT_PAGE, "label=DashTestPage");
- //selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Who's online portlet");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("layoutForm:a_center");
@@ -128,7 +123,7 @@
Assert.assertTrue(selenium.isTextPresent("[admin]"));
}
- @Test(enabled = true, dependsOnMethods = { "testCreatePage" })
+ @Test(enabled = false, dependsOnMethods = { "testCreatePage" })
public void testAddGooglePortlet() {
selenium.click("link=Dashboard");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -136,7 +131,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage"))
selenium.select(SELECT_PAGE, "label=DashTestPage");
- //selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select("abc:instanceId", "label=widget/google");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Hindu God of the Week");
@@ -145,7 +140,6 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Dashboard");
selenium.waitForPageToLoad(PAGE_LOAD);
- //selenium.setSpeed("10000");
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
Modified: branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-09-25 07:04:17 UTC (rev 11977)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-09-25 10:44:44 UTC (rev 11978)
@@ -11,6 +11,9 @@
@Test(groups = { "admin_portal" }, enabled = true, description = "Partal administrating.")
public class AdminPortalTestCase extends JBossPortalSeleniumTestCase {
+ private static final String SUBMIT_RENAME_PORTAL = "renameForm:rename";
+ private static final String INPUT_RENAME_PORTAL = "renameForm:newName";
+ private static final String SUBMIT_DELETE_PORTAL_CONF = "_id29jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:confirm-form:delete";
private static final String INPUT_SUBMIT_PAGECREATE = "create-page-form:create-page";
private static final String INPUT_PAGENAME = "create-page-form:pageName";
private static final String INPUT_PORTALNAME = "create-portal-form:name";
@@ -21,25 +24,25 @@
private final String LINK_PORTALS_ID = "link=*Portal Objects*";
private final String LINK_PORTAL_HOME = "_id8jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id11jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String TABLE_PORTAL_ADMIN = "//form[@id='_id33jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj']/table";
- private final String POR_TL_MAIN = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id43jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_SECURITY = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id48jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_PROPERTIES = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id52jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_THEME = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id56jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_RENAME = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id61jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_DELETE = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id66jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String POR_TL_MAKEDEF = "_id39jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
+ private final String TABLE_PORTAL_ADMIN = "obj-nav-form:portal-datatable";
+ private final String POR_TL_MAIN = "obj-nav-form:portal-datatable:{0}:object-iid-link";
+ private final String POR_TL_SECURITY = "obj-nav-form:portal-datatable:{0}:security-link";
+ private final String POR_TL_PROPERTIES = "obj-nav-form:portal-datatable:{0}:prop-link";
+ private final String POR_TL_THEME = "obj-nav-form:portal-datatable:{0}:theme-link";
+ private final String POR_TL_RENAME = "obj-nav-form:portal-datatable:{0}:rename";
+ private final String POR_TL_DELETE = "obj-nav-form:portal-datatable:{0}:delete";
+ private final String POR_TL_MAKEDEF = "obj-nav-form:portal-datatable:{0}:default-link";
- private final String TABLE_PORTALPAGE_ADMIN = "//form[@id='_id64jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj']/table";
- private final String PAG_TL_MAIN = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id75jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_LAYOUT = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id80jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_SECURITY = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id84jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_PROPERTIES = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id88jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_THEME = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id92jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_RENAME = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id96jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_DISPLAY = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id100jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_DELETE = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id105jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
- private final String PAG_TL_MAKEDEF = "_id71jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id72jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:{0}:_id110jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
+ private final String TABLE_PORTALPAGE_ADMIN = "obj-nav-form:pages-datatable";
+ private final String PAG_TL_MAIN = "obj-nav-form:pages-datatable:{0}:object-link";
+ private final String PAG_TL_LAYOUT = "obj-nav-form:pages-datatable:{0}:edit-page-layout";
+ private final String PAG_TL_SECURITY = "obj-nav-form:pages-datatable:{0}:security-link";
+ private final String PAG_TL_PROPERTIES = "obj-nav-form:pages-datatable:{0}:prop-link";
+ private final String PAG_TL_THEME = "obj-nav-form:pages-datatable:{0}:theme-link";
+ private final String PAG_TL_RENAME = "obj-nav-form:pages-datatable:{0}:rename-link_1";
+ private final String PAG_TL_DISPLAY = "obj-nav-form:pages-datatable:{0}:rename-display";
+ private final String PAG_TL_DELETE = "obj-nav-form:pages-datatable:{0}:delete-link";
+ private final String PAG_TL_MAKEDEF = "obj-nav-form:pages-datatable:{0}:default-link";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -93,8 +96,8 @@
selenium.click(MessageFormat.format(POR_TL_RENAME, r));
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.type("renameForm:newName", "AestPortal");
- selenium.click("renameForm:_id34jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj");
+ selenium.type(INPUT_RENAME_PORTAL, "AestPortal");
+ selenium.click(SUBMIT_RENAME_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent("TestPortal"));
@@ -123,7 +126,7 @@
Assert.assertTrue(selenium.isTextPresent("Delete portal"));
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portal?"));
selenium
- .click("_id33jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id40jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:_id41jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj");
+ .click(SUBMIT_DELETE_PORTAL_CONF);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("TestDelete has successfully been destroyed"));
17 years, 7 months