JBoss Portal SVN: r12122 - in branches/JBoss_Portal_Branch_2_7/core-admin/src: resources/portal-admin-war/jsf and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-10-21 15:29:59 -0400 (Tue, 21 Oct 2008)
New Revision: 12122
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/resources/portal-admin-war/jsf/editCoordination.xhtml
Log:
- JBPORTAL-1919: finishing touches:
+ Do not include duplicates in source or destination events when displaying a wiring
+ Now using arrows to convey connection between windows and events in wirings list
+ Cleaned-up markup and fixed an improper style attribute instead of class
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-10-21 18:40:41 UTC (rev 12121)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/coordination/EventWiringManagerBean.java 2008-10-21 19:29:59 UTC (rev 12122)
@@ -42,6 +42,7 @@
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
+import java.util.HashSet;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -352,11 +353,11 @@
Map<Window, QName> sources = eventInfo.getSources();
sourceWindows = new ArrayList<Window>(sources.keySet());
- sourceEvents = new ArrayList<QName>(sources.values());
+ sourceEvents = new ArrayList<QName>(new HashSet<QName>(sources.values()));
Map<Window, QName> destinations = eventInfo.getDestinations();
destinationWindows = new ArrayList<Window>(destinations.keySet());
- destinationEvents = new ArrayList<QName>(destinations.values());
+ destinationEvents = new ArrayList<QName>(new HashSet<QName>(destinations.values()));
}
public EventWiringInfo getEventInfo()
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-10-21 18:40:41 UTC (rev 12121)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-10-21 19:29:59 UTC (rev 12122)
@@ -41,26 +41,25 @@
</h:selectManyListbox>
</div>
<div class="float-left aliasBinding-step2">
- <h:panelGroup rendered="#{!empty aliasManager.originalQNames}">
+ <h:panelGroup rendered="#{!empty aliasManager.originalQNames}">
<h4>#{bundle.COORDINATION_ALIAS_CREATE_STEP2}</h4>
- <div style="full-width">
- <span><h:inputText id="aliasName" value="#{aliasManager.aliasName}"/></span>
+ <div class="full-width">
+ <span><h:inputText id="aliasName" value="#{aliasManager.aliasName}"/></span>
<span>
<h:commandButton value="#{bundle.COORDINATION_ALIAS_CREATE_CREATE}"
- action="#{aliasManager.create}" styleClass="portlet-form-button"/>
+ action="#{aliasManager.create}" styleClass="portlet-form-button"/>
<h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{aliasManager.cancel}"
- styleClass="portlet-form-button"/>
+ styleClass="portlet-form-button"/>
</span>
</div>
<div>
<ul class="bindingList">
<ui:repeat var="selectedQNames" value="#{aliasManager.originalQNames}">
- <li>#{selectedQNames}</li>
+ <li>#{selectedQNames}</li>
</ui:repeat>
</ul>
</div>
-
- </h:panelGroup>
+ </h:panelGroup>
</div>
<br class="clear"/>
</h:form>
@@ -94,16 +93,16 @@
<h:column>
<f:facet name="header">#{bundle.COORDINATION_ALIAS_EXISTING_ACTIONS}</f:facet>
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:commandLink action="renameCoordination" actionListener="#{coordinationManager.select}">
- <h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
- <f:param name="name" value="#{binding.name}"/>
- <f:param name="type" value="alias"/>
- </h:commandLink>
- <h:commandLink action="confirmCoordinationDeletion" actionListener="#{coordinationManager.select}">
- <h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
- <f:param name="name" value="#{binding.name}"/>
- <f:param name="type" value="alias"/>
- </h:commandLink>
+ <h:commandLink action="renameCoordination" actionListener="#{coordinationManager.select}">
+ <h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
+ <f:param name="name" value="#{binding.name}"/>
+ <f:param name="type" value="alias"/>
+ </h:commandLink>
+ <h:commandLink action="confirmCoordinationDeletion" actionListener="#{coordinationManager.select}">
+ <h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
+ <f:param name="name" value="#{binding.name}"/>
+ <f:param name="type" value="alias"/>
+ </h:commandLink>
</h:panelGrid>
</h:column>
</h:dataTable>
@@ -174,19 +173,13 @@
<div class="full-width">
<ui:repeat var="pair" value="#{binding.parameterWindowPairs}">
<div class="float-left pad5">
- <div class="paramList-header">#{pair.window.name}</div>
+ <div class="paramList-header">#{pair.window.name}</div>
<ul class="paramList">
- <c:set var="pairname" value="#{fn:split(pair.name, ';')}" />
- <ui:repeat var="name" value="#{pairname}">
- <li>#{name}</li>
- </ui:repeat>
+ <c:set var="pairname" value="#{fn:split(pair.name, ';')}" />
+ <ui:repeat var="name" value="#{pairname}">
+ <li>#{name}</li>
+ </ui:repeat>
</ul>
- <ui:remove>
- <!--<h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">-->
- <!--<f:param name="id" value="#{pair.window.id}"/>-->
- <!--#{pair.window.name}-->
- <!--</h:commandLink>-->
- </ui:remove>
</div>
</ui:repeat>
</div>
@@ -337,14 +330,14 @@
headerClass="portlet-section-header">
<h:column>
<f:facet name="header">
- <h4>#{bundle.COORDINATION_EVENT_EXISTING_NAME}</h4>
+ #{bundle.COORDINATION_EVENT_EXISTING_NAME}
</f:facet>
#{wiring.name}
</h:column>
<h:column>
<f:facet name="header">
- #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_WINDOWS} / #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_EVENTS}
+ #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_WINDOWS} ⇒ #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_EVENTS}
</f:facet>
<ul class="sourceWindowList">
<ui:repeat var="window" value="#{wiring.sourceWindows}">
@@ -356,28 +349,16 @@
</li>
</ui:repeat>
</ul>
- <hr/>
+ <span style="display: block; text-align:center;">⇓</span>
<ul class="sourceEventList">
<ui:repeat var="event" value="#{wiring.sourceEvents}">
<li>#{event}</li>
</ui:repeat>
</ul>
</h:column>
- <ui:remove>
- <!--<h:column>-->
- <!--<f:facet name="header">-->
- <!--<h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_SOURCE_EVENTS}"/>-->
- <!--</f:facet>-->
- <!--<ul class="sourceEventList">-->
- <!--<ui:repeat var="event" value="#{wiring.sourceEvents}">-->
- <!--<li>#{event}</li>-->
- <!--</ui:repeat>-->
- <!--</ul>-->
- <!--</h:column>-->
- </ui:remove>
<h:column>
<f:facet name="header">
- #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_WINDOWS} / #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_EVENTS}
+ #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_WINDOWS} ⇐ #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_EVENTS}
</f:facet>
<ul class="destWindowList">
@@ -390,7 +371,7 @@
</li>
</ui:repeat>
</ul>
- <hr/>
+ <span style="display: block; text-align:center;">⇑</span>
<ul class="destEventList">
<ui:repeat var="event" value="#{wiring.destinationEvents}">
<li>#{event}</li>
@@ -399,23 +380,6 @@
</h:column>
- <ui:remove>
- <!--<h:column>-->
- <!--<f:facet name="header">-->
- <!--<h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_WINDOWS}"/>-->
- <!--</f:facet>-->
- <!--<ul class="destEventList">-->
- <!--<ui:repeat var="window" value="#{wiring.destinationWindows}">-->
- <!--<li>-->
- <!--<h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">-->
- <!--<f:param name="id" value="#{window.id}"/>-->
- <!--#{window.name}-->
- <!--</h:commandLink>-->
- <!--</li>-->
- <!--</ui:repeat>-->
- <!--</ul>-->
- <!--</h:column>-->
- </ui:remove>
<h:column>
<f:facet name="header">
#{bundle.COORDINATION_EVENT_EXISTING_ACTIONS}
17 years, 9 months
JBoss Portal SVN: r12121 - branches/JBoss_Portal_Branch_2_6/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-10-21 14:40:41 -0400 (Tue, 21 Oct 2008)
New Revision: 12121
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
Log:
Update javadoc task
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2008-10-21 18:35:49 UTC (rev 12120)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2008-10-21 18:40:41 UTC (rev 12121)
@@ -344,13 +344,13 @@
<javadoc destdir="javadoc">
<classpath>
<fileset dir="../thirdparty" includes="**/*.jar"/>
- <fileset dir="../../common/thirdparty" includes="**/*.jar"/>
- <fileset dir="../../common/tools/lib" includes="**/*.jar"/>
<fileset dir="../../identity/thirdparty" includes="**/*.jar"/>
<fileset dir="../../portlet/thirdparty" includes="**/*.jar"/>
<fileset dir="../../test/thirdparty" includes="**/*.jar"/>
<fileset dir="../../test/test" includes="**/*.jar"/>
<fileset dir="../../web/thirdparty" includes="**/*.jar"/>
+ <fileset dir="/home/theute/.m2/repository/ant/ant-junit/1.6.5" includes="ant-junit-1.6.5.jar"/>
+ <fileset dir="/home/theute/.m2/repository/org/codehaus/cargo/cargo-core-uberjar/0.8" includes="cargo-core-uberjar-0.8.jar"/>
</classpath>
<packageset dir="../server/src/main">
<exclude name="org/jboss/portal/test/**"/>
@@ -468,7 +468,6 @@
<exclude name="org/jboss/portal/test/**"/>
</packageset>
- <link href="/tmp/2.6.2/portlet/build/javadoc" packagelistLoc="/tmp/2.6.2/portlet/build/javadoc"/>
</javadoc>
</target>
17 years, 9 months
JBoss Portal SVN: r12120 - tags/JBoss_Portal_2_6_7/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-10-21 14:35:49 -0400 (Tue, 21 Oct 2008)
New Revision: 12120
Modified:
tags/JBoss_Portal_2_6_7/build/build.xml
Log:
Adapt javadoc task
Modified: tags/JBoss_Portal_2_6_7/build/build.xml
===================================================================
--- tags/JBoss_Portal_2_6_7/build/build.xml 2008-10-21 18:34:12 UTC (rev 12119)
+++ tags/JBoss_Portal_2_6_7/build/build.xml 2008-10-21 18:35:49 UTC (rev 12120)
@@ -344,13 +344,13 @@
<javadoc destdir="javadoc">
<classpath>
<fileset dir="../thirdparty" includes="**/*.jar"/>
- <fileset dir="../../common/thirdparty" includes="**/*.jar"/>
- <fileset dir="../../common/tools/lib" includes="**/*.jar"/>
<fileset dir="../../identity/thirdparty" includes="**/*.jar"/>
<fileset dir="../../portlet/thirdparty" includes="**/*.jar"/>
<fileset dir="../../test/thirdparty" includes="**/*.jar"/>
<fileset dir="../../test/test" includes="**/*.jar"/>
<fileset dir="../../web/thirdparty" includes="**/*.jar"/>
+ <fileset dir="/home/theute/.m2/repository/ant/ant-junit/1.6.5" includes="ant-junit-1.6.5.jar"/>
+ <fileset dir="/home/theute/.m2/repository/org/codehaus/cargo/cargo-core-uberjar/0.8" includes="cargo-core-uberjar-0.8.jar"/>
</classpath>
<packageset dir="../server/src/main">
<exclude name="org/jboss/portal/test/**"/>
@@ -468,7 +468,6 @@
<exclude name="org/jboss/portal/test/**"/>
</packageset>
- <link href="/tmp/2.6.2/portlet/build/javadoc" packagelistLoc="/tmp/2.6.2/portlet/build/javadoc"/>
</javadoc>
</target>
17 years, 9 months
JBoss Portal SVN: r12119 - branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-10-21 14:34:12 -0400 (Tue, 21 Oct 2008)
New Revision: 12119
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml
Log:
- Re-indenting (yes, I'm a maniac ^_^).
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-10-21 18:30:26 UTC (rev 12118)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-10-21 18:34:12 UTC (rev 12119)
@@ -30,188 +30,188 @@
<!-- Create alias binding -->
<div id="aliasBindings">
- <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_ALIAS_CREATE}</h3>
- <h:outputText value="#{bundle.COORDINATION_ALIAS_CREATE_NO_PARAMS}" rendered="#{empty aliasManager.availableRenderParameters}"/>
- <h:form rendered="#{!empty aliasManager.availableRenderParameters}">
- <div class="float-left tenpx-right">
- <h4>#{bundle.COORDINATION_ALIAS_CREATE_STEP1}</h4>
- <h:selectManyListbox id="alias" size="5" value="#{aliasManager.originalQNames}"
- immediate="true" onchange="this.form.submit()">
- <f:selectItems value="#{aliasManager.availableRenderParameters}"/>
- </h:selectManyListbox>
- </div>
- <div class="float-left aliasBinding-step2">
- <h:panelGroup rendered="#{!empty aliasManager.originalQNames}">
- <h4>#{bundle.COORDINATION_ALIAS_CREATE_STEP2}</h4>
- <div style="full-width">
- <span><h:inputText id="aliasName" value="#{aliasManager.aliasName}"/></span>
- <span>
- <h:commandButton value="#{bundle.COORDINATION_ALIAS_CREATE_CREATE}"
- action="#{aliasManager.create}" styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{aliasManager.cancel}"
- styleClass="portlet-form-button"/>
- </span>
- </div>
- <div>
- <ul class="bindingList">
- <ui:repeat var="selectedQNames" value="#{aliasManager.originalQNames}">
- <li>#{selectedQNames}</li>
- </ui:repeat>
- </ul>
- </div>
-
- </h:panelGroup>
- </div>
- <br class="clear"/>
- </h:form>
-
- <!-- Manage existing alias bindings -->
- <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_ALIAS_MANAGE_EXISTING}</h3>
- <h:outputText value="#{bundle.COORDINATION_ALIAS_EXISTING_NONE}" rendered="#{empty aliasManager.displayAliasBindings}"/>
- <h:form rendered="#{!empty aliasManager.displayAliasBindings}">
- <div class="float-left full-width">
- <h:dataTable var="binding" value="#{aliasManager.displayAliasBindings}"
- rendered="true" styleClass="objectList datatable full-width"
- rowClasses="portlet-section-body,portlet-section-alternate-blue"
- columnClasses="half-width"
- headerClass="portlet-section-header">
- <h:column>
- <f:facet name="header">#{bundle.COORDINATION_ALIAS_EXISTING_NAME}</f:facet>
- <div class="bindingListContainer">
- <div class="bindingList-header">#{binding.name}</div>
- <ul class="bindingList">
- <ui:repeat var="qname" value="#{binding.names}">
- <li>#{qname}</li>
- </ui:repeat>
- </ul>
- </div>
- </h:column>
- <ui:remove>
- <h:column>
- <f:facet name="header">#{bundle.COORDINATION_ALIAS_EXISTING_ORIGINAL}</f:facet>
- </h:column>
- </ui:remove>
- <h:column>
- <f:facet name="header">#{bundle.COORDINATION_ALIAS_EXISTING_ACTIONS}</f:facet>
- <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:commandLink action="renameCoordination" actionListener="#{coordinationManager.select}">
- <h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
- <f:param name="name" value="#{binding.name}"/>
- <f:param name="type" value="alias"/>
- </h:commandLink>
- <h:commandLink action="confirmCoordinationDeletion" actionListener="#{coordinationManager.select}">
- <h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
- <f:param name="name" value="#{binding.name}"/>
- <f:param name="type" value="alias"/>
- </h:commandLink>
- </h:panelGrid>
- </h:column>
- </h:dataTable>
- </div>
- <br class="clear"/>
- </h:form>
- </div>
- </div>
-
- <div class="tenpx-top-bottom">
- <h2 class="portlet-area-header" onclick="toggle_visibility('parameterBindings');" style="cursor: pointer"><a name="#{bundle.COORDINATION_PARAMETER_BINDINGS}"/>#{bundle.COORDINATION_PARAMETER_BINDINGS}</h2>
- <div id="parameterBindings">
- <h:form>
- <h:selectBooleanCheckbox id="useExplicitBinding" value="#{coordinationManager.explicitParametersUsed}"
- onchange="this.form.submit()" immediate="true"/>
- #{bundle.COORDINATION_PARAMETER_EXPLICIT_MODE}
- </h:form>
-
- <h:panelGroup rendered="#{coordinationManager.explicitParametersUsed}">
- <hr/>
-
- <!-- Create parameter binding -->
- <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_PARAMETER_CREATE}</h3>
- <h:outputText value="#{bundle.COORDINATION_PARAMETER_CREATE_NO_PAIRS}" rendered="#{empty parameterManager.availableParameterWindowPairs}"/>
- <h:form rendered="#{!empty parameterManager.availableParameterWindowPairs}">
+ <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_ALIAS_CREATE}</h3>
+ <h:outputText value="#{bundle.COORDINATION_ALIAS_CREATE_NO_PARAMS}" rendered="#{empty aliasManager.availableRenderParameters}"/>
+ <h:form rendered="#{!empty aliasManager.availableRenderParameters}">
<div class="float-left tenpx-right">
- <h4>#{bundle.COORDINATION_PARAMETER_CREATE_STEP1}</h4>
- <h:selectManyListbox id="parameterWindowPair" size="5" value="#{parameterManager.selectedParameterWindowPairs}"
+ <h4>#{bundle.COORDINATION_ALIAS_CREATE_STEP1}</h4>
+ <h:selectManyListbox id="alias" size="5" value="#{aliasManager.originalQNames}"
immediate="true" onchange="this.form.submit()">
- <f:selectItems value="#{parameterManager.availableParameterWindowPairs}"/>
+ <f:selectItems value="#{aliasManager.availableRenderParameters}"/>
</h:selectManyListbox>
</div>
-
- <h:panelGroup rendered="#{!empty parameterManager.selectedParameterWindowPairs}">
- <div class="float-left paramBinding-step2">
- <h4>#{bundle.COORDINATION_PARAMETER_CREATE_STEP2}</h4>
- <div class="full-width">
- <span><h:inputText id="bindingName" value="#{parameterManager.windowBindingName}"/></span>
+ <div class="float-left aliasBinding-step2">
+ <h:panelGroup rendered="#{!empty aliasManager.originalQNames}">
+ <h4>#{bundle.COORDINATION_ALIAS_CREATE_STEP2}</h4>
+ <div style="full-width">
+ <span><h:inputText id="aliasName" value="#{aliasManager.aliasName}"/></span>
<span>
- <h:commandButton value="#{bundle.COORDINATION_PARAMETER_CREATE_CREATE}"
- action="#{parameterManager.create}" styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{parameterManager.cancel}"
+ <h:commandButton value="#{bundle.COORDINATION_ALIAS_CREATE_CREATE}"
+ action="#{aliasManager.create}" styleClass="portlet-form-button"/>
+ <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{aliasManager.cancel}"
styleClass="portlet-form-button"/>
</span>
</div>
- </div>
+ <div>
+ <ul class="bindingList">
+ <ui:repeat var="selectedQNames" value="#{aliasManager.originalQNames}">
+ <li>#{selectedQNames}</li>
+ </ui:repeat>
+ </ul>
+ </div>
+
</h:panelGroup>
-
+ </div>
<br class="clear"/>
</h:form>
- <!-- Manage existing parameter bindings -->
- <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_PARAMETER_MANAGE_EXISTING}</h3>
- <div class="float-left full-width">
- <h:outputText value="#{bundle.COORDINATION_PARAMETER_EXISTING_NONE}" rendered="#{empty parameterManager.displayParameterBindings}"/>
- <h:form rendered="#{!empty parameterManager.displayParameterBindings}">
- <h:dataTable var="binding" value="#{parameterManager.displayParameterBindings}"
+ <!-- Manage existing alias bindings -->
+ <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_ALIAS_MANAGE_EXISTING}</h3>
+ <h:outputText value="#{bundle.COORDINATION_ALIAS_EXISTING_NONE}" rendered="#{empty aliasManager.displayAliasBindings}"/>
+ <h:form rendered="#{!empty aliasManager.displayAliasBindings}">
+ <div class="float-left full-width">
+ <h:dataTable var="binding" value="#{aliasManager.displayAliasBindings}"
rendered="true" styleClass="objectList datatable full-width"
rowClasses="portlet-section-body,portlet-section-alternate-blue"
- columnClasses="ten-percent-width,half-width,quarter-width"
+ columnClasses="half-width"
headerClass="portlet-section-header">
<h:column>
- <f:facet name="header">#{bundle.COORDINATION_PARAMETER_EXISTING_NAME}</f:facet>
- <h4>#{binding.name}</h4>
+ <f:facet name="header">#{bundle.COORDINATION_ALIAS_EXISTING_NAME}</f:facet>
+ <div class="bindingListContainer">
+ <div class="bindingList-header">#{binding.name}</div>
+ <ul class="bindingList">
+ <ui:repeat var="qname" value="#{binding.names}">
+ <li>#{qname}</li>
+ </ui:repeat>
+ </ul>
+ </div>
</h:column>
+ <ui:remove>
<h:column>
- <f:facet name="header">#{bundle.COORDINATION_PARAMETER_EXISTING_PAIRS}</f:facet>
- <div class="full-width">
- <ui:repeat var="pair" value="#{binding.parameterWindowPairs}">
- <div class="float-left pad5">
- <div class="paramList-header">#{pair.window.name}</div>
- <ul class="paramList">
- <c:set var="pairname" value="#{fn:split(pair.name, ';')}" />
- <ui:repeat var="name" value="#{pairname}">
- <li>#{name}</li>
- </ui:repeat>
- </ul>
- <ui:remove>
- <!--<h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">-->
- <!--<f:param name="id" value="#{pair.window.id}"/>-->
- <!--#{pair.window.name}-->
- <!--</h:commandLink>-->
- </ui:remove>
- </div>
- </ui:repeat>
- </div>
-
+ <f:facet name="header">#{bundle.COORDINATION_ALIAS_EXISTING_ORIGINAL}</f:facet>
</h:column>
+ </ui:remove>
<h:column>
- <f:facet name="header">#{bundle.COORDINATION_PARAMETER_EXISTING_ACTIONS}</f:facet>
+ <f:facet name="header">#{bundle.COORDINATION_ALIAS_EXISTING_ACTIONS}</f:facet>
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
<h:commandLink action="renameCoordination" actionListener="#{coordinationManager.select}">
<h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
<f:param name="name" value="#{binding.name}"/>
- <f:param name="type" value="parameter"/>
+ <f:param name="type" value="alias"/>
</h:commandLink>
<h:commandLink action="confirmCoordinationDeletion" actionListener="#{coordinationManager.select}">
<h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
<f:param name="name" value="#{binding.name}"/>
- <f:param name="type" value="parameter"/>
+ <f:param name="type" value="alias"/>
</h:commandLink>
</h:panelGrid>
</h:column>
</h:dataTable>
+ </div>
+ <br class="clear"/>
+ </h:form>
+ </div>
+ </div>
+
+ <div class="tenpx-top-bottom">
+ <h2 class="portlet-area-header" onclick="toggle_visibility('parameterBindings');" style="cursor: pointer"><a name="#{bundle.COORDINATION_PARAMETER_BINDINGS}"/>#{bundle.COORDINATION_PARAMETER_BINDINGS}</h2>
+ <div id="parameterBindings">
+ <h:form>
+ <h:selectBooleanCheckbox id="useExplicitBinding" value="#{coordinationManager.explicitParametersUsed}"
+ onchange="this.form.submit()" immediate="true"/>
+ #{bundle.COORDINATION_PARAMETER_EXPLICIT_MODE}
+ </h:form>
+
+ <h:panelGroup rendered="#{coordinationManager.explicitParametersUsed}">
+ <hr/>
+
+ <!-- Create parameter binding -->
+ <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_PARAMETER_CREATE}</h3>
+ <h:outputText value="#{bundle.COORDINATION_PARAMETER_CREATE_NO_PAIRS}" rendered="#{empty parameterManager.availableParameterWindowPairs}"/>
+ <h:form rendered="#{!empty parameterManager.availableParameterWindowPairs}">
+ <div class="float-left tenpx-right">
+ <h4>#{bundle.COORDINATION_PARAMETER_CREATE_STEP1}</h4>
+ <h:selectManyListbox id="parameterWindowPair" size="5" value="#{parameterManager.selectedParameterWindowPairs}"
+ immediate="true" onchange="this.form.submit()">
+ <f:selectItems value="#{parameterManager.availableParameterWindowPairs}"/>
+ </h:selectManyListbox>
+ </div>
+
+ <h:panelGroup rendered="#{!empty parameterManager.selectedParameterWindowPairs}">
+ <div class="float-left paramBinding-step2">
+ <h4>#{bundle.COORDINATION_PARAMETER_CREATE_STEP2}</h4>
+ <div class="full-width">
+ <span><h:inputText id="bindingName" value="#{parameterManager.windowBindingName}"/></span>
+ <span>
+ <h:commandButton value="#{bundle.COORDINATION_PARAMETER_CREATE_CREATE}"
+ action="#{parameterManager.create}" styleClass="portlet-form-button"/>
+ <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{parameterManager.cancel}"
+ styleClass="portlet-form-button"/>
+ </span>
+ </div>
+ </div>
+ </h:panelGroup>
+
+ <br class="clear"/>
</h:form>
- </div>
- </h:panelGroup>
- <br class="clear"/>
+
+ <!-- Manage existing parameter bindings -->
+ <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_PARAMETER_MANAGE_EXISTING}</h3>
+ <div class="float-left full-width">
+ <h:outputText value="#{bundle.COORDINATION_PARAMETER_EXISTING_NONE}" rendered="#{empty parameterManager.displayParameterBindings}"/>
+ <h:form rendered="#{!empty parameterManager.displayParameterBindings}">
+ <h:dataTable var="binding" value="#{parameterManager.displayParameterBindings}"
+ rendered="true" styleClass="objectList datatable full-width"
+ rowClasses="portlet-section-body,portlet-section-alternate-blue"
+ columnClasses="ten-percent-width,half-width,quarter-width"
+ headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">#{bundle.COORDINATION_PARAMETER_EXISTING_NAME}</f:facet>
+ <h4>#{binding.name}</h4>
+ </h:column>
+ <h:column>
+ <f:facet name="header">#{bundle.COORDINATION_PARAMETER_EXISTING_PAIRS}</f:facet>
+ <div class="full-width">
+ <ui:repeat var="pair" value="#{binding.parameterWindowPairs}">
+ <div class="float-left pad5">
+ <div class="paramList-header">#{pair.window.name}</div>
+ <ul class="paramList">
+ <c:set var="pairname" value="#{fn:split(pair.name, ';')}" />
+ <ui:repeat var="name" value="#{pairname}">
+ <li>#{name}</li>
+ </ui:repeat>
+ </ul>
+ <ui:remove>
+ <!--<h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">-->
+ <!--<f:param name="id" value="#{pair.window.id}"/>-->
+ <!--#{pair.window.name}-->
+ <!--</h:commandLink>-->
+ </ui:remove>
+ </div>
+ </ui:repeat>
+ </div>
+
+ </h:column>
+ <h:column>
+ <f:facet name="header">#{bundle.COORDINATION_PARAMETER_EXISTING_ACTIONS}</f:facet>
+ <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
+ <h:commandLink action="renameCoordination" actionListener="#{coordinationManager.select}">
+ <h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
+ <f:param name="name" value="#{binding.name}"/>
+ <f:param name="type" value="parameter"/>
+ </h:commandLink>
+ <h:commandLink action="confirmCoordinationDeletion" actionListener="#{coordinationManager.select}">
+ <h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
+ <f:param name="name" value="#{binding.name}"/>
+ <f:param name="type" value="parameter"/>
+ </h:commandLink>
+ </h:panelGrid>
+ </h:column>
+ </h:dataTable>
+ </h:form>
+ </div>
+ </h:panelGroup>
+ <br class="clear"/>
</div>
</div>
@@ -243,31 +243,31 @@
<div class="full-width pad5">
<h4>#{bundle.COORDINATION_EVENT_CREATE_STEP2}</h4>
<div class="pad5"><h:graphicImage url="/img/jbp-icon-set/event_source.gif"/> #{eventManager.selectedSourceEvent}</div>
- <h:selectManyListbox id="sourceWindows" size="5" value="#{eventManager.selectedSourceWindows}" immediate="true"
- onchange="this.form.submit()">
- <f:selectItems value="#{eventManager.sourceWindows}"/>
- </h:selectManyListbox>
+ <h:selectManyListbox id="sourceWindows" size="5" value="#{eventManager.selectedSourceWindows}" immediate="true"
+ onchange="this.form.submit()">
+ <f:selectItems value="#{eventManager.sourceWindows}"/>
+ </h:selectManyListbox>
</div>
</f:subview>
<f:subview id="COORDINATION_EVENT_CREATE_STEP3" rendered="#{!empty eventManager.selectedSourceWindows}">
<div class="full-width pad5">
- <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP3}</h4>
- <h:selectOneListbox id="destEvent" size="5" value="#{eventManager.selectedDestinationEvent}" immediate="true"
- onchange="this.form.submit()">
- <f:selectItems value="#{eventManager.destinationEvents}"/>
- </h:selectOneListbox>
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP3}</h4>
+ <h:selectOneListbox id="destEvent" size="5" value="#{eventManager.selectedDestinationEvent}" immediate="true"
+ onchange="this.form.submit()">
+ <f:selectItems value="#{eventManager.destinationEvents}"/>
+ </h:selectOneListbox>
</div>
</f:subview>
<f:subview id="COORDINATION_EVENT_CREATE_STEP4" rendered="#{!empty eventManager.selectedDestinationEvent}">
<div class="full-width pad5">
- <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP4}</h4>
- <div class="pad5"><h:graphicImage url="/img/jbp-icon-set/event_dest.gif"/>#{eventManager.selectedDestinationEvent}</div>
- <h:selectManyListbox id="destWindows" size="5" value="#{eventManager.selectedDestinationWindows}" immediate="true"
- onchange="this.form.submit()">
- <f:selectItems value="#{eventManager.destinationWindows}"/>
- </h:selectManyListbox>
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP4}</h4>
+ <div class="pad5"><h:graphicImage url="/img/jbp-icon-set/event_dest.gif"/>#{eventManager.selectedDestinationEvent}</div>
+ <h:selectManyListbox id="destWindows" size="5" value="#{eventManager.selectedDestinationWindows}" immediate="true"
+ onchange="this.form.submit()">
+ <f:selectItems value="#{eventManager.destinationWindows}"/>
+ </h:selectManyListbox>
</div>
</f:subview>
17 years, 9 months
JBoss Portal SVN: r12118 - in branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war: jsf and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-10-21 14:30:26 -0400 (Tue, 21 Oct 2008)
New Revision: 12118
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml
Log:
- JBPORTAL-1919: Localization and improvements of wording and formatting.
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2008-10-21 15:24:10 UTC (rev 12117)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2008-10-21 18:30:26 UTC (rev 12118)
@@ -274,7 +274,7 @@
COORDINATION_PARAMETER_MANAGE_EXISTING=Manage existing parameter bindings:
COORDINATION_PARAMETER_EXISTING_NONE=No existing parameter bindings.
COORDINATION_PARAMETER_EXISTING_NAME=Name
-COORDINATION_PARAMETER_EXISTING_PAIRS=Window ⇔ parameter pairs
+COORDINATION_PARAMETER_EXISTING_PAIRS=Window / parameter pairs
COORDINATION_PARAMETER_EXISTING_ACTIONS=Actions
COORDINATION_PARAMETER_CREATE=Create new parameter binding:
COORDINATION_PARAMETER_CREATE_NO_PAIRS=No available public render parameters. Cannot create new parameter bindings.
@@ -314,7 +314,14 @@
COORDINATION_EVENT_CREATE_STEP4=4. Select destination windows consuming event:
COORDINATION_EVENT_CREATE_STEP5=5. Name wiring:
COORDINATION_EVENT_CREATE_CREATE=Create wiring
+COORDINATION_EVENT_CREATE_PREVIEW=New event wiring preview:
+COORDINATION_EVENT_CREATE_PREVIEW_STEP1=You have selected the following source event:
+COORDINATION_EVENT_CREATE_PREVIEW_STEP2=triggered by the following source windows:
+COORDINATION_EVENT_CREATE_PREVIEW_STEP3=The produced window events will be wired to the following destination event:
+COORDINATION_EVENT_CREATE_PREVIEW_STEP4=for the following destination windows:
+
+
COORDINATION_WIRING=event wiring
COORDINATION_PARAMETER=parameter binding
COORDINATION_ALIAS=alias binding
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-10-21 15:24:10 UTC (rev 12117)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-10-21 18:30:26 UTC (rev 12118)
@@ -219,226 +219,223 @@
<h2 class="portlet-area-header" onclick="toggle_visibility('eventWirings');" style="cursor: pointer"><a name="#{bundle.COORDINATION_EVENT_WIRINGS}"/>#{bundle.COORDINATION_EVENT_WIRINGS}</h2>
<div id="eventWirings">
- <h:form>
- <h:selectBooleanCheckbox id="useExplicitEvents" value="#{coordinationManager.explicitEventsUsed}"
- onchange="this.form.submit()" immediate="true"/>#{bundle.COORDINATION_EVENT_EXPLICIT_MODE}
- </h:form>
+ <h:form>
+ <h:selectBooleanCheckbox id="useExplicitEvents" value="#{coordinationManager.explicitEventsUsed}"
+ onchange="this.form.submit()" immediate="true"/>#{bundle.COORDINATION_EVENT_EXPLICIT_MODE}
+ </h:form>
- <h:panelGroup rendered="#{coordinationManager.explicitEventsUsed}">
- <hr/>
- <!-- Create new event wiring -->
- <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_EVENT_CREATE}</h3>
- <h:outputText value="#{bundle.COORDINATION_EVENT_CREATE_NO_EVENTS}" rendered="#{empty eventManager.sourceEvents}"/>
- <h:form rendered="#{!empty eventManager.sourceEvents}">
- <div class="half-width float-left">
- <div class="full-width pad5">
- <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP1}</h4>
- <h:selectOneListbox id="sourceEvent" size="5" value="#{eventManager.selectedSourceEvent}" immediate="true"
- onchange="this.form.submit()">
- <f:selectItems value="#{eventManager.sourceEvents}"/>
- </h:selectOneListbox>
- </div>
+ <h:panelGroup rendered="#{coordinationManager.explicitEventsUsed}">
+ <hr/>
+ <!-- Create new event wiring -->
+ <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_EVENT_CREATE}</h3>
+ <h:outputText value="#{bundle.COORDINATION_EVENT_CREATE_NO_EVENTS}" rendered="#{empty eventManager.sourceEvents}"/>
+ <h:form rendered="#{!empty eventManager.sourceEvents}">
+ <div class="half-width float-left">
+ <div class="full-width pad5">
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP1}</h4>
+ <h:selectOneListbox id="sourceEvent" size="5" value="#{eventManager.selectedSourceEvent}" immediate="true"
+ onchange="this.form.submit()">
+ <f:selectItems value="#{eventManager.sourceEvents}"/>
+ </h:selectOneListbox>
+ </div>
- <f:subview id="COORDINATION_EVENT_CREATE_STEP2" rendered="#{!empty eventManager.selectedSourceEvent}">
- <div class="full-width pad5">
- <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP2}</h4>
- <div class="pad5"><h:graphicImage url="/img/jbp-icon-set/event_source.gif"/> #{eventManager.selectedSourceEvent}</div>
- <h:selectManyListbox id="sourceWindows" size="5" value="#{eventManager.selectedSourceWindows}" immediate="true"
- onchange="this.form.submit()">
- <f:selectItems value="#{eventManager.sourceWindows}"/>
- </h:selectManyListbox>
- </div>
- </f:subview>
+ <f:subview id="COORDINATION_EVENT_CREATE_STEP2" rendered="#{!empty eventManager.selectedSourceEvent}">
+ <div class="full-width pad5">
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP2}</h4>
+ <div class="pad5"><h:graphicImage url="/img/jbp-icon-set/event_source.gif"/> #{eventManager.selectedSourceEvent}</div>
+ <h:selectManyListbox id="sourceWindows" size="5" value="#{eventManager.selectedSourceWindows}" immediate="true"
+ onchange="this.form.submit()">
+ <f:selectItems value="#{eventManager.sourceWindows}"/>
+ </h:selectManyListbox>
+ </div>
+ </f:subview>
- <f:subview id="COORDINATION_EVENT_CREATE_STEP3" rendered="#{!empty eventManager.selectedSourceWindows}">
- <div class="full-width pad5">
- <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP3}</h4>
- <h:selectOneListbox id="destEvent" size="5" value="#{eventManager.selectedDestinationEvent}" immediate="true"
- onchange="this.form.submit()">
- <f:selectItems value="#{eventManager.destinationEvents}"/>
- </h:selectOneListbox>
- </div>
- </f:subview>
+ <f:subview id="COORDINATION_EVENT_CREATE_STEP3" rendered="#{!empty eventManager.selectedSourceWindows}">
+ <div class="full-width pad5">
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP3}</h4>
+ <h:selectOneListbox id="destEvent" size="5" value="#{eventManager.selectedDestinationEvent}" immediate="true"
+ onchange="this.form.submit()">
+ <f:selectItems value="#{eventManager.destinationEvents}"/>
+ </h:selectOneListbox>
+ </div>
+ </f:subview>
- <f:subview id="COORDINATION_EVENT_CREATE_STEP4" rendered="#{!empty eventManager.selectedDestinationEvent}">
- <div class="full-width pad5">
- <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP4}</h4>
- <div class="pad5"><h:graphicImage url="/img/jbp-icon-set/event_dest.gif"/>#{eventManager.selectedDestinationEvent}</div>
- <h:selectManyListbox id="destWindows" size="5" value="#{eventManager.selectedDestinationWindows}" immediate="true"
- onchange="this.form.submit()">
- <f:selectItems value="#{eventManager.destinationWindows}"/>
- </h:selectManyListbox>
+ <f:subview id="COORDINATION_EVENT_CREATE_STEP4" rendered="#{!empty eventManager.selectedDestinationEvent}">
+ <div class="full-width pad5">
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP4}</h4>
+ <div class="pad5"><h:graphicImage url="/img/jbp-icon-set/event_dest.gif"/>#{eventManager.selectedDestinationEvent}</div>
+ <h:selectManyListbox id="destWindows" size="5" value="#{eventManager.selectedDestinationWindows}" immediate="true"
+ onchange="this.form.submit()">
+ <f:selectItems value="#{eventManager.destinationWindows}"/>
+ </h:selectManyListbox>
+ </div>
+ </f:subview>
+
+ <br class="clear"/>
</div>
- </f:subview>
+ <div class="half-width float-left event-wiring-preview">
+ <f:subview id="sourceEventUI" rendered="#{!empty eventManager.selectedSourceEvent}">
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_PREVIEW}</h4>
+ <p>#{bundle.COORDINATION_EVENT_CREATE_PREVIEW_STEP1}</p>
+ <ul class="sourceEventList">
+ <li>#{eventManager.selectedSourceEvent}</li>
+ </ul>
+ </f:subview>
+ <f:subview id="sourceWindowUI" rendered="#{!empty eventManager.selectedSourceWindows}" >
+ <p>#{bundle.COORDINATION_EVENT_CREATE_PREVIEW_STEP2}</p>
+ <ul class="sourceWindowList">
+ <ui:repeat var="window" value="#{eventManager.selectedSourceWindows}">
+ <li>#{window}</li>
+ </ui:repeat>
+ </ul>
+ </f:subview>
+ <f:subview id="destEventUI" rendered="#{!empty eventManager.selectedDestinationEvent}">
+ <hr/>
+ <p>#{bundle.COORDINATION_EVENT_CREATE_PREVIEW_STEP3}</p>
+ <ul class="destEventList">
+ <li>#{eventManager.selectedDestinationEvent}</li>
+ </ul>
+ </f:subview>
+ <f:subview id="destWindowUI" rendered="#{!empty eventManager.selectedDestinationWindows}">
+ <p>#{bundle.COORDINATION_EVENT_CREATE_PREVIEW_STEP4}</p>
+ <ul class="destWindowList">
+ <ui:repeat var="window" value="#{eventManager.selectedDestinationWindows}">
+ <li>#{window}</li>
+ </ui:repeat>
+ </ul>
+ </f:subview>
- <br class="clear"/>
- </div>
+ <f:subview id="COORDINATION_EVENT_CREATE_STEP5" rendered="#{!empty eventManager.selectedDestinationWindows}">
+ <div class="full-width createwiring-box">
+ <div class="margin10">
+ <h4>#{bundle.COORDINATION_EVENT_CREATE_STEP5}</h4>
+ <h:inputText id="wiringName" value="#{eventManager.wiringName}"/>
+ <h:commandButton value="#{bundle.COORDINATION_EVENT_CREATE_CREATE}" action="#{eventManager.create}"
+ styleClass="portlet-form-button"/>
+ <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{eventManager.cancel}"
+ styleClass="portlet-form-button"/>
+ </div>
+ </div>
+ </f:subview>
- <div class="half-width float-left event-wiring-preview">
- <h4>New Event Wiring Preview:</h4>
- <f:subview id="sourceEventUI" rendered="#{!empty eventManager.selectedSourceEvent}">
- <p class="source-event-text"><b>#{eventManager.selectedSourceEvent}</b> is the selected source event.</p>
- </f:subview>
- <f:subview id="sourceWindowUI" rendered="#{!empty eventManager.selectedSourceWindows}" >
- <p>The following windows will produce the <b>#{eventManager.selectedSourceEvent}</b> event.</p>
- <ul class="sourceWindowList">
- <ui:repeat var="window" value="#{eventManager.selectedSourceWindows}">
- <li>
- #{window}
- </li>
- </ui:repeat>
- </ul>
- </f:subview>
- <f:subview id="destEventUI" rendered="#{!empty eventManager.selectedDestinationEvent}">
- <p>The producing Window Events will be wired to the following destination events.</p>
- <ul class="destEventList">
- <ui:repeat var="event" value="#{eventManager.selectedDestinationEvent}">
- <li>#{event}</li>
- </ui:repeat>
- </ul>
- </f:subview>
- <f:subview id="destWindowUI" rendered="#{!empty eventManager.selectedDestinationWindows}">
- <p>And the following windows will consume the above listed destination events.</p>
- <ul class="destWindowList">
- <ui:repeat var="window" value="#{eventManager.selectedDestinationWindows}">
- <li>
- #{window}
- </li>
- </ui:repeat>
- </ul>
- </f:subview>
-
- <f:subview id="COORDINATION_EVENT_CREATE_STEP5" rendered="#{!empty eventManager.selectedDestinationWindows}">
- <div class="full-width createwiring-box">
- <div class="margin10">
- <h4>5. Name and create this wiring:</h4>
- <h:inputText id="wiringName" value="#{eventManager.wiringName}"/>
- <h:commandButton value="#{bundle.COORDINATION_EVENT_CREATE_CREATE}" action="#{eventManager.create}"
- styleClass="portlet-form-button"/>
- <h:commandButton value="#{bundle.COMMON_CANCEL}" action="#{eventManager.cancel}"
- styleClass="portlet-form-button"/>
+ <br class="clear"/>
</div>
- </div>
- </f:subview>
- <br class="clear"/>
+ </h:form>
- </div>
+ <br class="clear"/>
- </h:form>
- <hr/>
- <br class="clear"/>
- <!-- Manage existing wirings -->
- <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_EVENT_MANAGE_EXISTING}</h3>
- <h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_NONE}" rendered="#{empty eventManager.displayEventWirings}"/>
- <h:form rendered="#{!empty eventManager.displayEventWirings}">
- <h:dataTable var="wiring" value="#{eventManager.displayEventWirings}"
- styleClass="objectList datatable"
- rowClasses="portlet-section-body,portlet-section-alternate-blue"
- columnClasses="ten-percent-width,quarter-width,quarter-width,ten-percent-width"
- headerClass="portlet-section-header">
- <h:column>
- <f:facet name="header">
- <h4>#{bundle.COORDINATION_EVENT_EXISTING_NAME}</h4>
- </f:facet>
- #{wiring.name}
- </h:column>
+ <!-- Manage existing wirings -->
+ <h3 class="sectionTitle tenpx-top-bottom">#{bundle.COORDINATION_EVENT_MANAGE_EXISTING}</h3>
+ <h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_NONE}" rendered="#{empty eventManager.displayEventWirings}"/>
+ <h:form rendered="#{!empty eventManager.displayEventWirings}">
+ <h:dataTable var="wiring" value="#{eventManager.displayEventWirings}"
+ styleClass="objectList datatable"
+ rowClasses="portlet-section-body,portlet-section-alternate-blue"
+ columnClasses="ten-percent-width,quarter-width,quarter-width,ten-percent-width"
+ headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h4>#{bundle.COORDINATION_EVENT_EXISTING_NAME}</h4>
+ </f:facet>
+ #{wiring.name}
+ </h:column>
- <h:column>
- <f:facet name="header">
- #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_WINDOWS} / #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_EVENTS}
- </f:facet>
- <ul class="sourceWindowList">
- <ui:repeat var="window" value="#{wiring.sourceWindows}">
- <li>
- <h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">
- <f:param name="id" value="#{window.id}"/>
- #{window.name}
- </h:commandLink>
- </li>
- </ui:repeat>
- </ul>
- <hr/>
- <ul class="sourceEventList">
- <ui:repeat var="event" value="#{wiring.sourceEvents}">
- <li>#{event}</li>
- </ui:repeat>
- </ul>
- </h:column>
- <ui:remove>
- <!--<h:column>-->
- <!--<f:facet name="header">-->
- <!--<h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_SOURCE_EVENTS}"/>-->
- <!--</f:facet>-->
- <!--<ul class="sourceEventList">-->
- <!--<ui:repeat var="event" value="#{wiring.sourceEvents}">-->
- <!--<li>#{event}</li>-->
- <!--</ui:repeat>-->
- <!--</ul>-->
- <!--</h:column>-->
- </ui:remove>
- <h:column>
- <f:facet name="header">
- #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_WINDOWS} / #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_EVENTS}
- </f:facet>
+ <h:column>
+ <f:facet name="header">
+ #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_WINDOWS} / #{bundle.COORDINATION_EVENT_EXISTING_SOURCE_EVENTS}
+ </f:facet>
+ <ul class="sourceWindowList">
+ <ui:repeat var="window" value="#{wiring.sourceWindows}">
+ <li>
+ <h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">
+ <f:param name="id" value="#{window.id}"/>
+ #{window.name}
+ </h:commandLink>
+ </li>
+ </ui:repeat>
+ </ul>
+ <hr/>
+ <ul class="sourceEventList">
+ <ui:repeat var="event" value="#{wiring.sourceEvents}">
+ <li>#{event}</li>
+ </ui:repeat>
+ </ul>
+ </h:column>
+ <ui:remove>
+ <!--<h:column>-->
+ <!--<f:facet name="header">-->
+ <!--<h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_SOURCE_EVENTS}"/>-->
+ <!--</f:facet>-->
+ <!--<ul class="sourceEventList">-->
+ <!--<ui:repeat var="event" value="#{wiring.sourceEvents}">-->
+ <!--<li>#{event}</li>-->
+ <!--</ui:repeat>-->
+ <!--</ul>-->
+ <!--</h:column>-->
+ </ui:remove>
+ <h:column>
+ <f:facet name="header">
+ #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_WINDOWS} / #{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_EVENTS}
+ </f:facet>
- <ul class="destWindowList">
- <ui:repeat var="window" value="#{wiring.destinationWindows}">
- <li>
- <h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">
- <f:param name="id" value="#{window.id}"/>
- #{window.name}
- </h:commandLink>
- </li>
- </ui:repeat>
- </ul>
- <hr/>
- <ul class="destEventList">
- <ui:repeat var="event" value="#{wiring.destinationEvents}">
- <li>#{event}</li>
- </ui:repeat>
- </ul>
+ <ul class="destWindowList">
+ <ui:repeat var="window" value="#{wiring.destinationWindows}">
+ <li>
+ <h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">
+ <f:param name="id" value="#{window.id}"/>
+ #{window.name}
+ </h:commandLink>
+ </li>
+ </ui:repeat>
+ </ul>
+ <hr/>
+ <ul class="destEventList">
+ <ui:repeat var="event" value="#{wiring.destinationEvents}">
+ <li>#{event}</li>
+ </ui:repeat>
+ </ul>
- </h:column>
- <ui:remove>
- <!--<h:column>-->
- <!--<f:facet name="header">-->
- <!--<h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_WINDOWS}"/>-->
- <!--</f:facet>-->
- <!--<ul class="destEventList">-->
- <!--<ui:repeat var="window" value="#{wiring.destinationWindows}">-->
- <!--<li>-->
- <!--<h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">-->
- <!--<f:param name="id" value="#{window.id}"/>-->
- <!--#{window.name}-->
- <!--</h:commandLink>-->
- <!--</li>-->
- <!--</ui:repeat>-->
- <!--</ul>-->
- <!--</h:column>-->
- </ui:remove>
- <h:column>
- <f:facet name="header">
- #{bundle.COORDINATION_EVENT_EXISTING_ACTIONS}
- </f:facet>
- <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:commandLink action="renameCoordination" actionListener="#{coordinationManager.select}">
- <h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
- <f:param name="name" value="#{wiring.name}"/>
- <f:param name="type" value="wiring"/>
- </h:commandLink>
- <h:commandLink action="confirmCoordinationDeletion" actionListener="#{coordinationManager.select}">
- <h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
- <f:param name="name" value="#{wiring.name}"/>
- <f:param name="type" value="wiring"/>
- </h:commandLink>
- </h:panelGrid>
- </h:column>
- </h:dataTable>
- </h:form>
- </h:panelGroup>
+ </h:column>
+ <ui:remove>
+ <!--<h:column>-->
+ <!--<f:facet name="header">-->
+ <!--<h:outputText value="#{bundle.COORDINATION_EVENT_EXISTING_DESTINATION_WINDOWS}"/>-->
+ <!--</f:facet>-->
+ <!--<ul class="destEventList">-->
+ <!--<ui:repeat var="window" value="#{wiring.destinationWindows}">-->
+ <!--<li>-->
+ <!--<h:commandLink action="#{portalobjectmgr.selectObject}" styleClass="objectName">-->
+ <!--<f:param name="id" value="#{window.id}"/>-->
+ <!--#{window.name}-->
+ <!--</h:commandLink>-->
+ <!--</li>-->
+ <!--</ui:repeat>-->
+ <!--</ul>-->
+ <!--</h:column>-->
+ </ui:remove>
+ <h:column>
+ <f:facet name="header">
+ #{bundle.COORDINATION_EVENT_EXISTING_ACTIONS}
+ </f:facet>
+ <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
+ <h:commandLink action="renameCoordination" actionListener="#{coordinationManager.select}">
+ <h:outputText styleClass="actionRename" value="#{bundle.RENAME}"/>
+ <f:param name="name" value="#{wiring.name}"/>
+ <f:param name="type" value="wiring"/>
+ </h:commandLink>
+ <h:commandLink action="confirmCoordinationDeletion" actionListener="#{coordinationManager.select}">
+ <h:outputText styleClass="actionDelete" value="#{bundle.COMMON_DELETE}"/>
+ <f:param name="name" value="#{wiring.name}"/>
+ <f:param name="type" value="wiring"/>
+ </h:commandLink>
+ </h:panelGrid>
+ </h:column>
+ </h:dataTable>
+ </h:form>
+ </h:panelGroup>
</div>
</ui:define>
17 years, 9 months
JBoss Portal SVN: r12117 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium and 2 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-21 11:24:10 -0400 (Tue, 21 Oct 2008)
New Revision: 12117
Added:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
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/IdentityAdminTestCase.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/WSRPTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
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/testng.xml
Log:
portal testcases added
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-10-21 15:22:11 UTC (rev 12116)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -11,17 +11,17 @@
@Test(groups = { "cms_dashboard" }, enabled = true, description = "Dashboard issues test case.")
public class DashboardTestCase extends JBossPortalSeleniumTestCase {
- private static final String SUBMIT_ADDCENTER = "//input[contains(@id,'layoutForm:a_center";
- private static final String SUBMIT_ADDLEFT = "//input[contains(@id,'layoutForm:a_left";
+ private static final String SUBMIT_ADDCENTER = "//input[contains(@id,'layoutForm:a_center')]";
+ private static final String SUBMIT_ADDLEFT = "//input[contains(@id,'layoutForm:a_left')]";
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 = "//input[contains(@id,'dashboard-form:pageName";
- private static final String SUBMIT_CREATEPAGE = "//input[contains(@id,'dashboard-form:save-button";
- private static final String SELECT_LAYOUT = "//input[contains(@id,'dashboardLayoutForm:layoutSelector";
- private static final String SUBMIT_LAYOUTSEL = "//input[contains(@id,'dashboardLayoutForm:update-layout";
- private static final String SELECT_THEME = "//input[contains(@id,'dashboardThemeForm:themeSelector";
- private static final String SUBMIT_THEMESEL = "dashboardThemeForm:update-theme";
+ private static final String SELECT_PAGE = "//select[contains(@id,'pageNameSelector')]";
+ private static final String INPUT_PAGENAME = "//input[contains(@id,':pageName')]";
+ private static final String SUBMIT_CREATEPAGE = "//form[contains(@id,'j_id3')]/input[@type='submit']";
+ private static final String SELECT_LAYOUT = "//select[contains(@id,'dashboardLayoutForm:layoutSelector')]";
+ private static final String SUBMIT_LAYOUTSEL = "//form[contains(@id,'dashboardLayoutForm')]/input[@type='submit']";
+ private static final String SELECT_THEME = "//select[contains(@id,'dashboardThemeForm:themeSelector')]";
+ private static final String SUBMIT_THEMESEL = "//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -40,8 +40,9 @@
selenium.click(LINK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.type(INPUT_PAGENAME, "DashTestPage");
- selenium.click(SUBMIT_CREATEPAGE);
- selenium.waitForPageToLoad(PAGE_LOAD);
+
+ clickAndWait(SUBMIT_CREATEPAGE);
+
selenium.click(LINK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=DashTestPage"));
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2008-10-21 15:22:11 UTC (rev 12116)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -331,7 +331,7 @@
//search for the real member of current role
selenium.type(INP_ROLE_SEARCH_USER, "newRoleMember");
selenium.click(SUB_ROLE_SEARCH_USER);
- selenium.waitForPageToLoad(PAGE_LOAD);
+ waitFor(10000);
r = findTableRow(TABLE_ROLEMEMBERS, "newRoleMember", 0);
Assert.assertTrue(r>0, "Assigned member not found in the role members table.");
@@ -339,7 +339,7 @@
//search for the non-member user of current role
selenium.type(INP_ROLE_SEARCH_USER, "newRoleNonMember");
selenium.click(SUB_ROLE_SEARCH_USER);
- selenium.waitForPageToLoad(PAGE_LOAD);
+ waitFor(10000);
Assert.assertFalse(selenium.isElementPresent(TABLE_ROLEMEMBERS), "Not assigned member found in the role members table.");
@@ -568,7 +568,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert
- .assertTrue(selenium.isTextPresent("This username is already taken. tempUser"),
+ .assertTrue(selenium.isTextPresent("This username is already taken."),
"No user was overwritten, current username wasn't already taken.");
}
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-10-21 15:22:11 UTC (rev 12116)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -6,6 +6,7 @@
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
+
/**
* @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
*/
@@ -18,8 +19,13 @@
public static final String INPUT_PASSWORD = "j_password";
public static final String INPUT_USERNAME = "j_username";
protected Selenium selenium;
- protected static final String PAGE_LOAD = "250000";
+ // Generic timeout in miliseconds
+ protected static final String PAGE_LOAD = "900000";
+
+ // Element timeout in seconds
+ protected static final int ELEM_TIMEOUT = 60;
+
@BeforeClass
public void setupChromeForLogin() throws Exception {
@@ -35,16 +41,17 @@
}
protected void clickIfVisible(String id) {
-
- if (selenium.isElementPresent(id)){
+
+ if (selenium.isElementPresent(id)) {
selenium.click(id);
+
selenium.waitForPageToLoad(PAGE_LOAD);
}
}
-
+
protected void clickIfVisible(String id, String awaited) {
-
- if (selenium.isElementPresent(id)){
+
+ if (selenium.isElementPresent(id)) {
selenium.click(id);
selenium.waitForPageToLoad(PAGE_LOAD);
}
@@ -63,59 +70,123 @@
return true;
}
}
-
+
return false;
}
protected int findTableRow(String tableLocation, String searchName, int searchCol) {
return Integer.valueOf(selenium.getEval("selenium.findTableRow(\"" + tableLocation + "\",'" + searchName + "'," + searchCol + ")"));
}
-
- protected int countTableRows(String tableLocation){
+
+ protected int countTableRows(String tableLocation) {
return Integer.valueOf(selenium.getEval("selenium.countTableRows(\"" + tableLocation + "\")"));
}
-
- protected void clickAndWait(String locator){
+
+ // TODO refactor
+ protected void safeSelect(String locator, String value) {
+ waitForElement(locator);
+
+ for (int second = 0;; second++) {
+ if (second >= ELEM_TIMEOUT) {
+ Assert.fail("Element " + locator + " not found.");
+ }
+ try {
+ String[] opts = selenium.getSelectOptions(locator);
+ boolean isAvailable = false;
+
+ for (String opt : opts) {
+ if (opt.equals(value)) {
+ isAvailable = true;
+ }
+ }
+
+ if (isAvailable)
+ break;
+ } catch (Exception e) {
+ }
+ waitFor(1000);
+ }
+
+ selenium.select(locator, "label=" + value);
+ }
+
+ protected void clickAndWait(String locator) {
+ waitForElement(locator);
selenium.click(locator);
selenium.waitForPageToLoad(PAGE_LOAD);
}
-
- protected void openAndWait(String locator){
+
+ protected void openAndWait(String locator) {
selenium.open(locator);
selenium.waitForPageToLoad(PAGE_LOAD);
}
-
+
protected void selectIfNotSelected(String selector, String label) {
+ waitForElement(selector);
if (!selenium.getSelectedLabel(selector).equals(label)) {
selenium.select(selector, "label=" + label);
selenium.waitForPageToLoad(PAGE_LOAD);
}
}
-
- protected boolean assertTextOrder(String text){
+
+ protected boolean assertTextOrder(String text) {
return Boolean.valueOf(selenium.getEval("selenium.assertTextOrder(\"" + text + "\")"));
}
+ protected void waitFor(long time) {
+ try {
+ Thread.sleep(time);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ protected void waitForElement(String locator) {
+ for (int second = 0;; second++) {
+ if (second >= ELEM_TIMEOUT) {
+ Assert.fail("Element " + locator + " not found.");
+ }
+ try {
+ if (selenium.isElementPresent(locator))
+ break;
+ } catch (Exception e) {
+ }
+ waitFor(1000);
+ }
+ }
+
+ public void waitForText(String text) {
+ for (int second = 0;; second++) {
+ if (second >= ELEM_TIMEOUT) {
+ Assert.fail("Text '" + text + "' not found.");
+ }
+ try {
+ if (selenium.isTextPresent(text))
+ break;
+ } catch (Exception e) {
+ }
+ waitFor(1000);
+ }
+ }
+
protected void login(String username, String password) {
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.click(LINK_LOGIN);
selenium.selectFrame(FRAME_LOGIN_CONTENT);
-
- try {
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
+
+ waitForElement(INPUT_USERNAME);
+ waitForElement(INPUT_PASSWORD);
+ waitForElement(SUBMIT_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.");
+ Assert.assertTrue(selenium.isTextPresent("Logged in as: " + username), "Not logged in, login message missing.");
}
protected void logout() {
@@ -127,15 +198,15 @@
Assert.assertFalse(selenium.isTextPresent("Logged in as:"), "Not logged in, login message missing.");
Assert.assertTrue(selenium.isElementPresent("Link=Login"), "Login link not present.");
}
-
+
protected void logoutIfPossible() {
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (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.");
+ if (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/WSRPTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-10-21 15:22:11 UTC (rev 12116)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -13,7 +13,7 @@
public class WSRPTestCase extends JBossPortalSeleniumTestCase {
private static final String SUBMIT_REFRESH_CANCEL = "//input[contains(@id,'edit-cons-form:list-cons-link_1')]";
private static final String SUBMIT_PROD_SAVE = "//input[contains(@id,'producer-form:save-producer')]";
- private static final String SUBMIT_CONSDEL_CONF = "//input[contains(@id,'confirm-delete-form:destroy-linkv";
+ private static final String SUBMIT_CONSDEL_CONF = "//input[contains(@id,':destroy-link')]";
private static final String SUBMIT_CONS_REGVAL = "//input[contains(@id,'edit-cons-form:refresh-cons-link')]";
private static final String SUBMIT_REFRESHFINAL = "//input[contains(@id,'edit-cons-form:refresh-cons-link')]";
@@ -44,7 +44,7 @@
- public static String WSRP_CONSUMER_TABLE = "consumer-list-form:consumersList";
+ public static String WSRP_CONSUMER_TABLE = "//table[contains(@id,':consumer-list-form:consumersList')]";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -208,8 +208,7 @@
selenium.captureScreenshot("delete");
Assert.assertTrue(selenium.isTextPresent("Delete 'BEAdel' consumer?"));
- selenium.click(SUBMIT_CONSDEL_CONF);
- selenium.waitForPageToLoad(PAGE_LOAD);
+ clickAndWait(SUBMIT_CONSDEL_CONF);
Assert.assertFalse(selenium.isTextPresent("BEAdel"));
}
@@ -225,8 +224,8 @@
clickIfVisible(ID_LINK_PRODCONF);
- selenium.click(SUBMIT_ADDPROP_INIT);
- selenium.waitForPageToLoad(PAGE_LOAD);
+ clickAndWait(SUBMIT_ADDPROP_INIT);
+
selenium.type(INPUT_PROPNAME, "testProp");
selenium.type(INPUT_PROPLABEL, "testProp label");
selenium.type(INPUT_PROPHINT, "tetsPropHint");
@@ -274,12 +273,10 @@
Assert.assertTrue(r>0, "Created consumer not found in table");
// rename the consumer
- selenium.click(MessageFormat.format(LINK_T_CONS_CON,r-1));
- selenium.waitForPageToLoad(PAGE_LOAD);
+ clickAndWait(MessageFormat.format(LINK_T_CONS_CON,r-1));
- selenium.type("edit-cons-form:id", nameNew);
- selenium.click("edit-cons-form:refresh-cons-link");
- selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(INPUT_USERNAME, nameNew);
+ clickAndWait(SUBMIT_REFRESHSAVE);
clickIfVisible(ID_LINK_CONSCONF);
clickIfVisible(LINK_CONSUMER_HOME);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2008-10-21 15:22:11 UTC (rev 12116)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -14,7 +14,7 @@
public class CMSFileTestCase extends JBossPortalSeleniumTestCase {
private final String CMS_FILE_TABLE = "//div[@id='center']/div/div/div[3]/table";
- public static final String CMS_FILE_PENDING_TABLE = "//div[@id='center']/div/div/table[2]";
+ public static final String CMS_FILE_PENDING_TABLE = "//div[@id='center']/div/div/table";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
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-10-21 15:22:11 UTC (rev 12116)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -14,38 +14,38 @@
@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 = "delete-view: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 static final String SUBMIT_RENAME_PORTAL = "//input[contains(@id,'renameForm:rename')]";
+ private static final String INPUT_RENAME_PORTAL = "//input[contains(@id,'renameForm:newName')]";
+ private static final String SUBMIT_DELETE_PORTAL_CONF = "//input[contains(@id,'delete-view:confirm-form:delete')]";
+ private static final String INPUT_SUBMIT_PAGECREATE = "//input[contains(@id,'create-page-form:create-page')]";
+ private static final String INPUT_PAGENAME = "//input[contains(@id,'create-page-form:pageName')]";
+ private static final String INPUT_PORTALNAME = "//input[contains(@id,'create-portal-form:name')]";
+ private static final String INPUT_SUBMIT_CREATEPORTAL = "//input[contains(@id,'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 = "obj-temp-form:object-link-0";
+ private final String LINK_PORTAL_HOME = "//input[contains(@id,'obj-temp-form:object-link-0')]";
- 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_PORTAL_ADMIN = "//table[contains(@id,'obj-nav-form:portal-datatable')]";
+ private final String POR_TL_MAIN = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]";
+ private final String POR_TL_SECURITY = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]";
+ private final String POR_TL_PROPERTIES = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]";
+ private final String POR_TL_THEME = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]";
+ private final String POR_TL_RENAME = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]";
+ private final String POR_TL_DELETE = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]";
+ private final String POR_TL_MAKEDEF = "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]";
- 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";
+ private final String TABLE_PORTALPAGE_ADMIN = "//table[contains(@id,'obj-nav-form:pages-datatable')]";
+ private final String PAG_TL_MAIN = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]";
+ private final String PAG_TL_LAYOUT = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]";
+ private final String PAG_TL_SECURITY = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]";
+ private final String PAG_TL_PROPERTIES = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]";
+ private final String PAG_TL_THEME = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]";
+ private final String PAG_TL_RENAME = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link_1'')]";
+ private final String PAG_TL_DISPLAY = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]";
+ private final String PAG_TL_DELETE = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]";
+ private final String PAG_TL_MAKEDEF = "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -0,0 +1,154 @@
+package org.jboss.portal.test.selenium.portal;
+
+import java.text.MessageFormat;
+
+import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class DashboardsTestCase extends JBossPortalSeleniumTestCase {
+
+ private static final String T_DH_SUB_UPDATE = "//input[contains(@id,'common-edit-theme-form:_id125jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj')]";
+ private static final String T_DH_SEL_RENDERSET = "//input[contains(@id,'common-edit-theme-form:renderSet')]";
+ private static final String T_DH_SEL_THEME = "//input[contains(@id,'common-edit-theme-form:theme')]";
+ private static final String T_DH_SEL_LAYOUT = "//input[contains(@id,'common-edit-theme-form:layout')]";
+ private static final String T_PA_SUB_UPDATE = "//input[contains(@id,'common-edit-page-error-form:update_2')]";
+ private static final String T_PO_SUB_UPDATE = "//input[contains(@id,'common-edit-portal-error-form:update_1')]";
+ private static final String T_PA_INP_PAGEADD = "//input[contains(@id,'common-edit-page-error-form:page-res-select')]";
+ private static final String T_PO_INP_PAGEADD = "//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]";
+ private static final String T_PA_SEL_PNF = "//input[contains(@id,'common-edit-page-error-form:page-not-found-select')]";
+ private static final String T_PA_SEL_INTERN = "//input[contains(@id,'common-edit-page-error-form:page-internal-select')]";
+ private static final String T_PA_SEL_ERROR = "//input[contains(@id,'common-edit-page-error-form:page-error-select')]";
+ private static final String T_PA_SEL_CONTROL = "//input[contains(@id,'common-edit-page-error-form:page-control-select')]";
+ private static final String T_PA_SEL_ACCESS = "//input[contains(@id,'common-edit-page-error-form:page-access-select')]";
+ private static final String T_PO_SEL_PNF = "//input[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]";
+ private static final String T_PO_SEL_UNAVAIL = "//input[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]";
+ private static final String T_PO_SEL_ACCESS = "//input[contains(@id,'common-edit-portal-error-form:portal-access-select')]";
+ private static final String SUBMIT_UPDATE_VALUE = "//input[contains(@id,'common-manage-prop-form:update')]";
+ private static final String TABLE_PROPS = "//table[contains(@id,'common-manage-prop-form:prop-data-table')]";
+ private static final String T_PROPS_INPUT_VALUE = "//a[contains(@id,'common-manage-prop-form:prop-data-table:{0}:prop-value-input')]";
+ private static final String T_PROPS_LINK_DEL = "//a[contains(@id,'common-manage-prop-form:prop-data-table:{0}:delete')]";
+
+ private static final String TABLE_PA_ERR = "//form[@id='common-edit-page-error-form']/table";
+ private static final String TABLE_PO_ERR = "//form[@id='common-edit-portal-error-form']/table";
+ private static final String TABLE_DH_THM = "//form[@id='common-edit-theme-form']/table";
+ private static final String INPUT_PROP_NAME = "//input[contains(@id,'common-edit-prop-form:property')]";
+ private static final String SUBMIT_ADD_PROP = "//input[contains(@id,'common-edit-prop-form:add-property')]";
+ private static final String LINK_ADMIN = "link=Admin";
+ private static final String LINK_TAB_DASH = "//a[contains(@id,'admin-subtab-form:dashboard-link')]";
+
+ @BeforeMethod(groups = { "log" })
+ public void loginBeforeTest() {
+ login("admin", "admin");
+ goToDash();
+ }
+
+ @AfterMethod(groups = { "log" })
+ public void logoutAfterTest() {
+ logout();
+ }
+
+ @Test(enabled = true)
+ public void testPropAdd() {
+ final String propName = "SelenProp";
+
+ Assert.assertFalse(selenium.isTextPresent(propName));
+ selenium.type(INPUT_PROP_NAME, propName);
+ selenium.click(SUBMIT_ADD_PROP);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent(propName));
+ }
+
+ @Test(enabled = true)
+ public void testPropUpdate() {
+ final String propName = "SelenValueProp";
+ final String value = "updatedValue";
+ Assert.assertFalse(selenium.isTextPresent(value));
+ Assert.assertFalse(selenium.isTextPresent(propName));
+ selenium.type(INPUT_PROP_NAME, propName);
+ selenium.click(SUBMIT_ADD_PROP);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent(propName));
+
+ int r = findTableRow(TABLE_PROPS, propName, 1);
+
+ selenium.type(MessageFormat.format(T_PROPS_INPUT_VALUE, r-1),value);
+ selenium.click(SUBMIT_UPDATE_VALUE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ Assert.assertEquals(selenium.getValue(MessageFormat.format(T_PROPS_INPUT_VALUE, r-1)),value,"Updated value not found.");
+
+ }
+
+ @Test(enabled = true)
+ public void testPropDelete() {
+ final String propName = "SelenDeleteProp";
+
+ Assert.assertFalse(selenium.isTextPresent(propName));
+ selenium.type(INPUT_PROP_NAME, propName);
+ selenium.click(SUBMIT_ADD_PROP);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent(propName));
+
+ int r = findTableRow(TABLE_PROPS, propName, 0);
+
+ selenium.click(MessageFormat.format(T_PROPS_LINK_DEL, r-1));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ Assert.assertFalse(selenium.isTextPresent(propName));
+
+ }
+
+ @Test(enabled = true)
+ public void testPortalError() {
+ selenium.select(T_PO_SEL_ACCESS, "label=Redirect to the specified resource");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(T_PO_SEL_UNAVAIL, "label=Redirect to the specified resource");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(T_PO_SEL_PNF, "label=Redirect to the specified resource");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(T_PO_INP_PAGEADD, "/WEB-INF/jsp/error/portalX.jsp");
+ selenium.click(T_PO_SUB_UPDATE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
+ @Test(enabled = true)
+ public void testPageError() {
+ selenium.select(T_PA_SEL_ACCESS, "label=Display the default error message");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(T_PA_SEL_CONTROL, "label=Redirect to the specified resource");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(T_PA_SEL_ERROR, "label=Remove the resource from page");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(T_PA_SEL_INTERN, "label=Display the default error message");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(T_PA_SEL_PNF, "label=Redirect to the specified resource");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(T_PA_INP_PAGEADD, "/WEB-INF/jsp/error/pageY.jsp");
+ selenium.click(T_PA_SUB_UPDATE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
+ @Test(enabled = true)
+ public void testDashboardTheme() {
+
+ safeSelect(T_DH_SEL_LAYOUT, "1column");
+
+ safeSelect(T_DH_SEL_THEME, "nphalanx");
+
+ safeSelect(T_DH_SEL_RENDERSET, "default");
+
+
+ clickAndWait(T_DH_SUB_UPDATE);
+
+ }
+
+ private void goToDash() {
+ selenium.open("/portal/");
+ clickIfVisible(LINK_ADMIN);
+ clickIfVisible(LINK_ADMIN);
+ clickIfVisible(LINK_TAB_DASH);
+ }
+}
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -0,0 +1,97 @@
+package org.jboss.portal.test.selenium.portal;
+
+import java.text.MessageFormat;
+
+import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class PortletDefinitionsTestCase extends JBossPortalSeleniumTestCase{
+
+ private static final String T_LINK_PREF = "def-list:portlet-pref-{0}";
+ private static final String SUBMIT_CREATE_INST = "add_instance_form:_id19jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj";
+ private static final String INPUT_INSTANCE_NAME = "add_instance_form:instanceId";
+ private static final String T_LINK_CREATE = "def-list:create-instance-{0}";
+ private static final String SUBMIT_PROVIDER_VIEW = "definition-form:view-portlets";
+ private static final String SELECT_PROVIDER = "definition-form:menu";
+ private static final String TABLE_PORTLET = "//form[@id='def-list']/table";
+ private static final String LINK_NAME_ADMIN_PORT = "common-show-portlet-detail-form:field1:select";
+ private static final String LINK_ADMIN_PORT = "def-list:portlet-def-0";
+ private static final String LINK_ADMIN = "link=Admin";
+ private static final String LINK_TAB_PD = "admin-subtab-form:portlet-def-link";
+ private static final String LINK_PD_MAIN = "man-form:def-link";
+
+
+ @BeforeMethod(groups = { "log" })
+ public void loginBeforeTest() {
+ login("admin", "admin");
+ goToPD();
+ }
+
+ @AfterMethod(groups = { "log" })
+ public void logoutAfterTest() {
+ logout();
+ }
+
+ @Test(enabled = true)
+ public void testShowInfo(){
+ selenium.click(LINK_ADMIN_PORT);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent("Portlet Instance Information"));
+ Assert.assertTrue(selenium.isElementPresent(LINK_NAME_ADMIN_PORT));
+ Assert.assertTrue(selenium.isTextPresent("Administration Portlet"));
+ Assert.assertTrue(selenium.isTextPresent("Management Portlet"));
+ Assert.assertTrue(selenium.isTextPresent("management,admin"));
+ Assert.assertTrue(selenium.isTextPresent("de it en"));
+ }
+
+ @Test(enabled = true)
+ public void testCreateInstance(){
+
+ int r = findTableRow(TABLE_PORTLET, "Administration Portlet", 0);
+
+ selenium.click(MessageFormat.format(T_LINK_CREATE,r-1));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.type(INPUT_INSTANCE_NAME, "littleAdmin");
+ selenium.click(SUBMIT_CREATE_INST);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent("littleAdmin portlet details"));
+ Assert.assertTrue(selenium.isTextPresent("Portlet Instance Information"));
+ }
+
+ @Test(enabled = true)
+ public void testPreferences(){
+
+ int r = findTableRow(TABLE_PORTLET, "Current Users Portlet", 0);
+
+ selenium.click(MessageFormat.format(T_LINK_PREF,r-1));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent("Current Users Portlet preferences"));
+ Assert.assertTrue(selenium.isTextPresent("guestNumber"));
+ }
+
+ @Test(enabled = true)
+ public void testSwitchProvider(){
+ selenium.select(SELECT_PROVIDER, "label=self");
+ selenium.click(SUBMIT_PROVIDER_VIEW);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ int n = countTableRows(TABLE_PORTLET);
+ Assert.assertTrue(findTableRow(TABLE_PORTLET, "Administration Portlet", 0)<0);
+
+ selenium.select(SELECT_PROVIDER, "label=local");
+ selenium.click(SUBMIT_PROVIDER_VIEW);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ n = countTableRows(TABLE_PORTLET);
+ Assert.assertTrue(findTableRow(TABLE_PORTLET, "Administration Portlet", 0)>=0);
+ }
+
+ private void goToPD(){
+ selenium.open("/portal/");
+ clickIfVisible(LINK_ADMIN);
+ clickIfVisible(LINK_ADMIN);
+ clickIfVisible(LINK_TAB_PD);
+ clickIfVisible(LINK_PD_MAIN);
+ }
+}
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2008-10-21 15:24:10 UTC (rev 12117)
@@ -0,0 +1,231 @@
+package org.jboss.portal.test.selenium.portal;
+
+import java.text.MessageFormat;
+
+import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class PortletInstancesTestCase extends JBossPortalSeleniumTestCase {
+
+ private static final String SUBMIT_SECURITY_UPDATE = "common-edit-security-form:update";
+ private static final String SUBMIT_SECURITY_CANCEL = "common-edit-security-form:cancel";
+
+ private static final String LINK_PREF_WELCOMEPORT = "instances-form:security-JSPPortletInstance";
+
+ private static final String TABLE_PREF_KEY = "//form[@id='common-edit-pref-form']/table";
+
+ private static final String SUBMIT_PREF_DELETE = "common-edit-exisiting-form:row_0";
+ private static final String LINK_PREF_GUESTNUM = "common-edit-pref-form:pref-link-0";
+ private static final String INPUT_PREF_NEWVAL = "common-append-form:new_value";
+ private static final String SUBMIT_PREF_UPDATE = "common-append-form:append-button";
+ private static final String SUBMIT_PREF_SAVE = "_id919jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:save";
+ private static final String INPUT_PREF_UPDATE = "common-edit-exisiting-form:update";
+ private static final String INPUT_PREF_APPEND = "common-edit-exisiting-form:pref-input-0";
+ private static final String SUBMIT_PREF_CANCEL = "_id458jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj:cancel";
+ private static final String LINK_CURUSER_PREFERENCES = "instances-form:preference-CurrentUsersPortletInstance";
+ private static final String LINK_DEL_EXCEPTPORT = "instances-form:delete-ExceptionPortletInstance";
+ private static final String SUBMIT_PI_DELETE_CONF = "confirm-delete-form1:delete";
+ private static final String SUBMIT_PI_DELETE_CANC = "confirm-delete-form1:cancel";
+ private static final String T_LINK_DELETENAME = "displaynamecontainer:instance-display-form:locale-data-table:{0}:delete-link";
+ private static final String T_LINK_MODIFYNAME = "displaynamecontainer:instance-display-form:locale-data-table:{0}:edit-link";
+ private static final String LINK_COUNTPORT = "instances-form:CounterPortletInstance";
+ private static final String SUBMIT_MODIFY_NAME = "displaynamecontainer:displayNameForm:addDisplay";
+ private static final String INPUT_NAME = "displaynamecontainer:displayNameForm:newName";
+ private static final String SELECT_LANGUAGE = "displaynamecontainer:displayNameForm:locales";
+ private static final String LINK_ADMIN = "link=Admin";
+ private static final String LINK_TAB_PI = "admin-subtab-form:portlet-instance-link";
+ private static final String LINK_PI_MAIN = "instance-form1:instance-link";
+ private static final String TABLE_DISPNAMES = "displaynamecontainer:instance-display-form:locale-data-table";
+
+ @BeforeMethod(groups = { "log" })
+ public void loginBeforeTest() {
+ login("admin", "admin");
+ goToPI();
+ }
+
+ @AfterMethod(groups = { "log" })
+ public void logoutAfterTest() {
+ logout();
+ }
+
+ @Test(enabled = true)
+ public void testAddName() {
+ clickAndWait(LINK_COUNTPORT);
+
+ safeSelect(SELECT_LANGUAGE, "Czech");
+ final String name = "Administracny";
+ selenium.type(INPUT_NAME, name);
+ clickAndWait(SUBMIT_MODIFY_NAME);
+ Assert.assertTrue(findTableRow(TABLE_DISPNAMES, name, 1) >= 0);
+ }
+
+ @Test(enabled = true)
+ public void testDeleteName() {
+ // adding the name
+ selenium.click(LINK_COUNTPORT);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(SELECT_LANGUAGE, "label=Japanese");
+ final String name = "Aduminu";
+ selenium.type(INPUT_NAME, name);
+ selenium.click(SUBMIT_MODIFY_NAME);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ // deleting name
+
+ int r = findTableRow(TABLE_DISPNAMES, name, 1);
+
+ selenium.click(MessageFormat.format(T_LINK_DELETENAME, r - 1));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ Assert.assertFalse(findTableRow(TABLE_DISPNAMES, name, r) >= 0);
+ }
+
+ @Test(enabled = true)
+ public void testModifyName() {
+ // adding the name
+ selenium.click(LINK_COUNTPORT);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.select(SELECT_LANGUAGE, "label=Japanese");
+ final String name = "Adminisimo";
+ final String nameNew = "Adminiprisimo";
+
+ selenium.type(INPUT_NAME, name);
+ selenium.click(SUBMIT_MODIFY_NAME);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ // midifying name
+
+ int r = findTableRow(TABLE_DISPNAMES, name, 1);
+
+ selenium.click(MessageFormat.format(T_LINK_MODIFYNAME, r - 1));
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ selenium.type(INPUT_NAME, nameNew);
+ selenium.click(SUBMIT_MODIFY_NAME);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ Assert.assertTrue(findTableRow(TABLE_DISPNAMES, nameNew, 1) >= 0);
+ }
+
+ @Test(enabled = true)
+ public void testSecure() {
+ // "common-edit-security-form:cancel"
+ selenium.click(LINK_PREF_WELCOMEPORT);
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//input[@name='common-edit-security-form:cars_2']");
+ selenium.click("//input[@name='common-edit-security-form:cars_1']");
+ selenium.click("//input[@name='common-edit-security-form:cars_0']");
+ selenium.click("//input[@name='common-edit-security-form:cars_0' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_1' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_2' and @value='admin']");
+ selenium.click(SUBMIT_SECURITY_UPDATE);
+ selenium.waitForPageToLoad("30000");
+
+ selenium.open("/portal/auth/portal/default/");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertTrue(selenium.isTextPresent("Greetings !"));
+
+ // then cancel
+ selenium.click("link=Admin");
+ selenium.waitForPageToLoad("30000");
+ selenium.click(LINK_PREF_WELCOMEPORT);
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//input[@name='common-edit-security-form:cars_0']");
+ selenium.click("//input[@name='common-edit-security-form:cars_1' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_0' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_2' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_1']");
+ selenium.click(SUBMIT_SECURITY_CANCEL);
+ selenium.waitForPageToLoad("30000");
+ selenium.open("/portal/auth/portal/default/");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertTrue(selenium.isTextPresent("Greetings !"));
+
+ // then really stop the greetings portlet
+ selenium.click("link=Admin");
+ selenium.waitForPageToLoad("30000");
+ selenium.click(LINK_PREF_WELCOMEPORT);
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//input[@name='common-edit-security-form:cars_0']");
+ selenium.click("//input[@name='common-edit-security-form:cars_1' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_0' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_2' and @value='admin']");
+ selenium.click("//input[@name='common-edit-security-form:cars_1']");
+ selenium.click(SUBMIT_SECURITY_UPDATE);
+ selenium.waitForPageToLoad("30000");
+
+ selenium.open("/portal/auth/portal/default/");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertFalse(selenium.isTextPresent("Greetings !"));
+ }
+
+ @Test(enabled = true)
+ public void testDeleteInstance() {
+ // cancel first
+ Assert.assertTrue(selenium.isElementPresent(LINK_DEL_EXCEPTPORT), "Exception portlet not found.");
+ selenium.click(LINK_DEL_EXCEPTPORT);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent("WARNING!"));
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"));
+ selenium.click(SUBMIT_PI_DELETE_CANC);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ // delete
+ goToPI();
+ Assert.assertTrue(selenium.isElementPresent(LINK_DEL_EXCEPTPORT), "Exception portlet not found.");
+ selenium.click(LINK_DEL_EXCEPTPORT);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(selenium.isTextPresent("WARNING!"));
+ Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this portlet instance ?"));
+ selenium.click(SUBMIT_PI_DELETE_CONF);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertFalse(selenium.isElementPresent(LINK_DEL_EXCEPTPORT), "Exception portlet found after deletition.");
+ }
+
+ @Test(enabled = true)
+ public void testPreferences() {
+ int r;
+ selenium.click(LINK_CURUSER_PREFERENCES);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.click(SUBMIT_PREF_CANCEL);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ selenium.click(LINK_CURUSER_PREFERENCES);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertTrue(findTableRow(TABLE_PREF_KEY, "guestNumber", 0) >= 0);
+ selenium.click(LINK_PREF_GUESTNUM);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ r = findTableRow(TABLE_PREF_KEY, "guestNumber", 0);
+ Assert.assertEquals(selenium.getText(TABLE_PREF_KEY + "/tbody/tr[" + r + "]/td[4]"), "[true]");
+ selenium.type(INPUT_PREF_APPEND, "true1");
+ selenium.click(INPUT_PREF_UPDATE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ r = findTableRow(TABLE_PREF_KEY, "guestNumber", 0);
+ Assert.assertEquals(selenium.getText(TABLE_PREF_KEY + "/tbody/tr[" + r + "]/td[4]"), "[true1]");
+ selenium.click(SUBMIT_PREF_DELETE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ r = findTableRow(TABLE_PREF_KEY, "guestNumber", 0);
+ Assert.assertEquals(selenium.getText(TABLE_PREF_KEY + "/tbody/tr[" + r + "]/td[4]"), "[]");
+ selenium.type(INPUT_PREF_NEWVAL, "viliam");
+ selenium.click(SUBMIT_PREF_UPDATE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ r = findTableRow(TABLE_PREF_KEY, "guestNumber", 0);
+ Assert.assertEquals(selenium.getText(TABLE_PREF_KEY + "/tbody/tr[" + r + "]/td[4]"), "[viliam]");
+ selenium.click(SUBMIT_PREF_SAVE);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ }
+
+ private void goToPI() {
+ selenium.open(ADDR_PORTAL);
+ clickIfVisible(LINK_ADMIN);
+ clickIfVisible(LINK_ADMIN);
+ clickIfVisible(LINK_TAB_PI);
+ clickIfVisible(LINK_PI_MAIN);
+ }
+
+}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-21 15:22:11 UTC (rev 12116)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-21 15:24:10 UTC (rev 12117)
@@ -14,16 +14,7 @@
<classes>
<class name="org.jboss.portal.test.selenium.IdentityAdminTestCase"></class></classes>
</test>
-
- <test name="org.jboss.portal.test.selenium.IdentityAdminTestCase - SingleLogin"
- verbose="2" annotations="JDK">
- <groups>
- <run>
- <exclude name="log"></exclude></run></groups>
- <classes>
- <class name="org.jboss.portal.test.selenium.IdentityAdminTestCase"></class></classes>
- </test>
-
+
<test name="org.jboss.portal.test.selenium.PortletUserCreationTestCase"
verbose="2" annotations="JDK">
<classes>
17 years, 9 months
JBoss Portal SVN: r12116 - branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-21 11:22:11 -0400 (Tue, 21 Oct 2008)
New Revision: 12116
Modified:
branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
Log:
4 minutes timeout for wait for element
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-10-21 15:21:08 UTC (rev 12115)
+++ branches/JBoss_Portal_Branch_2_6/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2008-10-21 15:22:11 UTC (rev 12116)
@@ -24,7 +24,7 @@
protected static final String PAGE_LOAD = "900000";
// Element timeout in seconds
- protected static final int ELEM_TIMEOUT = 60;
+ protected static final int ELEM_TIMEOUT = 240;
@BeforeClass
public void setupChromeForLogin() throws Exception {
@@ -142,7 +142,7 @@
}
}
- public void waitForElement(String locator) {
+ protected void waitForElement(String locator) {
for (int second = 0;; second++) {
if (second >= ELEM_TIMEOUT) {
Assert.fail("Element " + locator + " not found.");
@@ -156,6 +156,20 @@
}
}
+ public void waitForText(String text) {
+ for (int second = 0;; second++) {
+ if (second >= ELEM_TIMEOUT) {
+ Assert.fail("Text '" + text + "' not found.");
+ }
+ try {
+ if (selenium.isTextPresent(text))
+ break;
+ } catch (Exception e) {
+ }
+ waitFor(1000);
+ }
+ }
+
protected void login(String username, String password) {
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
17 years, 9 months
JBoss Portal SVN: r12113 - branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-10-21 10:09:15 -0400 (Tue, 21 Oct 2008)
New Revision: 12113
Modified:
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java
Log:
putting back sybase code. accidentally reverted the code from the repo. This needs to be rolled back for 2.6.7
Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java 2008-10-21 12:37:29 UTC (rev 12112)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibernate/HibernateStore.java 2008-10-21 14:09:15 UTC (rev 12113)
@@ -142,18 +142,18 @@
selectFileExistStmt = "select 1 from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ?";
+ + "and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
- selectFolderExistStmt = "select data from "
+ selectFolderExistStmt = "select 1 from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ?";
+ + "and FSENTRY_NAME = ? and FSENTRY_DATA is null";
selectChildCountStmt = "select count(FSENTRY_NAME) from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ?";
selectDataStmt = "select data from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ? ";
+ + "and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
selectLastModifiedStmt = "select FSENTRY_LASTMOD from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
@@ -161,7 +161,7 @@
selectLengthStmt = "select FSENTRY_LENGTH from "
+ schemaObjectPrefix + " where FSENTRY_PATH = ? "
- + "and FSENTRY_NAME = ?";
+ + "and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
initialized = true;
}
@@ -221,27 +221,27 @@
try
{
- String query = "from " + schemaObjectPrefix + " where FSENTRY_PATH = ? and FSENTRY_NAME = ?";
+ String query = "from " + schemaObjectPrefix + " where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null";
List result = session.createQuery(query)
.setString(0, parentDir)
.setString(1, name)
.list();
-
- boolean deleted = false;
+ if (result.size() == 0)
+ {
+ throw new FileSystemException("no such file: " + filePath);
+ }
+
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
Iterator iter = result.iterator();
while (iter.hasNext())
{
VersionEntry versionEntry = (VersionEntry)iter.next();
- if (versionEntry.getData() != null)
- {
- session.delete(versionEntry);
- deleted = true;
- }
+ session.delete(versionEntry);
}
+
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
@@ -249,12 +249,9 @@
while (iter.hasNext())
{
CMSEntry cmsEntry = (CMSEntry)iter.next();
- if (cmsEntry.getData() != null)
- {
- session.delete(cmsEntry);
- deleted = true;
- }
+ session.delete(cmsEntry);
}
+
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
@@ -262,19 +259,10 @@
while (iter.hasNext())
{
RepositoryEntry repoEntry = (RepositoryEntry)iter.next();
- if (repoEntry.getData() != null)
- {
- session.delete(repoEntry);
- deleted = true;
- }
+ session.delete(repoEntry);
}
- }
- if (!deleted)
- {
- throw new FileSystemException("no such file: " + filePath);
}
-
tx.commit();
}
catch (Exception e)
@@ -329,7 +317,7 @@
{
String query = "from " + schemaObjectPrefix + " where FSENTRY_PATH = ? and FSENTRY_NAME = ? " +
- "or (FSENTRY_PATH = ?) or (FSENTRY_PATH like ?)";
+ "and FSENTRY_DATA is null or (FSENTRY_PATH = ?) or (FSENTRY_PATH like ?)";
List result = session.createQuery(query)
.setString(0, parentDir)
@@ -338,20 +326,21 @@
.setString(3, folderPath + FileSystem.SEPARATOR + "%")
.list();
- boolean deleted = false;
-
+ if (result.size() == 0)
+ {
+ throw new FileSystemException("no such folder: " + folderPath);
+ }
+
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
Iterator iter = result.iterator();
while (iter.hasNext())
{
VersionEntry versionEntry = (VersionEntry)iter.next();
- if (versionEntry.getData() == null)
- {
- session.delete(versionEntry);
- deleted = true;
- }
+ session.delete(versionEntry);
+
}
+
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
@@ -359,12 +348,10 @@
while (iter.hasNext())
{
CMSEntry cmsEntry = (CMSEntry)iter.next();
- if (cmsEntry.getData() == null)
- {
- session.delete(cmsEntry);
- deleted = true;
- }
+ session.delete(cmsEntry);
+
}
+
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
@@ -372,19 +359,11 @@
while (iter.hasNext())
{
RepositoryEntry repoEntry = (RepositoryEntry)iter.next();
- if (repoEntry.getData() == null)
- {
- session.delete(repoEntry);
- deleted = true;
- }
+ session.delete(repoEntry);
+
}
- }
- if (!deleted)
- {
- throw new FileSystemException("no such folder: " + folderPath);
}
-
tx.commit();
}
catch (Exception e)
@@ -470,11 +449,7 @@
Iterator iter = rs.iterator();
if (iter.hasNext())
{
- Object object = iter.next();
- if (object != null)
- {
- return true;
- }
+ return true;
}
return false;
}
@@ -517,11 +492,7 @@
Iterator iter = rs.iterator();
if (iter.hasNext())
{
- Object object = iter.next();
- if (object == null)
- {
- return true;
- }
+ return true;
}
return false;
}
@@ -989,11 +960,11 @@
in = IOTools.safeBufferedWrapper(new FileInputStream(f));
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
- Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
+ Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
query.setString(0, parentDir);
query.setString(1, name);
VersionEntry versionEntry = (VersionEntry)query.uniqueResult();
- if (versionEntry == null || versionEntry.getData() == null)
+ if (versionEntry == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1006,11 +977,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
- Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
+ Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
query.setString(0, parentDir);
query.setString(1, name);
CMSEntry cmsEntry = (CMSEntry)query.uniqueResult();
- if (cmsEntry == null || cmsEntry.getData() == null)
+ if (cmsEntry == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1023,11 +994,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
- Query query = session.createQuery("from RepositoryEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
+ Query query = session.createQuery("from RepositoryEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
query.setString(0, parentDir);
query.setString(1, name);
RepositoryEntry repoEntry = (RepositoryEntry)query.uniqueResult();
- if (repoEntry == null || repoEntry.getData() == null)
+ if (repoEntry == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1198,11 +1169,11 @@
in = IOTools.safeBufferedWrapper(new FileInputStream(f));
if (schemaObjectPrefix.equals(HibernateStoreConstants.versionClassName))
{
- Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
+ Query query = session.createQuery("from VersionEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
query.setString(0, parentDir);
query.setString(1, name);
VersionEntry versionEntry = (VersionEntry)query.uniqueResult();
- if (versionEntry == null || versionEntry.getData() == null)
+ if (versionEntry == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1215,11 +1186,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.cmsClassName))
{
- Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
+ Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
query.setString(0, parentDir);
query.setString(1, name);
CMSEntry cmsEntry = (CMSEntry)query.uniqueResult();
- if (cmsEntry == null || cmsEntry.getData() == null)
+ if (cmsEntry == null)
{
throw new Exception("No such Entry " + name);
}
@@ -1232,11 +1203,11 @@
}
else if (schemaObjectPrefix.equals(HibernateStoreConstants.repositoryClassName))
{
- Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ?");
+ Query query = session.createQuery("from CMSEntry where FSENTRY_PATH = ? and FSENTRY_NAME = ? and FSENTRY_DATA is not null");
query.setString(0, parentDir);
query.setString(1, name);
RepositoryEntry repoEntry = (RepositoryEntry)query.uniqueResult();
- if (repoEntry == null || repoEntry.getData() == null)
+ if (repoEntry == null)
{
throw new Exception("No such Entry " + name);
}
17 years, 9 months
JBoss Portal SVN: r12112 - modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-10-21 08:37:29 -0400 (Tue, 21 Oct 2008)
New Revision: 12112
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java
Log:
- JBPORTAL-2204: Use introspection to invoke getResponse on Sun JSF bridge. Note: only works with bridge 1.2.3+
- Added better error reporting.
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java 2008-10-21 10:10:44 UTC (rev 12111)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestDispatcherImpl.java 2008-10-21 12:37:29 UTC (rev 12112)
@@ -22,31 +22,32 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.jsr168.api;
+import org.jboss.portal.portlet.container.PortletApplication;
+import org.jboss.portal.portlet.container.PortletApplicationContext;
+import org.jboss.portal.portlet.impl.jsr168.Dispatch;
+import org.jboss.portal.portlet.impl.jsr168.DispatchType;
import org.jboss.portal.portlet.impl.jsr168.DispatchedHttpServletRequest;
import org.jboss.portal.portlet.impl.jsr168.DispatchedHttpServletResponse;
-import org.jboss.portal.portlet.impl.jsr168.DispatchType;
-import org.jboss.portal.portlet.impl.jsr168.Dispatch;
-import org.jboss.portal.portlet.container.PortletApplication;
-import org.jboss.portal.portlet.container.PortletApplicationContext;
+import javax.portlet.ActionRequest;
+import javax.portlet.EventRequest;
+import javax.portlet.MimeResponse;
import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletResponse;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletResponse;
-import javax.portlet.ActionRequest;
-import javax.portlet.EventRequest;
import javax.portlet.ResourceRequest;
-import javax.portlet.MimeResponse;
import javax.portlet.filter.PortletRequestWrapper;
import javax.portlet.filter.PortletResponseWrapper;
import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
-import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponseWrapper;
import java.io.IOException;
+import java.lang.reflect.Method;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -184,7 +185,8 @@
}
else
{
- throw new IllegalArgumentException();
+ // do we need something similar to unwrap(PortletResponse) behavior?
+ throw new IllegalArgumentException("Cannot unwrap request: " + wrapped.getClass().getName());
}
}
}
@@ -204,7 +206,17 @@
}
else
{
- throw new IllegalArgumentException();
+ // attempt to invoke a potential getResponse method (workaround for JBPORTAL-2204)
+ Class<? extends PortletResponse> wrappedClass = wrapped.getClass();
+ try
+ {
+ Method getResponse = wrappedClass.getMethod("getResponse");
+ wrapped = (PortletResponse)getResponse.invoke(wrapped);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Cannot unwrap response: " + wrappedClass.getName());
+ }
}
}
}
17 years, 9 months