JBoss Rich Faces SVN: r3866 - in trunk/sandbox/samples: contextMenuDemo and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-09 10:33:46 -0500 (Fri, 09 Nov 2007)
New Revision: 3866
Added:
trunk/sandbox/samples/contextMenuDemo/
trunk/sandbox/samples/contextMenuDemo/pom.xml
trunk/sandbox/samples/contextMenuDemo/src/
trunk/sandbox/samples/contextMenuDemo/src/main/
trunk/sandbox/samples/contextMenuDemo/src/main/java/
trunk/sandbox/samples/contextMenuDemo/src/main/java/org/
trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/
trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/contextMenuDemo/src/main/resources/
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/index.jsp
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.xhtml
trunk/sandbox/samples/contextMenuDemo/src/test/
trunk/sandbox/samples/contextMenuDemo/src/test/java/
trunk/sandbox/samples/contextMenuDemo/src/test/java/org/
trunk/sandbox/samples/contextMenuDemo/src/test/java/org/richfaces/
trunk/sandbox/samples/contextMenuDemo/src/test/java/org/richfaces/BeanTest.java
Log:
New demo: contextMenuDemo
Property changes on: trunk/sandbox/samples/contextMenuDemo
___________________________________________________________________
Name: svn:ignore
+ target
Added: trunk/sandbox/samples/contextMenuDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/pom.xml (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/pom.xml 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>contextMenuDemo</artifactId>
+ <packaging>war</packaging>
+ <name>contextMenuDemo Maven Webapp</name>
+ <version>3.2.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>skins</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>contextMenuDemo</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+}
\ No newline at end of file
Added: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/faces-config.xml 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Added: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/WEB-INF/web.xml 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/index.jsp (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/index.jsp 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/pages/index.jsf" />
+ </body>
+
+</html>
\ No newline at end of file
Added: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Added: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.xhtml (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.xhtml 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Added: trunk/sandbox/samples/contextMenuDemo/src/test/java/org/richfaces/BeanTest.java
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/test/java/org/richfaces/BeanTest.java (rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/test/java/org/richfaces/BeanTest.java 2007-11-09 15:33:46 UTC (rev 3866)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
18 years, 6 months
JBoss Rich Faces SVN: r3865 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-09 10:12:42 -0500 (Fri, 09 Nov 2007)
New Revision: 3865
Modified:
trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
Log:
RF-1184 - add Keyboard usage, facets and attributes to Details of Usage
Modified: trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2007-11-09 15:11:03 UTC (rev 3864)
+++ trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2007-11-09 15:12:42 UTC (rev 3865)
@@ -14,11 +14,11 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:orderingList value=”#{bean.list}” var=”list”>
- <rich:column>
- <h:outputText value=”#{list.text}”>
- </rich:column>
- <rich:orderingList>
+<rich:orderingList value=”#{bean.list}” var=”list”>
+ <rich:column>
+ <h:outputText value=”#{list.text}”>
+ </rich:column>
+<rich:orderingList>
...
]]></programlisting>
</section>
@@ -35,67 +35,170 @@
]]></programlisting>
</section>
<section>
- <title>Details of Usage</title>
- <para>The <property>orderingList</property> component consists of <property>
- <emphasis>Item list</emphasis></property> element,
- which displays a list of items. It has three different representations
- for a single element:
- <itemizedlist>
- <listitem>common</listitem>
- <listitem>selected</listitem>
- <listitem>active</listitem>
- </itemizedlist>
- Combination of these states is possible
+ <title>Details of Usage</title>
+ <!--maintenance of component orderingList-->
+ <para>The <emphasis role="bold">
+ <property><rich:orderingList></property>
+ </emphasis> component consists of <property>
+ <emphasis>Item list</emphasis>
+ </property> element that displays a list of items. It has three different
+ representations for a single element: <itemizedlist>
+ <listitem>common</listitem>
+ <listitem>selected</listitem>
+ <listitem>active</listitem>
+ </itemizedlist> Combination of these states is possible </para>
+ <para> The <emphasis role="bold">
+ <property><rich:orderingList></property>
+ </emphasis> component provides to use <emphasis>
+ <property>"optionalCaption"</property>
+ </emphasis> facet.</para>
+ <para>It's possible to define <property>
+ <emphasis>"optionalHeader"</emphasis>
+ </property> facet. It has two possible types of representation: <itemizedlist>
+ <listitem>sortable</listitem>
+ <listitem>non-sortable</listitem>
+ </itemizedlist>
</para>
-
- <para>
- The
- <property><rich:orderingList></property> component provides to use
- <property>caption</property> facet defined with an end developer.
+ <para> Also you can use<property>
+ <emphasis>"optionalFooter"</emphasis>
+ </property> facet is an optional element.</para>
+
+ <!-- add simple and screenshot-->
+
+ <para>The <emphasis role="bold">
+ <property><rich:orderingList></property>
+ </emphasis> component provides the possibility to use <property>
+ <emphasis>"ordering controls set"</emphasis>
+ </property>, which performs reordering. Every control has possibility to be disabled.
+ The <emphasis role="bold">
+ <property><rich:orderingList></property>
+ </emphasis> component has a possibility to hide any of the controls by pairs:<itemizedlist>
+ <listitem>"Up" and "Down"</listitem>
+ <listitem>"Top" and "Bottom"</listitem>
+ </itemizedlist>
</para>
-
- <para>It's possible to define
- <property><emphasis>"header"</emphasis>
- </property> facet. It has two possible
- types of representation: <itemizedlist>
- <listitem>sortable</listitem>
- <listitem>non-sortable</listitem>
- </itemizedlist>
- </para>
-
- <para>
- <property>
- IAlso you can use<property><emphasis>"footer"</emphasis></property>/ facet
- </property> is an optional element defined with an end developer
- </para>
-
- <para>The <property><rich:orderingList></property> component provides the possibility to use
- <property>
- <emphasis>"ordering controls set"</emphasis></property>, which performs reordering. Every control has possibility
- to be disabled. All controls are disabled when the whole component is disabled. The
- component has a possibility to hide any of the controls by pairs <itemizedlist>
- <listitem>"Up" and "Down"</listitem>
- <listitem>"Top" and "Bottom"</listitem>
- </itemizedlist>
- </para>
-
+ <para> "topControl", "topControlDisabled",
+ "bottomControl", "bottomControlDisabled",
+ "upControl", "upControlDisabled",
+ "downControl", "downControlDisabled" facets are used
+ to replaces the default control with facets content. </para>
+
+ <!-- attributes of component orderingList -->
+
<para> The <property>
<emphasis>"value"</emphasis>
</property> and <property>
<emphasis>"var"</emphasis>
</property> attributes are used to access the values of a list. Example of page
definition: <programlisting role="XML"><![CDATA[...
- <rich:orderingList value=”#{bean.list}” var=”list”>
- <f:facet name=header><h:outputText value=”Header1”/></f:facet>
- <rich:column>
- <h:outputText value=”#{list.text}”>
- </rich:column>
- <rich:orderingList>
+<rich:orderingList value=”#{bean.list}” var=”list”>
+ <f:facet name=header><h:outputText value=”Header1”/></f:facet>
+ <rich:column>
+ <h:outputText value=”#{list.text}”>
+ </rich:column>
+<rich:orderingList>
...]]>
</programlisting>
</para>
+
+ <para>The <property>
+ <emphasis>"selection "</emphasis>
+ </property> attribute is bound to a list, which stores a set of indexes for rows
+ selected. If the index from a set is out of bounds, it should be ignored. </para>
+ <para>Controls rendering is based on the <property>
+ <emphasis>"controlsType"</emphasis>
+ </property> attribute. Possible types are <itemizedlist>
+ <listitem>button</listitem>
+ <listitem>link</listitem>
+ <listitem>none</listitem>
+ </itemizedlist></para>
</section>
+
+<para>Keyboard usage</para>
+ <table>
+ <title>Keyboard usage for elements selection TO DO</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Keys and combinations </entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <!--Sorting API -->
+ <row>
+ <entry>CTRL+click</entry>
+ <entry>Described in selection behaviour requirement</entry>
+ </row>
+ <row>
+ <entry>SHIFT+click</entry>
+ <entry>Described in selection behaviour requirement</entry>
+ </row>
+ <row>
+ <entry>CTRL+A</entry>
+ <entry>Selects all elements inside the list if some active element is
+ already present in a list</entry>
+ </row>
+ <row>
+ <entry>Space</entry>
+ <entry>Inverts selection on the active element</entry>
+ </row>
+ <row>
+ <entry>Up, Down arrows</entry>
+ <entry>Changes the active elements to the next or previous in a list</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <table>
+ <title>Keyboard usage for elements reordering</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Keys and combinations </entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <!--Sorting API -->
+ <row>
+ <entry>Top</entry>
+ <entry>Moves selected set to the top of a list</entry>
+ </row>
+ <row>
+ <entry>Bottom</entry>
+ <entry>Moves selected set to the bottomof a list</entry>
+ </row>
+ <row>
+ <entry>CTRL+Up arrow</entry>
+ <entry>Moves selected item to one position uppert</entry>
+ </row>
+ <row>
+ <entry>CTRL+Down arrow</entry>
+ <entry>Moves selected item to one position lower</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>All the changes uses the same rules that defined in requirement for ordering with
+ controls.</para>
+
<section>
+ <title>Drag-and-Drop support in the list</title>
+ <para> It's possible to drag items and drop to the position needed. </para>
+ <para>In this case component <emphasis role="bold">
+ <property><rich:orderingList></property>
+ </emphasis> provides <property>
+ <emphasis>"dragIndicator"</emphasis>
+ </property> attribute. </para>
+
+ <!-- add an example!!! -->
+
+ </section>
+ <section>
<title>JavaScript API</title>
<para> Controls are accessible for developer on client-side using controls attribute of
JavaScript component instance. The value of the attribute is an associative array of
@@ -199,6 +302,7 @@
</tgroup>
</table>
</section>
+
<section>
<title>Look-and-Feel Customization</title>
<para>For skinnability implementation, the components use a <emphasis>
18 years, 6 months
JBoss Rich Faces SVN: r3864 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-09 10:11:03 -0500 (Fri, 09 Nov 2007)
New Revision: 3864
Modified:
trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml
Log:
RF-1184 - add item "Drag-and-Drop" to Key Features
Modified: trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml 2007-11-09 14:15:50 UTC (rev 3863)
+++ trunk/docs/userguide/en/src/main/docbook/included/orderingList.desc.xml 2007-11-09 15:11:03 UTC (rev 3864)
@@ -20,7 +20,8 @@
<listitem>Skinnable <property>ordering list</property> and child items</listitem>
<listitem>Customizable component layout (captions, headers, list items and ordering control set)</listitem>
<listitem>Disabled/enabled ordering controls</listitem>
- <listitem>Multiple selection in the <property>ordering list</property></listitem>
+ <listitem>Multiple selection in the <property>ordering list</property></listitem>
+ <listitem>Drag-and-drop support</listitem>
<listitem>Possibility to manage selection from
<itemizedlist>
<listitem>Keyboard</listitem>
18 years, 6 months
JBoss Rich Faces SVN: r3863 - in trunk/sandbox: samples/orderingListDemo/src/main/webapp/pages and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-09 09:15:50 -0500 (Fri, 09 Nov 2007)
New Revision: 3863
Modified:
trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java
trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp
trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml
Log:
Custom events added to the ordering list demo.
Modified: trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java
===================================================================
--- trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java 2007-11-09 14:12:39 UTC (rev 3862)
+++ trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java 2007-11-09 14:15:50 UTC (rev 3863)
@@ -15,6 +15,9 @@
private String controlsVerticalAlign = "center";
private String headerLabel = "headerLabel";
+ private String ontopclick;
+ private String onbottomclick;
+
private boolean orderControlsVisible = true;
private boolean fastOrderControlsVisible = true;
@@ -84,4 +87,20 @@
return FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("actionResult");
}
+ public String getOntopclick() {
+ return ontopclick;
+ }
+
+ public void setOntopclick(String ontopclick) {
+ this.ontopclick = ontopclick;
+ }
+
+ public String getOnbottomclick() {
+ return onbottomclick;
+ }
+
+ public void setOnbottomclick(String onbottomclick) {
+ this.onbottomclick = onbottomclick;
+ }
+
}
Modified: trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-11-09 14:12:39 UTC (rev 3862)
+++ trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-11-09 14:15:50 UTC (rev 3863)
@@ -33,7 +33,14 @@
controlsHorizontalAlign="#{demoBean.controlsHorizontalAlign}"
controlsVerticalAlign="#{demoBean.controlsVerticalAlign}"
orderControlsVisible="#{demoBean.orderControlsVisible}"
- fastOrderControlsVisible="#{demoBean.fastOrderControlsVisible}" >
+ fastOrderControlsVisible="#{demoBean.fastOrderControlsVisible}"
+
+ ontopclick="#{demoBean.ontopclick}"
+ onbottomclick="#{demoBean.onbottomclick}"
+ onorderchanged="alert('onorderchanged');"
+ ondownclick="alert('ondownclick');"
+ onheaderclick="alert('onheaderclick');"
+ onupclick="alert('onupclick');" >
<h:column>
<f:facet name="header">
@@ -108,8 +115,18 @@
<a4j:support event="onchange" reRender="orderingList1" />
</h:selectOneRadio>
+ <h:outputText value="ontopclick JavaScript" />
+ <h:inputText value="#{demoBean.ontopclick}" >
+ <a4j:support event="onchange" reRender="orderingList1" />
+ </h:inputText>
+
+ <h:outputText value="onbottomclick JavaScript" />
+ <h:inputText value="#{demoBean.onbottomclick}" >
+ <a4j:support event="onchange" reRender="orderingList1" />
+ </h:inputText>
+
<h:commandButton value="Submit" />
- <h:commandButton value="Submit immediate" immediate="true" />
+ <h:commandButton value="Submit immediate" immediate="true" />
</h:panelGrid>
</h:panelGroup>
<h:panelGroup>
Modified: trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-09 14:12:39 UTC (rev 3862)
+++ trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-09 14:15:50 UTC (rev 3863)
@@ -146,7 +146,50 @@
<name>validator</name>
<classname>javax.faces.el.MethodBinding</classname>
<methodargs>javax.faces.event.ValueChangeEvent</methodargs>
- </property>
+ </property>
+
+ <property>
+ <name>onorderchanged</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ontopclick</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onupclick</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ondownclick</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onbottomclick</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onheaderclick</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
</component>
<listener>
18 years, 6 months
JBoss Rich Faces SVN: r3862 - management/design/orderingList.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-11-09 09:12:39 -0500 (Fri, 09 Nov 2007)
New Revision: 3862
Modified:
management/design/orderingList/FuncSpec - orderingList.doc
Log:
Modified: management/design/orderingList/FuncSpec - orderingList.doc
===================================================================
(Binary files differ)
18 years, 6 months
JBoss Rich Faces SVN: r3861 - trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-09 09:08:14 -0500 (Fri, 09 Nov 2007)
New Revision: 3861
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
scrolling was corrected
Modified: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-09 13:45:58 UTC (rev 3860)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-09 14:08:14 UTC (rev 3861)
@@ -69,19 +69,19 @@
Shuttle.setFocus(focusKeeperId);
var upControl = document.getElementById(upControlId);
var downControl = document.getElementById(downControlId);
- var topControl = document.getElementById(lastControlId);
+ var topControl = document.getElementById(firstControlId);
var bottomControl = document.getElementById(lastControlId);
if (upControl) {
- upControl.onclick = function() {obj.moveSelectedItems('up');return false;};
+ upControl.onclick = function(e) {obj.moveSelectedItems('up', e);return false;};
}
if (downControl) {
- downControl.onclick = function() {obj.moveSelectedItems('last');return false;};
+ downControl.onclick = function(e) {obj.moveSelectedItems('down', e);return false;};
}
if (topControl) {
- topControl.onclick = function() {obj.moveSelectedItems('first');return false;};
+ topControl.onclick = function(e) {obj.moveSelectedItems('first', e);return false;};
}
if (bottomControl) {
- bottomControl.onclick = function() {obj.moveSelectedItems('last');return false;};
+ bottomControl.onclick = function(e) {obj.moveSelectedItems('last', e);return false;};
}
document.getElementById(contentTableId).onclick = function(e) {obj.onclickHandler(window.event || e);};
this.shuttleTop = LayoutManager.getElemXY(this.shuttleTable).top;
@@ -135,6 +135,7 @@
}
Shuttle.prototype.moveSelectedItems = function(action, event) {
+ event = window.event||event;
var rows = this.shuttleTbody.rows;
var item;
if (this.selectedItems.length > 0) {
@@ -173,6 +174,8 @@
for (var i = 0; i < rows.length; i++) {
this.shuttleItems.push(rows[i].item);
}
+ if (action != null)
+ this.autoScrolling(action, event);
this.saveState();
}
}
@@ -245,22 +248,22 @@
Shuttle.prototype.onkeydownHandler = function(event) {
var action = null;
switch (event.keyCode) {
- case 34 : action = 'last'; this.moveSelectedItems(action); break; //page down
- case 33 : action = 'first'; this.moveSelectedItems(action); break; //page up
+ case 34 : action = 'last'; this.moveSelectedItems(action ,event); break; //page down
+ case 33 : action = 'first'; this.moveSelectedItems(action, event); break; //page up
case 38 : //up arrow
action = 'up';
if (event.ctrlKey) {
- this.moveSelectedItems(action);
+ this.moveSelectedItems(action, event);
} else {
- this.moveActiveItem(action);
+ this.moveActiveItem(action, event);
}
break;
case 40 : //down arrow
action = 'down';
if (event.ctrlKey) {
- this.moveSelectedItems(action);
+ this.moveSelectedItems(action ,event);
} else {
- this.moveActiveItem(action);
+ this.moveActiveItem(action, event);
}
break;
case 65 : // Ctrl + A
@@ -271,11 +274,10 @@
this.activeItem.className = Shuttle.ACTIVE_ITEM_CLASS;
this.saveState();
break;
- case 32 : this.invertSelection(event); break; //blank
+ case 32 : this.invertSelection(event); this.saveState(); break; //blank
}
- if (action != null)
- this.autoScrolling(action, event);
- this.saveState();
+ //if (action != null)
+ // this.autoScrolling(action, event);
}
Shuttle.stopPropogation = function(event) {
@@ -300,7 +302,7 @@
}
}
-Shuttle.prototype.moveActiveItem = function(action) {
+Shuttle.prototype.moveActiveItem = function(action, event) {
var item = this.activeItem;
var rows = this.shuttleTbody.rows;
if ((action == 'up') && (item.rowIndex > 0)) {
@@ -308,6 +310,9 @@
} else if ((action == 'down') && (item.rowIndex < this.shuttleItems.length - 1)) {
this.changeActiveItems(rows[item.rowIndex + 1], item);
}
+
+ this.saveState();
+ this.autoScrolling(action, event);
}
Shuttle.prototype.changeActiveItems = function(newItem, item) {
18 years, 6 months
JBoss Rich Faces SVN: r3859 - branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-09 08:38:12 -0500 (Fri, 09 Nov 2007)
New Revision: 3859
Modified:
branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-1318
Modified: branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-11-09 13:36:35 UTC (rev 3858)
+++ branches/3.1.x/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-11-09 13:38:12 UTC (rev 3859)
@@ -202,7 +202,7 @@
String styleClasses = "";
if (context.getRowKey() != null) {
- styleClasses = "dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren";
+ styleClasses = "dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-children rich-tree-node-cildren";
if (!context.isLast() && showLines) styleClasses += " dr-tree-h-ic-line";
}
if (styleClasses!="") getUtils().writeAttribute(writer, "class", styleClasses);
18 years, 6 months
JBoss Rich Faces SVN: r3858 - branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-09 08:36:35 -0500 (Fri, 09 Nov 2007)
New Revision: 3858
Modified:
branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1320
Modified: branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx
===================================================================
--- branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx 2007-11-09 13:24:39 UTC (rev 3857)
+++ branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx 2007-11-09 13:36:35 UTC (rev 3858)
@@ -18,7 +18,8 @@
type="#{component.attributes['type']}"
x:passThruWithExclusions="value,name,onclick,type,href,id"
onclick="#{this:getOnClick(context,component)}"
- href="#"
+ href="#"
+ class="#{component.attributes['styleClass']}"
>
#{this:getValue(component)}
<vcp:body>
18 years, 6 months
JBoss Rich Faces SVN: r3857 - trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-09 08:24:39 -0500 (Fri, 09 Nov 2007)
New Revision: 3857
Modified:
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
Log:
custom events was added
Modified: trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-09 13:09:33 UTC (rev 3856)
+++ trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-09 13:24:39 UTC (rev 3857)
@@ -47,6 +47,18 @@
private final static String ATTRIBUTE_CONTROLS_TYPE = "controlsType";
+ private final static String ATTRIBUTE_CE_ONORDERCHANGED = "onorderchanged";
+
+ private final static String ATTRIBUTE_CE_ONTOPCLICK = "ontopclick";
+
+ private final static String ATTRIBUTE_CE_ONDOWNCLICK = "ondownclick";
+
+ private final static String ATTRIBUTE_CE_ONUPCLICK = "onupclick";
+
+ private final static String ATTRIBUTE_CE_ONBOTTOMCLICK = "onbottomclick";
+
+ private final static String ATTRIBUTE_CE_ONHEADERCLICK = "onheaderclick";
+
private final static String CONTROL_ID_UP = "_up";
private final static String CONTROL_ID_DOWN = "_down";
@@ -68,10 +80,12 @@
private String idSuffix;
+ private String customEvent;
+
public abstract boolean isRendered(FacesContext context, UIOrderingList list);
public ControlsHelper(String name, String text, String imageURI,
- String facetName, String styleClassName, String idSuffix) {
+ String facetName, String styleClassName, String idSuffix, String customEvent) {
super();
this.name = name;
this.text = text;
@@ -79,6 +93,7 @@
this.facetName = facetName;
this.styleClassName = styleClassName;
this.idSuffix = idSuffix;
+ this.customEvent = customEvent;
}
public String getName() {
@@ -108,7 +123,7 @@
protected static final ControlsHelper[] HELPERS = new ControlsHelper[] {
new ControlsHelper("top", "↟", OrderingListIconTop.class.getName(), FACET_TOP,
- "rich-ordering-control-top", CONTROL_ID_TOP) {
+ "rich-ordering-control-top", CONTROL_ID_TOP, ATTRIBUTE_CE_ONTOPCLICK) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isFastOrderControlsVisible();
@@ -116,7 +131,7 @@
},
new ControlsHelper("up", "↑", OrderingListIconUp.class.getName(), FACET_UP,
- "rich-ordering-control-up", CONTROL_ID_UP) {
+ "rich-ordering-control-up", CONTROL_ID_UP, ATTRIBUTE_CE_ONUPCLICK) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isOrderControlsVisible();
@@ -124,7 +139,7 @@
},
new ControlsHelper("down", "↡", OrderingListIconDown.class.getName(), FACET_DOWN,
- "rich-ordering-control-down", CONTROL_ID_DOWN) {
+ "rich-ordering-control-down", CONTROL_ID_DOWN, ATTRIBUTE_CE_ONDOWNCLICK) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isFastOrderControlsVisible();
@@ -132,7 +147,7 @@
},
new ControlsHelper("botton", "↓", OrderingListIconBottom.class.getName(), FACET_BOTTOM,
- "rich-ordering-control-bottom", CONTROL_ID_BOTTOM) {
+ "rich-ordering-control-bottom", CONTROL_ID_BOTTOM, ATTRIBUTE_CE_ONBOTTOMCLICK) {
public boolean isRendered(FacesContext context, UIOrderingList list) {
return list.isOrderControlsVisible();
@@ -180,7 +195,7 @@
writer.startElement("tr", orderingList);
encodeStyleClass(writer, null, "dr-table-subheader rich-table-subheader", null, headerClass);
- encodeHeaderFacets(context, writer, headers, "ol_col rich-table-subheadercell", headerClass, "header", "th");
+ encodeHeaderFacets(context, writer, headers, "ol_col rich-table-subheadercell", headerClass, "header", "th", orderingList);
writer.endElement("tr");
}
@@ -206,8 +221,11 @@
UIComponent facet = orderingList.getFacet(helper.getFacetName());
boolean isButton = false;
boolean useFacet = (facet != null && facet.isRendered());
+ Map attributes = orderingList.getAttributes();
- String controlType = (String) orderingList.getAttributes().get(ATTRIBUTE_CONTROLS_TYPE);
+ String controlType = (String) attributes.get(ATTRIBUTE_CONTROLS_TYPE);
+ String customEvent = (String) attributes.get(helper.customEvent);
+
String htmlElem = null;
if (CONTROL_TYPE_BUTTON.equals(controlType)) {
isButton = true;
@@ -229,6 +247,9 @@
writer.startElement(htmlElem, orderingList);
writer.writeAttribute(HTML.id_ATTRIBUTE, clientId + helper.getIdSuffix(), null);
writer.writeAttribute(HTML.class_ATTRIBUTE, helper.getStyleClassName(), null);
+ if (customEvent != null) {
+ writer.writeAttribute(HTML.onclick_ATTRIBUTE, customEvent, null);
+ }
}
if (useFacet) {
@@ -259,7 +280,7 @@
protected void encodeHeaderFacets(FacesContext context, ResponseWriter writer,
Iterator headers, String skinCellClass,
- String headerClass, String facetName, String element)
+ String headerClass, String facetName, String element, UIOrderingList orderingList)
throws IOException {
while (headers.hasNext()) {
UIComponent column = (UIComponent) headers.next();
@@ -274,6 +295,10 @@
getUtils().encodeAttribute(context, column, "colspan");
writer.startElement("div", column);
writer.writeAttribute("style", "overflow:hidden;white-space: nowrap;", null);
+ String onHeaderClickEvent = (String) orderingList.getAttributes().get(ATTRIBUTE_CE_ONHEADERCLICK);
+ if (onHeaderClickEvent != null) {
+ writer.writeAttribute(HTML.onclick_ATTRIBUTE, onHeaderClickEvent, null);
+ }
UIComponent facet = column.getFacet(facetName);
if (facet != null) {
18 years, 6 months