JBoss Rich Faces SVN: r12083 - in trunk/framework/jsf-test: src/main/java/org/richfaces/test/staging and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-12-31 17:33:20 -0500 (Wed, 31 Dec 2008)
New Revision: 12083
Modified:
trunk/framework/jsf-test/pom.xml
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingHttpSession.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java
Log:
Implement multy-session server for a concurrent request tests.
Modified: trunk/framework/jsf-test/pom.xml
===================================================================
--- trunk/framework/jsf-test/pom.xml 2008-12-31 11:56:58 UTC (rev 12082)
+++ trunk/framework/jsf-test/pom.xml 2008-12-31 22:33:20 UTC (rev 12083)
@@ -67,6 +67,12 @@
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.9</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>javax.el</groupId>
@@ -103,6 +109,12 @@
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>de.berlios.jsunit</groupId>
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingHttpSession.java
===================================================================
--- trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingHttpSession.java 2008-12-31 11:56:58 UTC (rev 12082)
+++ trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingHttpSession.java 2008-12-31 22:33:20 UTC (rev 12083)
@@ -148,7 +148,7 @@
*/
public void invalidate() {
checkValid();
- unboundAttributes();
+ destroy();
this.valid=false;
}
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java
===================================================================
--- trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java 2008-12-31 11:56:58 UTC (rev 12082)
+++ trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java 2008-12-31 22:33:20 UTC (rev 12083)
@@ -92,9 +92,12 @@
private ServletContext contextProxy;
- private ServerHttpSession session = null;
+ private HttpSession currentSession = null;
+
+ private ThreadLocal<HttpSession> sessions = new ThreadLocal<HttpSession>();
+
+ private boolean sessionPerThread = false;
- private HttpSession sessionProxy = null;
private boolean initialised = false;
@@ -261,6 +264,12 @@
}
});
}
+
+ @Override
+ public void invalidate() {
+ super.invalidate();
+ setCurrentSession(null);
+ }
}
/**
@@ -274,6 +283,8 @@
invoker.invoke((T) listener);
}
}
+
+
}
/**
@@ -607,6 +618,32 @@
}
+ public boolean isSessionPerThread() {
+ return sessionPerThread;
+ }
+
+ public void setSessionPerThread(boolean sessionPerThread) {
+ this.sessionPerThread = sessionPerThread;
+ }
+
+
+ HttpSession getCurrentSession() {
+ if (isSessionPerThread()) {
+ return sessions.get();
+ } else {
+ return currentSession;
+ }
+ }
+
+ void setCurrentSession(HttpSession session) {
+ if (isSessionPerThread()) {
+ sessions.set(session);
+ } else {
+ this.currentSession=session;
+ }
+
+ }
+
/**
* Get virtual server session object. Create new one if necessary.
*
@@ -644,18 +681,20 @@
if (!initialised) {
throw new TestException("Staging server have not been initialised");
}
- if (null == this.session && create) {
- this.session = new ServerHttpSession();
+ HttpSession httpSession = this.getCurrentSession();
+ if (null == httpSession && create) {
+ ServerHttpSession sessionImpl = new ServerHttpSession();
// Create proxy objects.
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (null == loader) {
loader = this.getClass().getClassLoader();
}
- this.sessionProxy = (HttpSession) Proxy.newProxyInstance(loader,
+ httpSession = (HttpSession) Proxy.newProxyInstance(loader,
new Class[] { HttpSession.class },
- getInvocationHandler(session));
+ getInvocationHandler(sessionImpl));
+ setCurrentSession(httpSession);
// inform session listeners.
- final HttpSessionEvent event = new HttpSessionEvent(session);
+ final HttpSessionEvent event = new HttpSessionEvent(httpSession);
fireEvent(SESSION_LISTENER_CLASS,
new EventInvoker<HttpSessionListener>() {
public void invoke(HttpSessionListener listener) {
@@ -663,7 +702,7 @@
}
});
}
- return sessionProxy;
+ return httpSession;
}
/**
@@ -722,7 +761,9 @@
}
this.initialised = false;
// Destroy session
- if (null != this.session) {
+ // TODO - destroy all threads.
+ HttpSession session = getCurrentSession();
+ if (null != session) {
// inform session listeners.
final HttpSessionEvent event = new HttpSessionEvent(session);
fireEvent(SESSION_LISTENER_CLASS,
@@ -731,8 +772,8 @@
listener.sessionDestroyed(event);
}
});
- session.destroy();
- session = null;
+ session.invalidate();
+ setCurrentSession(null);
}
// Inform listeners
final ServletContextEvent event = new ServletContextEvent(context);
15 years, 11 months
JBoss Rich Faces SVN: r12082 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-31 06:56:58 -0500 (Wed, 31 Dec 2008)
New Revision: 12082
Modified:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.CR1.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.CR1.xls
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12081 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-31 06:37:01 -0500 (Wed, 31 Dec 2008)
New Revision: 12081
Modified:
trunk/docs/userguide/en/src/main/docbook/included/messages.xml
Log:
RF-4433: describing <rich:messages> new feature
Modified: trunk/docs/userguide/en/src/main/docbook/included/messages.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/messages.xml 2008-12-31 10:13:35 UTC (rev 12080)
+++ trunk/docs/userguide/en/src/main/docbook/included/messages.xml 2008-12-31 11:37:01 UTC (rev 12081)
@@ -71,138 +71,72 @@
<section>
<title>Details of Usage</title>
- <para> The component has the same behavior as standard <emphasis role="bold">
- <property><h:message></property>
- </emphasis>component except next features: <itemizedlist>
- <listitem>
- <para>It's ajaxRendered. It means that
- the component is reRendered after Ajax
- request automatically without
- outputPanel usage.</para>
- </listitem>
- <listitem>
- <para>The component optionally provides
- "passed" state which
- will be shown if no message to be
- displayed.</para>
- </listitem>
- <listitem>
- <para>Provides possibility to add some marker to
- message. By default, a marker element
- isn't shown.</para>
- </listitem>
- </itemizedlist>
+ <para>The <emphasis role="bold"><property><rich:messages></property></emphasis> component is considered as JSF HTML <emphasis role="bold"><property><h:message></property></emphasis>,
+ extended with following features:
+ <itemizedlist>
+ <listitem><para>Ajax support (the component does not require to be wrapped in <emphasis role="bold"><property><a4j:outputPanel></property></emphasis> in order to be rendered during Ajax requests);</para></listitem>
+ <listitem><para>possibilty to add graphical markers (pictograms) to reinforce a message for both "passed" or "failed" states;</para></listitem>
+ <listitem><para>set of predefined CSS classes for customizing messages appearance.</para></listitem>
+ </itemizedlist>
</para>
- <para>The component provides two parts to be optionally defined: marker and
- informational label before the marker for every message.</para>
- <para> Set of facet which can be used for a marker defining: <itemizedlist>
- <listitem>
- <para><emphasis>
- <property>"passedMarker"</property>
- </emphasis>. This facet is provided to
- allow setting a marker to be displayed
- if there is no message.</para>
- </listitem>
- <listitem>
- <para><emphasis>
- <property>"errorMarker"</property>
- </emphasis>. This facet is provided to
- allow setting a marker to be displayed
- if there is a message with a severity
- class of
- "ERROR".</para>
- </listitem>
- <listitem>
- <para><emphasis>
- <property>"fatalMarker"</property>
- </emphasis>. This facet is provided to
- allow setting a marker to be displayed
- if there is a message with a severity
- class of
- "FATAL".</para>
- </listitem>
- <listitem>
- <para><emphasis>
- <property>"infoMarker"</property>
- </emphasis>. This facet is provided to
- allow setting a marker to be displayed
- if there is a message with a severity
- class of
- "INFO".</para>
- </listitem>
- <listitem>
- <para><emphasis>
- <property>"warnMarker"</property>
- </emphasis>. This facet is provided to
- allow setting a marker to be displayed
- if there is an message with a severity
- class of
- "WARN".</para>
- </listitem>
- </itemizedlist>
- </para>
+ <para>There are two optional parts that could be defined for every message: marker and text label. The set of facets, which can be used for a marker definition, is shown below:</para>
+
+ <table>
+ <title>Facets</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Facet</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>errorMarker</entry>
+ <entry>Defines marker for "Error" message severity class</entry>
+ </row>
+ <row>
+ <entry>fatalError</entry>
+ <entry>Defines marker for "Fatal" message severity class</entry>
+ </row>
+ <row>
+ <entry>infoError</entry>
+ <entry>Defines marker for "Info" message severity class</entry>
+ </row>
+ <row>
+ <entry>warnError</entry>
+ <entry>Defines marker for "Warn" message severity class</entry>
+ </row>
+ <row>
+ <entry>passedError</entry>
+ <entry>Defines marker if there is no message</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>The following example shows different variants of customization of the component.</para>
- <para>The following example shows different variants of customization of the
- component.</para>
-
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
- <rich:messages layout="table" tooltip="true" showDetail="false" showSummary="true" passedLabel="No Errors"
- <f:facet name="errorMarker">
+ <programlisting role="XML"><![CDATA[<rich:messages layout="table" tooltip="true" showDetail="false" showSummary="true" passedLabel="No Errors">
+ <f:facet name="errorMarker">
<h:graphicImage url="/image/error.png"/>
- </f:facet>
- <f:facet name="infoMarker">
+ </f:facet>
+ <f:facet name="infoMarker">
<h:graphicImage url="/image/info.png"/>
- </f:facet>
- <f:facet name="passedMarker">
+ </f:facet>
+ <f:facet name="passedMarker">
<h:graphicImage url="/image/passed.png"/>
- </f:facet>
- </rich:messages>
-...
-]]></programlisting>
+ </f:facet>
+</rich:messages>]]></programlisting>
+
+ <para>The <emphasis role="bold"><property><rich:messages></property></emphasis> component keeps all messages for all components even after only one ajax-validated component was updated.</para>
</section>
- <section>
- <title>Facets</title>
- <table>
- <title>Facets</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Facet</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>errorMarker</entry>
- <entry>Redefines the content for the marker if there is message with a severity class of "ERROR"</entry>
- </row>
- <row>
- <entry>fatalError</entry>
- <entry>Redefines the content for the marker if there is message with a severity class of "FATAL"</entry>
- </row>
- <row>
- <entry>infoError</entry>
- <entry>Redefines the content for the marker if there is message with a severity class of "INFO"</entry>
- </row>
- <row>
- <entry>warnError</entry>
- <entry>Redefines the content for the marker if there is message with a severity class of "WARN"</entry>
- </row>
- <row>
- <entry>passedError</entry>
- <entry>Redefines the content for the marker if there is no message</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
- <section>
+ <section>
<title>Look-and-Feel Customization</title>
<para>For skinnability implementation, the components use a <emphasis>
15 years, 11 months
JBoss Rich Faces SVN: r12080 - trunk/test-applications/jsp/src/main/webapp/Tooltip.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-12-31 05:13:35 -0500 (Wed, 31 Dec 2008)
New Revision: 12080
Modified:
trunk/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp
Log:
remove findComponent
Modified: trunk/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp 2008-12-31 09:57:29 UTC (rev 12079)
+++ trunk/test-applications/jsp/src/main/webapp/Tooltip/TooltipProperty.jsp 2008-12-31 10:13:35 UTC (rev 12080)
@@ -94,16 +94,5 @@
<h:selectBooleanCheckbox value="#{tooltip.rendered}">
<a4j:support event="onclick" reRender="tooltipID" />
</h:selectBooleanCheckbox>
- </h:panelGrid>
- <br />
- <br />
- <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
- <h:panelGrid columns="2">
- <rich:column>
- <a4j:commandLink value="getValue" reRender="findID"></a4j:commandLink>
- </rich:column>
- <rich:column id="findID">
- <h:outputText value="#{rich:findComponent('tooltipID').value}" />
- </rich:column>
- </h:panelGrid>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
15 years, 11 months
JBoss Rich Faces SVN: r12079 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-31 04:57:29 -0500 (Wed, 31 Dec 2008)
New Revision: 12079
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
Log:
RF-4056: Getting Started with RichFaces chapter should be updated
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2008-12-30 17:05:10 UTC (rev 12078)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2008-12-31 09:57:29 UTC (rev 12079)
@@ -66,11 +66,19 @@
necessary to register them in project <code>web.xml</code>
file. Add following lines in <code>web.xml</code>: </para>
<programlisting role="XML"><![CDATA[...
+<!-- Plugging the "Blue Sky" skin into the project -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
+
+<!-- Making the RichFaces skin spread to standard HTML controls -->
+<context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>enable</param-value>
+</context-param>
+<!-- Defining and mapping the RichFaces filter -->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
@@ -85,6 +93,7 @@
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
...]]></programlisting>
+ <para>For more information on how to work with RichFaces skins read "<link linkend="Skinnability">Skinnabilty</link>" chapter.</para>
<para>Finally the <code>web.xml</code> should look like this: </para>
<programlisting role="XML"><![CDATA[<?xml version="1.0"?>
<web-app version="2.5"
@@ -102,15 +111,18 @@
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
+
+<context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>enable</param-value>
+</context-param>
-<!-- RichFaces Filter -->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
-<!-- RichFaces Filter mapping-->
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
@@ -200,37 +212,35 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<html>
- <head>
- <title>RichFaces Greeter</title>
- </head>
- <body>
- <f:view>
- <h1>RichFaces Greeter</h1>
- <a4j:form>
- <h:panelGroup style="margin-left: 10" >
- <h:outputText value="Your name: " />
- <h:inputText value="#{user.name}" >
- <f:validateLength minimum="1" maximum="30" />
- </h:inputText>
- <a4j:commandButton value="Get greeting" reRender="greeting" />
- </h:panelGroup>
- </a4j:form>
- <h:panelGroup id="greeting" >
- <h:outputText value="Hello, " rendered="#{not empty user.name}" style="margin-left: 10" />
- <h:outputText value="#{user.name}" />
- <h:outputText value="!" rendered="#{not empty user.name}" />
- </h:panelGroup>
- </f:view>
- </body>
+ <head>
+ <title>RichFaces Greeter</title>
+ </head>
+ <body>
+ <f:view>
+ <a4j:form>
+ <rich:panel header="RichFaces Greeter" style="width: 315px">
+ <h:outputText value="Your name: " />
+ <h:inputText value="#{user.name}" >
+ <f:validateLength minimum="1" maximum="30" />
+ </h:inputText>
+
+ <a4j:commandButton value="Get greeting" reRender="greeting" />
+
+ <h:panelGroup id="greeting" >
+ <h:outputText value="Hello, " rendered="#{not empty user.name}" />
+ <h:outputText value="#{user.name}" />
+ <h:outputText value="!" rendered="#{not empty user.name}" />
+ </h:panelGroup>
+ </rich:panel>
+ </a4j:form>
+ </f:view>
+ </body>
</html>]]></programlisting>
- <para>The application uses two RichFaces components: <emphasis
- role="bold">
- <property><a4j:commandButton></property>
- </emphasis> with built-in Ajax support allows rendering a
- greeting dynamically after a response comes back and
- <emphasis role="bold">
- <property><a4j:form></property>
- </emphasis> helps the button to perform the action. </para>
+ <para>The application uses three RichFaces components:
+ <emphasis role="bold"><property><rich:panel></property></emphasis> is used as visual container for information;
+ <emphasis role="bold"><property><a4j:commandButton></property></emphasis> with built-in Ajax support allows rendering a greeting dynamically after a response comes back
+ and <emphasis role="bold"><property><a4j:form></property></emphasis> helps the button to perform the action.
+ </para>
<para>Note, that the RichFaces tag library should be declared on each
JSP page. For XHTML pages add following lines for tag
library declaration: </para>
15 years, 11 months
JBoss Rich Faces SVN: r12078 - trunk/docs/common-resources/en/src/main/css.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-30 12:05:10 -0500 (Tue, 30 Dec 2008)
New Revision: 12078
Modified:
trunk/docs/common-resources/en/src/main/css/html-common.css
Log:
https://jira.jboss.org/jira/browse/RF-5429 - an anchors were fixed
Modified: trunk/docs/common-resources/en/src/main/css/html-common.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html-common.css 2008-12-30 15:52:15 UTC (rev 12077)
+++ trunk/docs/common-resources/en/src/main/css/html-common.css 2008-12-30 17:05:10 UTC (rev 12078)
@@ -12,23 +12,13 @@
padding: 0px;
}
-h2.title a:hover, h3.title a:hover, h4.title a:hover, h5.title a:hover, h6.title a:hover {
- text-decoration:underline;
- color: #334D69;
-}
-
-h2.title a, h3.title a, h4.title a, h5.title a, h6.title a {
+h2.title a, h3.title a, h4.title a, h5.title a, h6.title a, p.title a {
text-decoration:none;
color: #334D69;
}
-
p.title a{
- text-decoration:none;
color:#333333;
}
-p.title a:hover{
- text-decoration:underline;
-}
div.book, div.chapter, div.section{
width:1000px;
15 years, 11 months
JBoss Rich Faces SVN: r12077 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-30 10:52:15 -0500 (Tue, 30 Dec 2008)
New Revision: 12077
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5502
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java 2008-12-30 15:49:07 UTC (rev 12076)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java 2008-12-30 15:52:15 UTC (rev 12077)
@@ -2,30 +2,44 @@
import java.util.StringTokenizer;
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
+import org.richfaces.demo.stateApi.Bean;
+import org.richfaces.demo.tree.Library;
import org.richfaces.demo.tree.Song;
public class SongConverter implements Converter{
public Object getAsObject(FacesContext context, UIComponent component,
String value) {
- StringTokenizer tokenizer = new StringTokenizer(value,":");
- String id,title,genre,num;
- id = tokenizer.nextToken();
- title = tokenizer.nextToken();
- num = tokenizer.nextToken();
- return new Song(Long.parseLong(id),title,Integer.parseInt(num));
+ long id = Long.parseLong(value);
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ExpressionFactory expressionFactory = facesContext.getApplication()
+ .getExpressionFactory();
+
+ ValueExpression beanExpression = expressionFactory
+ .createValueExpression(facesContext.getELContext(),
+ "#{library}", Library.class);
+
+ Library library = (Library)beanExpression.getValue(facesContext.getELContext());
+ for (Song song : library.getSongsList()) {
+ if (song.getId() == id){
+ return song;
+ }
+
+ }
+
+ return null;
}
public String getAsString(FacesContext context, UIComponent component,
Object value) {
Song song = (Song)value;
- return song.getId()+":" +
- song.getTitle() + ":" +
- song.getTrackNumber();
+ return new Long(song.getId()).toString();
}
}
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-12-30 15:49:07 UTC (rev 12076)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-12-30 15:52:15 UTC (rev 12077)
@@ -70,7 +70,7 @@
effect= richMisc, Effect, /images/ico_common.gif, /images/cn_Effect.gif, effect.html, jbossrichfaces/freezone/docs/tlddoc/rich/effect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEffect.html, /richfaces/effect.jsf
contextMenu= richMenu, Context Menu, /images/ico_ContextMenu.gif, /images/cn_contextMenu.gif, contextMenu.html, jbossrichfaces/freezone/docs/tlddoc/rich/contextMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIContextMenu.html, /richfaces/contextMenu.jsf
componentControl=richMisc, Component Control, \t/images/ico_common.gif, \t\t/images/cn_componentControl.gif, componentControl.html, jbossrichfaces/freezone/docs/tlddoc/rich/componentControl.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIComponentControl.html, /richfaces/componentControl.jsf
-orderingList=richSelect, Ordering List, \t\t/images/ico_OrderingList.gif, \t/images/cn_orderingList.gif, orderingList.html, jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIOrderingList.html, \t\t/richfaces/orderingList.jsf
+orderingList=richSelect, Ordering List, \t\t/images/ico_OrderingList.gif, \t/images/cn_orderingList.gif, orderingList.html, jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIOrderingList.html, \t\t/richfaces/orderingList.jsf, new
listShuttle=richSelect, List Shuttle, \t\t/images/ico_ListShuttle.gif, /images/cn_listShuttle.gif, listShuttle.html, jbossrichfaces/freezone/docs/tlddoc/rich/listShuttle.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIListShuttle.html, \t\t/richfaces/listShuttle.jsf
pickList=richSelect, Pick List, \t\t\t/images/ico_pickList.gif, /images/cn_PickList.gif, pickList.html, jbossrichfaces/freezone/docs/tlddoc/rich/pickList.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIPickList.html, \t\t\t\t/richfaces/pickList.jsf
progressBar=richOutputs, Progress Bar, \t\t/images/ico_progressBar.gif, /images/cn_ProgressBar.gif, progressBar.html, jbossrichfaces/freezone/docs/tlddoc/rich/progressBar.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIProgressBar.html, \t/richfaces/progressBar.jsf
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-12-30 15:49:07 UTC (rev 12076)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-12-30 15:52:15 UTC (rev 12077)
@@ -58,7 +58,7 @@
</context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
- <param-value>DEFAULT</param-value>
+ <param-value>ALL</param-value>
</context-param>
<filter>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml 2008-12-30 15:49:07 UTC (rev 12076)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml 2008-12-30 15:52:15 UTC (rev 12077)
@@ -10,10 +10,16 @@
}
.top{
vertical-align:top;
- }
+ }
+ .70per{
+ width:70%;
+ }
+ .30per{
+ width:200px;
+ }
</style>
<h:form>
- <h:panelGrid columns="2" columnClasses="top, top">
+ <h:panelGrid columns="2" columnClasses="top 70per, top 30per" width="100%">
<rich:orderingList value="#{library.songsList}" var="lib" listHeight="300" listWidth="350" converter="orderingListConverter" selection="#{library.selectedSongsSet}">
<rich:column width="180">
<f:facet name="header">
@@ -21,16 +27,16 @@
</f:facet>
<h:outputText value="#{lib.title}"></h:outputText>
</rich:column>
- <rich:column>
+ <rich:column>
<f:facet name="header">
<h:outputText value="Artist Name" />
</f:facet>
- <h:outputText value="#{lib.album.artist.name}"></h:outputText>
+ <h:outputText value="#{lib.album.artist.name}"></h:outputText><br/>
</rich:column>
- <a4j:support event="onclick" requestDelay="500" action="#{library.takeSelection}" reRender="output"/>
- <a4j:support event="onkeyup" requestDelay="500" action="#{library.takeSelection}" reRender="output"/>
+ <a4j:support event="onclick" ignoreDupResponses="true" requestDelay="500" action="#{library.takeSelection}" reRender="output"/>
+ <a4j:support event="onkeyup" ignoreDupResponses="true" requestDelay="500" action="#{library.takeSelection}" reRender="output"/>
</rich:orderingList>
- <rich:panel id="output" header="Current Selection">
+ <rich:panel id="output" header="Current Selection" style="width:200px">
<rich:dataList value="#{library.selectedSongsList}" var="song" rendered="#{not empty library.selectedSongsList}">
<h:outputText value="#{song.title}"></h:outputText>
</rich:dataList>
15 years, 11 months
JBoss Rich Faces SVN: r12076 - trunk/ui/combobox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-30 10:49:07 -0500 (Tue, 30 Dec 2008)
New Revision: 12076
Modified:
trunk/ui/combobox/src/main/config/component/combobox.xml
Log:
https://jira.jboss.org/jira/browse/RF-4589
Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml 2008-12-30 15:48:26 UTC (rev 12075)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml 2008-12-30 15:49:07 UTC (rev 12076)
@@ -284,7 +284,12 @@
&html_input_events;
&html_events;
&ui_input_attributes;
-
+
+ <property hidden="true">
+ <name>align</name>
+ <classname>java.lang.String</classname>
+ </property>
+
<property hidden="true" existintag="false" exist="false">
<name>size</name>
<classname>int</classname>
15 years, 11 months
JBoss Rich Faces SVN: r12075 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/calendar and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-30 10:48:26 -0500 (Tue, 30 Dec 2008)
New Revision: 12075
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/todayControlAndBoundaryDatesModesTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
Fix failed calendar selenium tests
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-30 14:34:11 UTC (rev 12074)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-30 15:48:26 UTC (rev 12075)
@@ -237,12 +237,35 @@
NULLModel = false;
firstWeekDay = 0;
disabled = false;
+ datePattern = DATE_PATTERN;
}
+
+ public void reset2() {
+ selectedDate = DEFAULT_DATE;
+ currentDate = getDayInMay(5);
+ defaultTime = new Date();
+ resetSelectedDateString();
+ datePattern = DATE_PATTERN;
+ locale = LOCALE;
+ timeZone = TIME_ZONE;
+ Calendar c = getLocale()!=null ? Calendar.getInstance(getLocale()) : Calendar.getInstance();
+ c.set(c.get(Calendar.YEAR), c.get(Calendar.MONTH) - 1, 1);
+ preloadDateRangeStart = c.getTime(); // Set preloadBegin by the first day of the last month
+ c.set(c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 3, 0);
+ preloadDateRangeEnd = c.getTime(); // Set preloadEnd by the last day of the next month
+ isPopup = true;
+ }
+
public String resetAction() {
reset();
return null;
}
+
+ public String resetAction2() {
+ reset2();
+ return null;
+ }
public String getStatus() {
return status;
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/todayControlAndBoundaryDatesModesTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-30 14:34:11 UTC (rev 12074)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-30 15:48:26 UTC (rev 12075)
@@ -50,6 +50,8 @@
public class CalendarTest extends SeleniumTestBase {
static final String RESET_METHOD = "#{calendarBean.reset}";
+
+ static final String RESET_METHOD2 = "#{calendarBean.reset2}";
static final String INIT_SHOW_ATTRIBUTES_TEST = "#{calendarBean.initShowAttributesTest}";
@@ -113,6 +115,8 @@
String statusId;
String resetActionId;
+
+ String resetAction2Id;
String testClientModeId;
@@ -213,6 +217,7 @@
serverSubmitId = parentId + FORM_ID + "serverSubmit";
statusId = parentId + FORM_ID + "status";
resetActionId = parentId + CONTROLS_FORM_ID + "resetAction";
+ resetAction2Id = parentId + CONTROLS_FORM_ID + "resetAction2";
testClientModeId = parentId + CONTROLS_FORM_ID + "testClientMode";
setupActionId = parentId + CONTROLS_FORM_ID + "setup";
ajaxSetupActionId = parentId + CONTROLS_FORM_ID + "ajaxSetup";
@@ -905,7 +910,7 @@
@Test
public void testCalendarComponent(Template template) {
- renderPage(template);
+ renderPage(template, RESET_METHOD2);
String containerId = getParentId() + "_form:";
String calendarOpenedId = containerId + "calendar";
@@ -934,23 +939,22 @@
@Test
public void testSelectDateComponent(Template template) {
- renderPage(template);
-
+ renderPage(template, RESET_METHOD2);
+ initIds(getParentId());
Date newSelectedDate = getDayInMay(15);
String containerId = getParentId() + "_form:";
String calendarOpenedId = containerId + "calendar";
String calendarCollapsedId = calendarOpenedId + "Popup";
- String calendarInputDate = calendarOpenedId + "InputDate";
String calendarPopupButton = calendarCollapsedId + "Button";
- String outputPanel = containerId + "outputPanel";
+
Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
writeStatus("Mouse click on calendar popup button");
clickById(calendarPopupButton);
Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
- String inputDateString = getValueById(calendarInputDate);
+ String inputDateString = getValueById(selectedDateId);
Date readDate = null;
try {
readDate = DATE_FORMAT.parse(inputDateString);
@@ -962,11 +966,10 @@
// click on 15th of May
String newSelectedDateId = calendarOpenedId + "DayCell18";
clickById(newSelectedDateId);
+
+ clickCommandAndWait(serverSubmitId);
- writeStatus("Mouse click outside calendar");
- clickById(outputPanel);
-
- inputDateString = getValueById(calendarInputDate);
+ inputDateString = getValueById(selectedDateId);
try {
readDate = DATE_FORMAT.parse(inputDateString);
} catch (ParseException parseException) {
@@ -1092,7 +1095,7 @@
@Test
public void testDatePatternNonPopupMode(Template template) {
- renderPage(template, null);
+ renderPage(template, RESET_METHOD2);
initIds(getParentId());
String originalPattern = "MM/dd/yyyy HH:mm";
writeStatus("Check 'datePattern' attribute in non-popup mode");
@@ -1122,7 +1125,7 @@
@Test
public void testDatePatternPopupMode(Template template) {
- renderPage(template, null);
+ renderPage(template, RESET_METHOD2);
initIds(getParentId());
String originalPattern = "MM/dd/yyyy HH:mm";
writeStatus("Check 'datePattern' attribute in popup mode");
@@ -1135,14 +1138,11 @@
setValueById(currentDateId, "");
setValueById(datePatternId, expectedPattern);
- setPopup(true);
setup();
- showPopup();
try {
writeStatus("Check calendar popup is shown up and date in the input field is in proper format");
- Assert.assertTrue(isVisible(calendarId), "Calendar popup is not visible");
- AssertValueEquals(inputDateId, expectedSelectedDate, "Calendar input field shows wrong date");
+ AssertValueEquals(calendarId + "InputDate", expectedSelectedDate, "Calendar input field shows wrong date");
writeStatus("Check displayed date again. It as before should be in 'MM/yyyy' format - time part is not visible at all");
String date = selenium.getText(dateSelectionXpath);
@@ -1376,16 +1376,19 @@
@Test
public void testTodayControlMode(Template template) {
- renderPage(TODAY_CONTROL_AND_BOUNDARY_DATES_MODES_TEST_URL, template, null);
+ renderPage(TODAY_CONTROL_AND_BOUNDARY_DATES_MODES_TEST_URL, template, RESET_METHOD2);
initIds(getParentId());
-
- String datePattern = selenium.getText(getParentId() + FORM_ID + "datePattern");
+
+ String expectedPattern = "MM/dd/yyyy";
+ setValueById(getParentId() + FORM_ID + "datePattern", expectedPattern);
+ clickCommandAndWait(getParentId() + FORM_ID + "setup");
+
Locale locale = new Locale(selenium.getText(getParentId() + FORM_ID + "locale"));
Date presentTime = Calendar.getInstance(locale).getTime();
String month = DateUtils.month(presentTime, locale);
int year = DateUtils.year(presentTime);
String expectedCurrentMonthYearHeader = month + ", " + year;
- String expectedTodaySelectedDate = new SimpleDateFormat(datePattern).format(new Date());
+ String expectedTodaySelectedDate = new SimpleDateFormat(expectedPattern).format(new Date());
writeStatus("Check 'todayControlMode' attribute");
@@ -1398,7 +1401,9 @@
selenium.click(todayControlXpath + "/div");
String actualSelectedDate = selenium.getValue(inputDateId);
String actualCurrentDate = selenium.getText(currentDateHeaderXpath);
-
+
+
+
writeStatus("Check selected date and current date set to now");
//TODO: time ain't set to current time ... is it true? find out!
Assert.assertEquals(actualSelectedDate, expectedTodaySelectedDate);
@@ -1459,12 +1464,17 @@
@Test
public void testBoundaryDatesMode(Template template) {
- renderPage(TODAY_CONTROL_AND_BOUNDARY_DATES_MODES_TEST_URL, template, null);
+ renderPage(TODAY_CONTROL_AND_BOUNDARY_DATES_MODES_TEST_URL, template, RESET_METHOD2);
initIds(getParentId());
+
String selectedDateId = getParentId() + FORM_ID + "selectedDate";
+ String currentDateId = getParentId() + FORM_ID + "currentDate";
String startDate = "02/21/2007 12:00";
String firstMarCellId = calendarId + "DayCell32";
String thirtyFirstJanCellId = calendarId + "DayCell3";
+ selenium.focus(currentDateId);
+ setValueById(currentDateId, startDate);
+ selenium.fireEvent(currentDateId, "blur");
selenium.focus(selectedDateId);
setValueById(selectedDateId, startDate);
selenium.fireEvent(selectedDateId, "blur");
15 years, 11 months
JBoss Rich Faces SVN: r12074 - in trunk/samples/richfaces-demo/src/main: java/org/richfaces/demo/orderingList and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-30 09:34:11 -0500 (Tue, 30 Dec 2008)
New Revision: 12074
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java
trunk/samples/richfaces-demo/src/main/webapp/images/icons/ico_new_group.gif
trunk/samples/richfaces-demo/src/main/webapp/images/icons/ico_new_item.gif
trunk/samples/richfaces-demo/src/main/webapp/templates/include/navigationPanelHeader.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5502
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/orderingList/SongConverter.java 2008-12-30 14:34:11 UTC (rev 12074)
@@ -0,0 +1,31 @@
+package org.richfaces.demo.orderingList;
+
+import java.util.StringTokenizer;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+import org.richfaces.demo.tree.Song;
+
+public class SongConverter implements Converter{
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ StringTokenizer tokenizer = new StringTokenizer(value,":");
+ String id,title,genre,num;
+ id = tokenizer.nextToken();
+ title = tokenizer.nextToken();
+ num = tokenizer.nextToken();
+ return new Song(Long.parseLong(id),title,Integer.parseInt(num));
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ Song song = (Song)value;
+ return song.getId()+":" +
+ song.getTitle() + ":" +
+ song.getTrackNumber();
+ }
+
+}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java 2008-12-30 13:27:57 UTC (rev 12073)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java 2008-12-30 14:34:11 UTC (rev 12074)
@@ -91,6 +91,5 @@
public String getType() {
return "album";
}
-
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java 2008-12-30 13:27:57 UTC (rev 12073)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java 2008-12-30 14:34:11 UTC (rev 12074)
@@ -84,4 +84,5 @@
public String getType() {
return "artist";
}
+
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2008-12-30 13:27:57 UTC (rev 12073)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2008-12-30 14:34:11 UTC (rev 12074)
@@ -4,10 +4,13 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.StringTokenizer;
import org.richfaces.model.TreeNode;
@@ -20,7 +23,13 @@
private Map artists = null;
private Object state1;
private Object state2;
-
+ private List<Song> songsList;
+ private Set<Song> selectedSongsSet = new HashSet<Song>();
+ private List<Song> selectedSongsList = new ArrayList<Song>();
+ public Library() {
+ songsList = new ArrayList<Song>();
+ songsList.addAll(getLibraryAsList());
+ }
private Map getArtists() {
if (this.artists==null) {
initData();
@@ -162,4 +171,27 @@
walk(this, appendTo, Song.class);
return appendTo;
}
+ public List<Song> getSongsList() {
+ return songsList;
+ }
+ public void setSongsList(List<Song> songsList) {
+ this.songsList = songsList;
+ }
+ public void takeSelection() {
+ selectedSongsList.clear();
+ selectedSongsList.addAll(selectedSongsSet);
+ }
+ public Set<Song> getSelectedSongsSet() {
+ return selectedSongsSet;
+ }
+ public void setSelectedSongsSet(Set<Song> selectedSongsSet) {
+ this.selectedSongsSet = selectedSongsSet;
+ }
+ public List<Song> getSelectedSongsList() {
+ return selectedSongsList;
+ }
+ public void setSelectedSongsList(List<Song> selectedSongsList) {
+ this.selectedSongsList = selectedSongsList;
+ }
+
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2008-12-30 13:27:57 UTC (rev 12073)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2008-12-30 14:34:11 UTC (rev 12074)
@@ -16,6 +16,13 @@
private int trackNumber;
private Album album;
+ public Song(long id,String title,int num) {
+ this.id=id;
+ this.title=title;
+ this.genre=genre;
+ this.trackNumber=num;
+ }
+
public Song(long id) {
this.id = id;
}
@@ -94,4 +101,36 @@
public String getType() {
return "song";
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (int) (id ^ (id >>> 32));
+ result = prime * result + ((title == null) ? 0 : title.hashCode());
+ result = prime * result + trackNumber;
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final Song other = (Song) obj;
+ if (id != other.id)
+ return false;
+ if (title == null) {
+ if (other.title != null)
+ return false;
+ } else if (!title.equals(other.title))
+ return false;
+ if (trackNumber != other.trackNumber)
+ return false;
+ return true;
+ }
+
}
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-30 13:27:57 UTC (rev 12073)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-30 14:34:11 UTC (rev 12074)
@@ -6,6 +6,10 @@
<converter-id>listShuttleconverter</converter-id>
<converter-class>org.richfaces.demo.listShuttle.Converter</converter-class>
</converter>
+ <converter>
+ <converter-id>orderingListConverter</converter-id>
+ <converter-class>org.richfaces.demo.orderingList.SongConverter</converter-class>
+ </converter>
<managed-bean>
<managed-bean-name>loginbean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.stateApi.Bean</managed-bean-class>
Added: trunk/samples/richfaces-demo/src/main/webapp/images/icons/ico_new_group.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/icons/ico_new_group.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/icons/ico_new_item.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/icons/ico_new_item.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml 2008-12-30 13:27:57 UTC (rev 12073)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml 2008-12-30 14:34:11 UTC (rev 12074)
@@ -7,10 +7,14 @@
<style>
.cent{
text-align:center;
+ }
+ .top{
+ vertical-align:top;
}
</style>
<h:form>
- <rich:orderingList value="#{library.libraryAsList}" var="lib" listHeight="300" listWidth="350">
+ <h:panelGrid columns="2" columnClasses="top, top">
+ <rich:orderingList value="#{library.songsList}" var="lib" listHeight="300" listWidth="350" converter="orderingListConverter" selection="#{library.selectedSongsSet}">
<rich:column width="180">
<f:facet name="header">
<h:outputText value="Song Name" />
@@ -22,7 +26,16 @@
<h:outputText value="Artist Name" />
</f:facet>
<h:outputText value="#{lib.album.artist.name}"></h:outputText>
- </rich:column>
+ </rich:column>
+ <a4j:support event="onclick" requestDelay="500" action="#{library.takeSelection}" reRender="output"/>
+ <a4j:support event="onkeyup" requestDelay="500" action="#{library.takeSelection}" reRender="output"/>
</rich:orderingList>
+ <rich:panel id="output" header="Current Selection">
+ <rich:dataList value="#{library.selectedSongsList}" var="song" rendered="#{not empty library.selectedSongsList}">
+ <h:outputText value="#{song.title}"></h:outputText>
+ </rich:dataList>
+ <h:outputText value="No Songs Selected" rendered="#{empty library.selectedSongsList}"/>
+ </rich:panel>
+ </h:panelGrid>
</h:form>
</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/templates/include/navigationPanelHeader.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/navigationPanelHeader.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/navigationPanelHeader.xhtml 2008-12-30 14:34:11 UTC (rev 12074)
@@ -0,0 +1,13 @@
+<ui:composition xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+ <table cellpadding="0" cellspacing="0" width="100%">
+ <tbody>
+ <tr valign="middle">
+ <td width="100%" valign="middle">
+ <h:outputText value="#{label}" style="font-family:Arial,Verdana,sans-serif; font-size:11px;"/>
+ </td>
+ <td align="right" valign="middle"><h:graphicImage value="/images/icons/ico_new_group.gif" rendered="#{isNew}"/></td>
+ </tr>
+ </tbody>
+ </table>
+</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-12-30 13:27:57 UTC (rev 12073)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-12-30 14:34:11 UTC (rev 12074)
@@ -55,8 +55,8 @@
</a4j:outputPanel>
<a4j:outputPanel styleClass="viewsourcelooklink" id="look">
- <rich:effect for="look" event="onclick" type="Fade" params="delay:0.0, duration:0.1" />
- <rich:effect for="look" event="onclick" type="BlindDown" targetId="source1" params="delay:0.1,duration:1.0,from:0.0,to:1.0" />
+ <rich:effect for="look" event="onclick" type="Fade" params="delay:0.0, duration:0.1" disableDefault="true"/>
+ <rich:effect for="look" event="onclick" type="BlindDown" targetId="source1" params="delay:0.1,duration:1.0,from:0.0,to:1.0"/>
<rich:effect for="look" event="onclick" type="Appear" targetId="source1" params="delay:0.1,duration:0.5,from:0.0,to:1.0" />
<rich:effect for="look" event="onclick" type="Appear" targetId="hide2" params="delay:1.5,duration:1.0,from:0.0,to:1.0" />
<h:outputText escape="false" value="#{empty openlabel?'View Source' : openlabel }" />
15 years, 11 months