JBoss Rich Faces SVN: r4197 - branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 12:04:20 -0500 (Thu, 22 Nov 2007)
New Revision: 4197
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
listShuttle functionality
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 17:02:42 UTC (rev 4196)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 17:04:20 UTC (rev 4197)
@@ -25,79 +25,78 @@
<f:clientId var="clientId"/>
<vcp:body>
<f:clientId var="clientId"/>
- <div id="#{clientId}" x:passThruWithExclusions="id">
- <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
- <input id="#{clientId}valueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
-
- <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="ol_body">
- <tbody>
- <tr>
- <td class="ol_caption">
- <f:call name="encodeSLCaption"/>
- </td>
- </tr>
- <tr>
- <td>
- <div id="#{clientId}headerBox" class="ol_list ol_outputlist">
- <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
- <table id="#{clientId}internal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
- <f:call name="encodeSLHeader"/>
- </table>
+ <div id="#{clientId}" style="display:inline;">
+ <div id="#{clientId}sourceList" x:passThruWithExclusions="id">
+ <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+ <input id="#{clientId}valueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
+
+ <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="ol_body">
+ <tbody>
+ <tr>
+ <td class="ol_caption">
+ <f:call name="encodeSLCaption"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="#{clientId}headerBox" class="ol_list ol_outputlist">
+ <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
+ <table id="#{clientId}internal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
+ <f:call name="encodeSLHeader"/>
+ </table>
+ </div>
+ <div id="#{clientId}contentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
+ <table id="#{clientId}internal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tbody">
+ <f:call name="encodeSLRows" />
+ </tbody>
+ </table>
+ </div>
</div>
- <div id="#{clientId}contentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
- <table id="#{clientId}internal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tbody">
- <f:call name="encodeSLRows" />
- </tbody>
- </table>
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <a id="#{clientId}sortLabel" href="#">Header</a>
- </div>
-
- <div id="#{clientId}" x:passThruWithExclusions="id">
- <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
- <input id="#{clientId}tlValueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
- <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="ol_body">
- <tbody>
- <tr>
- <td colspan="2" class="ol_caption">
- <f:call name="encodeTLCaption"/>
- </td>
- </tr>
- <tr>
- <td>
- <div id="#{clientId}tlHeaderBox" class="ol_list ol_outputlist">
- <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
- <table id="#{clientId}tlInternal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
- <f:call name="encodeTLHeader"/>
- </table>
+ <div id="#{clientId}targetList" x:passThruWithExclusions="id">
+ <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+ <input id="#{clientId}tlValueKeeper" type="hidden" name="#{clientId}" value="#{component.submittedString}"/>
+
+ <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="ol_body">
+ <tbody>
+ <tr>
+ <td colspan="2" class="ol_caption">
+ <f:call name="encodeTLCaption"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="#{clientId}tlHeaderBox" class="ol_list ol_outputlist">
+ <div class="ol_list_header" style="width: #{component.attributes['listWidth']}px;">
+ <table id="#{clientId}tlInternal_header_tab" class="ol_internal_header_tab rich-ordering-list-items" cellpadding="0" cellspacing="0">
+ <f:call name="encodeTLHeader"/>
+ </table>
+ </div>
+ <div id="#{clientId}tlContentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
+ <table id="#{clientId}tlInternal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tlTbody">
+ <f:call name="encodeTLRows" />
+ </tbody>
+ </table>
+ </div>
</div>
- <div id="#{clientId}tlContentBox" class="ol_list_content" style="width: #{component.attributes['listWidth']}px; height:#{component.attributes['listHeight']}px;">
- <table id="#{clientId}tlInternal_tab" class="ol_internal_tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tlTbody">
- <f:call name="encodeTLRows" />
- </tbody>
- </table>
+ </td>
+ <td class="ol_center_button_col_valign">
+ <div class="ol_button_layout">
+ <f:call name="encodeTLControlsFacets" />
</div>
- </div>
- </td>
- <td class="ol_center_button_col_valign">
- <div class="ol_button_layout">
- <f:call name="encodeTLControlsFacets" />
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <a id="#{clientId}sortLabel" href="#">Header</a>
-
- </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
</vcp:body>
<f:clientId var="cId"/>
<script type="text/javascript">
@@ -111,8 +110,8 @@
document.body.className = "body";
function init() {
var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
- var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
- new Richfaces.ListBase('#{cId}', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', '#{cId}tlValueKeeper', cotrolsIdPrefix, '#{cId}tlSortLabel', function() {#{component.attributes['onorderchanged']}}),
+ var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}targetList', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
+ new Richfaces.ListBase('#{cId}sourceList', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', '#{cId}tlValueKeeper', cotrolsIdPrefix, '#{cId}tlSortLabel', function() {#{component.attributes['onorderchanged']}}),
"#{cId}", cotrolsIdPrefix);
var sourceLayoutManager = new LayoutManager('#{cId}internal_header_tab', '#{cId}internal_tab');
var targetLayoutManager = new LayoutManager('#{cId}tlInternal_header_tab', '#{cId}tlInternal_tab');
18 years, 5 months
JBoss Rich Faces SVN: r4196 - in trunk/sandbox/samples: fileUploadPOC and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-22 12:02:42 -0500 (Thu, 22 Nov 2007)
New Revision: 4196
Added:
trunk/sandbox/samples/fileUploadPOC/
trunk/sandbox/samples/fileUploadPOC/pom.xml
trunk/sandbox/samples/fileUploadPOC/src/
trunk/sandbox/samples/fileUploadPOC/src/main/
trunk/sandbox/samples/fileUploadPOC/src/main/java/
trunk/sandbox/samples/fileUploadPOC/src/main/java/org/
trunk/sandbox/samples/fileUploadPOC/src/main/java/org/richfaces/
trunk/sandbox/samples/fileUploadPOC/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/fileUploadPOC/src/main/resources/
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/WEB-INF/
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/index.jsp
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/pages/
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/fileUploadPOC/src/main/webapp/pages/index.xhtml
trunk/sandbox/samples/fileUploadPOC/src/test/
trunk/sandbox/samples/fileUploadPOC/src/test/java/
trunk/sandbox/samples/fileUploadPOC/src/test/java/org/
trunk/sandbox/samples/fileUploadPOC/src/test/java/org/richfaces/
trunk/sandbox/samples/fileUploadPOC/src/test/java/org/richfaces/BeanTest.java
Modified:
trunk/sandbox/samples/pom.xml
Log:
New project: fileUploadPOC
Property changes on: trunk/sandbox/samples/fileUploadPOC
___________________________________________________________________
Name: svn:ignore
+ .settings
target
.classpath
.project
Added: trunk/sandbox/samples/fileUploadPOC/pom.xml
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/pom.xml (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/pom.xml 2007-11-22 17:02:42 UTC (rev 4196)
@@ -0,0 +1,16 @@
+<?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>fileUploadPOC</artifactId>
+ <packaging>war</packaging>
+ <name>fileUploadPOC Maven Webapp</name>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <finalName>fileUploadPOC</finalName>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/sandbox/samples/fileUploadPOC/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/src/main/java/org/richfaces/Bean.java (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/src/main/java/org/richfaces/Bean.java 2007-11-22 17:02:42 UTC (rev 4196)
@@ -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/fileUploadPOC/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/src/main/webapp/WEB-INF/faces-config.xml 2007-11-22 17:02:42 UTC (rev 4196)
@@ -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/fileUploadPOC/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/src/main/webapp/WEB-INF/web.xml 2007-11-22 17:02:42 UTC (rev 4196)
@@ -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/fileUploadPOC/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/src/main/webapp/index.jsp (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/src/main/webapp/index.jsp 2007-11-22 17:02:42 UTC (rev 4196)
@@ -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/fileUploadPOC/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/src/main/webapp/pages/index.jsp (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/src/main/webapp/pages/index.jsp 2007-11-22 17:02:42 UTC (rev 4196)
@@ -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/fileUploadPOC/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/src/main/webapp/pages/index.xhtml (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/src/main/webapp/pages/index.xhtml 2007-11-22 17:02:42 UTC (rev 4196)
@@ -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/fileUploadPOC/src/test/java/org/richfaces/BeanTest.java
===================================================================
--- trunk/sandbox/samples/fileUploadPOC/src/test/java/org/richfaces/BeanTest.java (rev 0)
+++ trunk/sandbox/samples/fileUploadPOC/src/test/java/org/richfaces/BeanTest.java 2007-11-22 17:02:42 UTC (rev 4196)
@@ -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 {
+
+ }
+}
Modified: trunk/sandbox/samples/pom.xml
===================================================================
--- trunk/sandbox/samples/pom.xml 2007-11-22 16:57:55 UTC (rev 4195)
+++ trunk/sandbox/samples/pom.xml 2007-11-22 17:02:42 UTC (rev 4196)
@@ -17,5 +17,6 @@
<module>simpleTogglePanel2-sample</module>
<module>columnsDemo</module>
<!--module>contextMenuDemo</module-->
+ <module>fileUploadPOC</module>
</modules>
</project>
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4195 - in branches/3.1.x/sandbox/ui/listShuttle/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 11:57:55 -0500 (Thu, 22 Nov 2007)
New Revision: 4195
Removed:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
listShuttle functionality
Deleted: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-22 16:53:38 UTC (rev 4194)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-22 16:57:55 UTC (rev 4195)
@@ -1,313 +0,0 @@
-if(!window.Richfaces) window.Richfaces = {};
-
-Richfaces.ListBase = Class.create();
-
-Richfaces.ListBase.compare = function(obj1, obj2) {
- return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
-}
-
-Richfaces.ListBase.prototype = {
- initialize : function(containerId, contentTableId, headerTableId, focusKeeperId, valueKeeperId,
- onclickControlId) {
- this.container = $(containerId);
- this.shuttleTable = $(contentTableId);
- this.valueKeeper = $(valueKeeperId);
- this.focusKeeper = $(focusKeeperId);
- this.focusKeeper.focused = false;
- this.setFocus();
- this.focusKeeper.observe("keydown", (function(e) {this.onkeydownHandler(window.event || e)}).bindAsEventListener(this));
- this.focusKeeper.observe("blur", function (e) {this.focusListener(e);}.bindAsEventListener(this));
-
- this.shuttleTbody = this.shuttleTable.tBodies[0];
-
- this.items = null;
- this.selectedItems = new Array();
- this.retrieveShuttleItems(containerId);
-
- this.shuttle = null;
- this.sortOrder = Shuttle.ASC;
-
- this.activeItem = null;
-
- this.onorderchanged = onorderchanged;
-
- this.shuttleTop = LayoutManager.getElemXY(this.shuttleTable).top;
-
- $(contentTableId).observe("click", function(e) {this.onclickHandler(window.event || e)}.bindAsEventListener(this));
- },
-
- retrieveShuttleItems : function(containerId) {
- var rows = this.shuttleTbody.rows;
- this.shuttleItems = new Array();
- var id;
-
- for (var i = 0; i < rows.length; i++) {
- var row = rows[i];
- id = row.id.split(containerId + ":")[1];
- this.shuttleItems[i]
- = new Richfaces.SelectItem(null, (id || i),
- ((Richfaces.SelectItems.isSelected(row)) ? true : false), row);
- if (Richfaces.SelectItems.isSelected(row)) {
- this.selectedItems.push(row);
- }
- if (Richfaces.SelectItems.isActive(row)) {
- this.activeItem = row;
- }
- }
- },
-
- getExtremeItem : function(position) { //FIXME
- var extremeItem = this.selectedItems[0];
- var currentItem;
-
- for (var i = 1; i < this.selectedItems.length; i++) {
- currentItem = this.selectedItems[i];
- if (position == "first") {
- if (currentItem.rowIndex < extremeItem.rowIndex) {
- extremeItem = currentItem;
- }
- } else {
- if (currentItem.rowIndex > extremeItem.rowIndex) {
- extremeItem = currentItem;
- }
- }
- }
- return extremeItem;
- },
-
- getEventTargetRow : function(event) {
- var activeElem;
- if (event.rangeParent) {
- //activeElem = event.rangeParent.parentNode;
- activeElem = event.target;
- } else {
- activeElem = event.srcElement;
- }
-
- if (activeElem == null) {
- return;
- }
-
- if (activeElem.tagName && Shuttle.CONTROL_SET.indexOf(activeElem.tagName) != -1) {
- return;
- }
-
- while (activeElem.tagName.toLowerCase() != "tr") {
- activeElem = activeElem.parentNode;
- if (!activeElem.tagName) {
- return; //for IE
- }
- }
-
- return activeElem;
- },
-
- onkeydownHandler : function(event) {
- var action = null;
- switch (event.keyCode) {
- 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';
- this.moveActiveItem(action, event);
- break;
- case 40 : //down arrow
- action = 'down';
- this.moveActiveItem(action, event);
- break;
- case 65 : // Ctrl + A
- if (event.ctrlKey) {
- this.selectAll();
- Shuttle.stopPropogation(event);
- }
- Richfaces.SelectItems.doActive(this.activeItem);
- this.saveState();
- break;
- case 32 : this.invertSelection(event); this.saveState(); break; //blank
- }
- },
-
- invertSelection : function(event) {
- var eventItem = this.activeItem;
- var eventShuttleItem = this.getSelectItemByNode(eventItem);
- if (eventShuttleItem._selected) {
- eventShuttleItem._selected = false;
- this.selectedItems.remove(eventShuttleItem);
- } else {
- eventShuttleItem._selected = true;
- this.selectedItems.push(eventShuttleItem);
- }
- },
-
- moveActiveItem : function(action, event) {
- var item = this.activeItem;
- var rows = this.shuttleTbody.rows;
- if ((action == 'up') && (item.rowIndex > 0)) {
- this.changeActiveItems(rows[item.rowIndex - 1], item);
- } else if ((action == 'down') && (item.rowIndex < this.shuttleItems.length - 1)) {
- this.changeActiveItems(rows[item.rowIndex + 1], item);
- }
-
- this.saveState();
- this.autoScrolling(action, event);
- this.controlListManager();
- },
-
- changeActiveItems : function(newItem, item) {
- var shuttleItem = this.getSelectItemByNode(item);
- var newShuttleItem = this.getSelectItemByNode(newItem);
-
- this.resetMarked();
-
- Richfaces.SelectItems.doActive(newItem);
- newItem._selected = true;
- this.activeItem = newItem;
- this.selectedItems.push(newItem);
- },
-
- selectAll : function() {
- var startIndex = 0;
- var endIndex = this.shuttleItems.length - 1;
- this.selectItemRange(startIndex, endIndex);
- },
-
- /**
- * Click handler
- */
- selectionItem : function(activeItem) {
- var markedItem = this.getSelectItemByNode(activeItem);
- var markedShuttleItem = activeItem;
-
- if (markedItem != null) {
- this.resetMarked();
- if (markedItem._selected) {
- markedItem._selected = false;
- } else {
- markedItem._selected = true;
- this.selectedItems[0] = markedShuttleItem;
- }
- }
- },
-
- /**
- * CTRL+Click handler
- */
- addSelectedItem : function(activeItem) {
- var markedItem = this.getSelectItemByNode(activeItem);
- var markedShuttleItem = activeItem;
-
- if (markedItem._selected) {
- this.selectedItems.remove(markedShuttleItem);
- markedItem._selected = false;
- } else {
- markedItem._selected = true;
- this.selectedItems.push(markedShuttleItem);
- }
-
- Richfaces.SelectItems.doSelect(this.activeItem);
-
- if (this.activeItem && !this.getSelectItemByNode(this.activeItem)._selected) {
- Richfaces.SelectItems.doNormal(this.activeItem);
- }
- },
-
- /**
- * Shift+Click handler
- */
- selectItemGroup : function(currentItem) {
- //FIXME
- var activeItemIndex = this.activeItem.rowIndex;
- var startIndex;
- var endIndex;
-
- if (currentItem.rowIndex > activeItemIndex) {
- startIndex = activeItemIndex;
- endIndex = currentItem.rowIndex;
- } else {
- startIndex = currentItem.rowIndex;
- endIndex = activeItemIndex;
- }
-
- this.resetMarked();
-
- this.selectItemRange(startIndex, endIndex);
- },
-
- selectItemRange : function(startIndex, endIndex) {
- var rows = this.shuttleTbody.rows;
- for (var i = startIndex; i <= endIndex; i++) {
- Richfaces.SelectItems.doSelect(rows[i]);
- this.selectedItems.push(rows[i]);
- this.getSelectItemByNode(rows[i])._selected = true;
- }
- },
-
- resetMarked : function() {
- var rows = this.shuttleTbody.rows;
- for (var i = 0; i < rows.length; i++) {
- var shuttleItem = rows[i];
- Richfaces.SelectItems.doNormal(shuttleItem);
- this.getSelectItemByNode(shuttleItem)._selected = false; //FIXME
- }
- this.selectedItems.length = 0;
- },
-
- getSelectItemByNode : function(selectItemNode) {
- for (var i = 0; i < this.shuttleItems.length; i++) {
- var item = this.shuttleItems[i];
- if (selectItemNode.rowIndex == item._node.rowIndex) {
- return item;
- }
- }
- return null;
- },
-
- autoScrolling : function(action, event) {
- this.selectedItems.sort(this.compareByRowIndex);
- var increment;
- var scrollTop = this.shuttleTable.parentNode.scrollTop;
- if (action == 'up' || action == 'first') {
- var targetItemTop = LayoutManager.getElemXY(this.selectedItems[0]).top;
- increment = (targetItemTop - scrollTop) - this.shuttleTop;
- if (increment < 0) {
- this.shuttleTable.parentNode.scrollTop += increment;
- }
- } else if (action == 'down' || action == 'last') {
- var item = this.selectedItems[this.selectedItems.length - 1];
- targetItemBottom = LayoutManager.getElemXY(this.selectedItems[this.selectedItems.length - 1]).top + item.offsetHeight;
- var increment = (targetItemBottom - scrollTop) - (this.shuttleTop + this.shuttleTable.parentNode.offsetHeight - LayoutManager.SCROLL_WIDTH);
- if (increment > 0) {
- this.shuttleTable.parentNode.scrollTop += increment;
- }
- }
- Event.stop(event);
- },
-
- setFocus : function() {
- this.focusKeeper.focus();
- this.focusKeeper.focused = true;
- if (this.isListActive()) {
- this.shuttleTable.className = Shuttle.ORDERING_LIST_CLASSES.active;
- }
- },
-
- focusListener : function(e) {
- e = e || window.event;
- this.focusKeeper.focusused = false;
- this.shuttleTable.className = Shuttle.ORDERING_LIST_CLASSES.normal;
- },
-
- compareByLabel : function(obj1, obj2) {
- obj1 = obj1._label;
- obj2 = obj2._label;
- return Richfaces.ListBase.compare(obj1, obj2);
- },
-
- compareByRowIndex : function(obj1, obj2) {
- obj1 = obj1.rowIndex;
- obj2 = obj2.rowIndex;
- return Richfaces.ListBase.compare(obj1, obj2);
- }
-}
-
-
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 16:53:38 UTC (rev 4194)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-11-22 16:57:55 UTC (rev 4195)
@@ -3,19 +3,22 @@
Richfaces.ListShuttle = Class.create();
Richfaces.ListShuttle.prototype = {
- initialize: function(listParams, controlIds) {
- this.targetList = Richfaces.ListBase.apply(Richfaces.ListBase.constructor(), listParams[1]);
- this.sourceList = Richfaces.OrderingList.apply(this, listParams[0]);
+ initialize: function(targetList, sourceList, clientId, controlIds) {
+ //this.targetList = Richfaces.ListBase.apply(Richfaces.ListBase.constructor(), listParams[1]);
+ //this.sourceList = Richfaces.OrderingList.apply(Richfaces.OrderingList.constructor(), listParams[0]);
- this.controlList = null;
+ this.targetList = targetList;
+ this.sourceList = sourceList;
+
+ this.controlList = new Array();
this.initControlList(controlIds);
},
initControlList : function(ids) {
for (var i = 0; i < ids.length; i++) {
var id = ids[i];
- var node = document.getElementById(containerId + id[0]);
- var disNode = document.getElementById(containerId + id[1]);
+ var node = document.getElementById(clientId + id[0]);
+ var disNode = document.getElementById(clientId + id[1]);
if (node && disNode) {
Shuttle.addClickListener(node, Richfaces.ListShuttle.HANDLERS[id[0]].bindAsEventListener(this));
this.controlList[i] = new Control(node, disNode, false, false, id[0]);
Modified: branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 16:53:38 UTC (rev 4194)
+++ branches/3.1.x/sandbox/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-11-22 16:57:55 UTC (rev 4195)
@@ -13,11 +13,12 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
+ scripts/extend.js,
scripts/SelectItem.js,
scripts/LayoutManager.js
scripts/Control.js,
+ scripts/ListBase.js,
scripts/OrderingList.js,
- scripts/ListBase.js,
scripts/ListShuttle.js
</h:scripts>
@@ -110,11 +111,12 @@
document.body.className = "body";
function init() {
var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
- var listShuttle = new Richfaces.ListShuttle([['#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}],
- ['#{cId}', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', '#{cId}tlValueKeeper', cotrolsIdPrefix, '#{cId}tlSortLabel', function() {#{component.attributes['onorderchanged']}}]]);
+ var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', '#{cId}valueKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
+ new Richfaces.ListBase('#{cId}', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', '#{cId}tlValueKeeper', cotrolsIdPrefix, '#{cId}tlSortLabel', function() {#{component.attributes['onorderchanged']}}),
+ "#{cId}", cotrolsIdPrefix);
var sourceLayoutManager = new LayoutManager('#{cId}internal_header_tab', '#{cId}internal_tab');
var targetLayoutManager = new LayoutManager('#{cId}tlInternal_header_tab', '#{cId}tlInternal_tab');
- layoutManager.widthSynchronization();
+ sourceLayoutManager.widthSynchronization();
targetLayoutManager.widthSynchronization();
}
//setTimeout(init, 0);
18 years, 5 months
JBoss Rich Faces SVN: r4194 - management/design/listShuttle/markup.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-11-22 11:53:38 -0500 (Thu, 22 Nov 2007)
New Revision: 4194
Modified:
management/design/listShuttle/markup/Shuttle.html
Log:
"destination list" is changed to "target list"
Modified: management/design/listShuttle/markup/Shuttle.html
===================================================================
--- management/design/listShuttle/markup/Shuttle.html 2007-11-22 16:52:57 UTC (rev 4193)
+++ management/design/listShuttle/markup/Shuttle.html 2007-11-22 16:53:38 UTC (rev 4194)
@@ -38,7 +38,7 @@
<div class="shuttle_label shuttle_out_label">Source List</div>
</td>
<td colspan="2" class="shuttle_header">
- <div class="shuttle_label shuttle_in_label">Destination List</div>
+ <div class="shuttle_label shuttle_in_label">Target List</div>
</td>
</tr>
<tr>
18 years, 5 months
JBoss Rich Faces SVN: r4192 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-22 11:02:53 -0500 (Thu, 22 Nov 2007)
New Revision: 4192
Added:
trunk/docs/userguide/en/src/main/resources/images/cursor.png
Log:
cursor
Added: trunk/docs/userguide/en/src/main/resources/images/cursor.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/cursor.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 5 months
JBoss Rich Faces SVN: r4191 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-22 11:02:38 -0500 (Thu, 22 Nov 2007)
New Revision: 4191
Added:
trunk/docs/userguide/en/src/main/resources/images/dataList4.png
trunk/docs/userguide/en/src/main/resources/images/datagrid2.png
trunk/docs/userguide/en/src/main/resources/images/datalist1.png
trunk/docs/userguide/en/src/main/resources/images/datalist2.png
trunk/docs/userguide/en/src/main/resources/images/datalist3.png
Removed:
trunk/docs/userguide/en/src/main/resources/images/datalist1.gif
trunk/docs/userguide/en/src/main/resources/images/datalist2.gif
Log:
http://jira.jboss.com/jira/browse/RF-657 - rewrote description.
Added: trunk/docs/userguide/en/src/main/resources/images/dataList4.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/dataList4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/datagrid2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/datagrid2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/docs/userguide/en/src/main/resources/images/datalist1.gif
===================================================================
(Binary files differ)
Added: trunk/docs/userguide/en/src/main/resources/images/datalist1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/datalist1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/docs/userguide/en/src/main/resources/images/datalist2.gif
===================================================================
(Binary files differ)
Added: trunk/docs/userguide/en/src/main/resources/images/datalist2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/datalist2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/datalist3.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/datalist3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 5 months
JBoss Rich Faces SVN: r4190 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-22 11:02:12 -0500 (Thu, 22 Nov 2007)
New Revision: 4190
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
Log:
http://jira.jboss.com/jira/browse/RF-657 - rewrote description.
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-11-22 15:49:48 UTC (rev 4189)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-11-22 16:02:12 UTC (rev 4190)
@@ -85,10 +85,10 @@
</emphasis> facets for output</listitem>
<listitem>Limit number of output elements (<emphasis>
<property>"elements"</property>
- </emphasis> attribute) and define first element (<emphasis>
+ </emphasis> attribute) and define first element for output (<emphasis>
<property>"first"</property>
</emphasis> attribute)</listitem>
- <listitem>Bind list pages with <emphasis role="bold">
+ <listitem>Bind pages with <emphasis role="bold">
<property><rich:datascroller></property>
</emphasis> component</listitem>
</itemizedlist>
@@ -131,7 +131,7 @@
<title>Component usage</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datagrid2.gif"/>
+ <imagedata fileref="images/datagrid2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -140,25 +140,29 @@
<property><a4j:repeat></property>
</emphasis> component and as a result it could be partially updated with Ajax. <emphasis>
<property>"ajaxKeys"</property>
- </emphasis> attribute allows to define strings that are updated after an Ajax request.</para>
+ </emphasis> attribute allows to define elements that are updated after an Ajax request.</para>
<para>Here is an example:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:dataGrid value="#{bean.capitals}" var="caps" ajaxKeys="#{listBean.list}"
- binding="#{listBean.dataList}" id="grid" elements="20" columns="4">
- <h:graphicImage value="#{cap.stateFlag}"/>
- <h:outputText value="#{cap.name}"/>
- <h:outputText value="#{cap.state}"/>
- <h:outputText value="#{cap.timeZone}"/>
+ <rich:dataGrid value="#{dataTableScrollerBean.allCars}" var="car" ajaxKeys="#{listBean.list}"
+ binding="#{listBean.dataGrid}" id="grid" elements="4" columns="2">
+ <h:outputText value="#{car.make} #{car.model}"></h:outputText>
</rich:dataGrid>
...
<a4j:commandButton action"#{listBean.action}" reRender="grid" value="Submit"/>
...
]]></programlisting>
+ <para> In the example <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute contains value of <emphasis>
+ <property>"id"</property>
+ </emphasis> attribute for <emphasis role="bold">
+ <property><rich:dataGrid></property>
+ </emphasis> component. As a result the component are updated after an Ajax request.</para>
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2007-11-22 15:49:48 UTC (rev 4189)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2007-11-22 16:02:12 UTC (rev 4190)
@@ -10,10 +10,10 @@
<para>The component for unordered lists rendering that allows choosing data from a model
and obtains built-in support of Ajax updates.</para>
<figure>
- <title>DataList component</title>
+ <title>dataList component</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datalist1.gif"/>
+ <imagedata fileref="images/datalist1.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2007-11-22 15:49:48 UTC (rev 4189)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2007-11-22 16:02:12 UTC (rev 4190)
@@ -1,184 +1,246 @@
<?xml version='1.0' encoding='UTF-8'?>
<section>
-<sectioninfo>
-<keywordset>
-<keyword>grid</keyword>
-<keyword>rich:dataList</keyword>
-<keyword>HtmlDataList</keyword>
-<keyword>unordered list</keyword>
-</keywordset>
-</sectioninfo>
-
- <table>
- <title>Component identification parameters </title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Value</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>component-type</entry>
- <entry>org.richfaces.DataList</entry>
- </row>
- <row>
- <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlDataList</entry>
- </row>
- <row>
+ <sectioninfo>
+ <keywordset>
+ <keyword>grid</keyword>
+ <keyword>rich:dataList</keyword>
+ <keyword>HtmlDataList</keyword>
+ <keyword>unordered list</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters </title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.richfaces.DataList</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.richfaces.component.html.HtmlDataList</entry>
+ </row>
+ <row>
<entry>component-family</entry>
<entry>org.richfaces.DataList</entry>
- </row>
- <row>
+ </row>
+ <row>
<entry>renderer-type</entry>
<entry>org.richfaces.DataListRenderer</entry>
- </row>
- <row>
- <entry>tag-class</entry>
- <entry>org.richfaces.taglib.DataListTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.DataListTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<section>
<title>Creating the Component with a Page Tag</title>
- <para>To create the simplest variant of <property>dataList</property> on a page, use the following syntax:</para>
+ <para>To create the simplest variant of <property>dataList</property> on a page, use the
+ following syntax:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:dataList value="#{bean.capitals}" var="caps">
- <h:outputText value="#{caps.name}"/>
+ <rich:dataList var="car" value="#{dataTableScrollerBean.allCars}" >
+ <h:outputText value="#{cars.name}"/>
</rich:dataList>
...
]]></programlisting>
</section>
<section>
- <title>Creating the Component Dynamically Using Java</title>
+ <title>Creating the Component Dynamically Using Java</title>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDataList;
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDataList;
...
HtmlDataList myList = new HtmlDataList();
...
]]></programlisting>
-</section>
-<section>
-<title>Details of Usage</title>
-<para>The component takes a list from a model and outputs it as an ordered list. The component also has
-similar to ordinary UIData components output ways:</para>
-<itemizedlist>
-<listitem>A header and footer output</listitem>
-<listitem>Limitation of the output elements (the <emphasis ><property>"elements"</property></emphasis> attribute) and definition of the first
- element</listitem>
- <listitem>Binding to scrolling components of list pages</listitem>
- </itemizedlist>
- <para>The component has the <emphasis ><property>"type"</property></emphasis> attribute corresponding to the <emphasis><property>"ul"</property></emphasis> HTML element.</para>
- <para>The component is created basing on the <emphasis role="bold"><property><a4j:repeat></property></emphasis> component and as a result the component could
- be partially updated with AJAX.</para>
+ </section>
+ <section>
+ <title>Details of Usage</title>
+ <para>The <emphasis role="bold">
+ <property><rich:dataList></property>
+ </emphasis> component allows to generate a list from a model.</para>
+ <para>The component has the <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute, which corresponds to the <emphasis>
+ <property>"type"</property>
+ </emphasis> parameter for the <emphasis>
+ <property>"ul"</property>
+ </emphasis> HTML element and defines a marker type. Possible values for <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute are: <property>"disc"</property>,
+ <property>"circle"</property>,
+ <property>"square"</property>.</para>
+ <para>Here is an example:</para>
+ <programlisting role="XML"><![CDATA[...
+ <h:form>
+ <rich:dataList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="disc">
+ <h:outputText value="#{car.make} #{car.model}"/><br/>
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.price} " /><br/>
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.mileage} " /><br/>
+ </rich:dataList>
+</h:form>
+...
+]]></programlisting>
+
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Component usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/datalist2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the example the <emphasis>
+ <property>"rows"</property>
+ </emphasis> attribute limits number of output elements of the list.</para>
+
+ <para><emphasis>
+ <property>"first"</property>
+ </emphasis> attribute defines first element for output. <emphasis>
+ <property>"title"</property>
+ </emphasis> are used for popup title. See picture below:</para>
+
+ <figure>
+ <title>Component usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/datalist4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The component is created basing on the <emphasis role="bold">
+ <property><a4j:repeat></property>
+ </emphasis> component and as a result it could be partially updated with Ajax. <emphasis>
+ <property>"ajaxKeys"</property>
+ </emphasis> attribute allows to define elements that are updated after an Ajax request.</para>
+ <para>Here is an example:</para>
+
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
- <rich:dataList value="#{bean.capitals}" var="caps" ajaxKeys="#{listBean.list}"
- binding="#{listBean.dataList}" id="list">
- <h:outputText value="#{caps.name}"/>
- </rich:dataList>
+ <programlisting role="XML"><![CDATA[...
+ <rich:dataList value="#{dataTableScrollerBean.allCars}" var="car" ajaxKeys="#{listBean.list}"
+ binding="#{listBean.dataList}" id="list" rows="5" type="disc">
+ <h:outputText value="#{car.make} #{car.model}"></h:outputText>
+ </rich:dataGrid>
...
- <a4j:commandButton action"#{listBean.action}" reRender="list" value="Submit">
+ <a4j:commandButton action"#{listBean.action}" reRender="list" value="Submit"/>
...
]]></programlisting>
-<para>Here during the action is processed the ajaxKeys set is composed into a list and then update
- specified for the whole table actually happens only for the chosen set of rows.</para>
- </section>
- <section>
- <title>Look-and-Feel Customization</title>
-
- <para>For skinnability implementation, the components use a <emphasis>
- <property>style class redefinition method.</property>
- </emphasis> Default style classes are mapped on <emphasis>
- <property>skin parameters.</property>
- </emphasis></para>
-
- <para>There are two ways to redefine the appearance of all <emphasis role="bold">
- <property><rich:dataList></property>
- </emphasis> components at once:</para>
-
- <itemizedlist>
- <listitem>
- <para>Redefine the corresponding skin parameters</para>
- </listitem>
-
- <listitem>
- <para>Add to your style sheets <emphasis>
- <property>style classes</property>
- </emphasis> used by a <emphasis role="bold">
- <property><rich:dataList></property>
- </emphasis> component</para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Definition of Custom Style Classes</title>
-
- <para>On the screenshot there are classes names that define styles for component elements.</para>
-
- <figure>
- <title>Style classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/datalist2.gif"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <table>
- <title>Classes names that define a list appearance</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-datalist</entry>
- <entry>Defines styles for an html <ul> element</entry>
- </row>
- <row>
- <entry>rich-list-item</entry>
- <entry>Defines styles for an html <li> element</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
-
- <para>In order to redefine styles for all <emphasis role="bold">
- <property><rich:dataList></property>
- </emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define necessary properties in them.</para>
-
- <para>To change styles of particular <emphasis role="bold">
- <property><rich:dataList></property>
- </emphasis> components, define your own style classes in the corresponding <emphasis
- role="bold">
- <property><rich:dataList></property>
- </emphasis>attributes.</para>
- </section>
+
+ <para> In the example <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute contains value of <emphasis>
+ <property>"id"</property>
+ </emphasis> attribute for <emphasis role="bold">
+ <property><rich:dataList></property>
+ </emphasis> component. As a result the component are updated after an Ajax request.</para>
+ </section>
<section>
+
+ <title>Look-and-Feel Customization</title>
+
+ <para>For skinnability implementation, the components use a <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
+ <property>skin parameters.</property>
+ </emphasis></para>
+
+ <para>There are two ways to redefine the appearance of all <emphasis role="bold">
+ <property><rich:dataList></property>
+ </emphasis> components at once:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin parameters</para>
+ </listitem>
+
+ <listitem>
+ <para>Add to your style sheets <emphasis>
+ <property>style classes</property>
+ </emphasis> used by a <emphasis role="bold">
+ <property><rich:dataList></property>
+ </emphasis> component</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
+
+ <figure>
+ <title>Style classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/datalist3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <table>
+ <title>Classes names that define a list appearance</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-datalist</entry>
+ <entry>Defines styles for an html <ul> element</entry>
+ </row>
+ <row>
+ <entry>rich-list-item</entry>
+ <entry>Defines styles for an html <li> element</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:dataList></property>
+ </emphasis> components on a page using CSS, it's enough to create classes with the
+ same names and define necessary properties in them.</para>
+
+ <para>To change styles of particular <emphasis role="bold">
+ <property><rich:dataList></property>
+ </emphasis> components, define your own style classes in the corresponding <emphasis
+ role="bold">
+ <property><rich:dataList></property>
+ </emphasis>attributes.</para>
+ </section>
+ <section>
<title>Relevant Resources Links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataLists.jsf?c=dataList"
- >Here</ulink> you can see the example of <emphasis role="bold"
- ><property><rich:dataList></property></emphasis> usage and sources for the given example. </para>
- </section>
+ >Here</ulink> you can see the example of <emphasis role="bold">
+ <property><rich:dataList></property>
+ </emphasis> usage and sources for the given example. </para>
+ </section>
</section>
-
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4189 - in trunk/ui/panelbar/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-22 10:49:48 -0500 (Thu, 22 Nov 2007)
New Revision: 4189
Modified:
trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
Log:
change behavior of onitemchange,onenter, onleave events
Modified: trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java
===================================================================
--- trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java 2007-11-22 15:32:14 UTC (rev 4188)
+++ trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java 2007-11-22 15:49:48 UTC (rev 4189)
@@ -36,6 +36,7 @@
import org.ajax4jsf.javascript.AjaxScript;
import org.ajax4jsf.javascript.ImageCacheScript;
import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.PrototypeScript;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
@@ -128,18 +129,38 @@
protected List getScriptPanelBarItems(FacesContext context,UIPanelBar panelBar){
List items = new ArrayList();
JSReference id_ref = new JSReference("id");
- JSReference onenter = new JSReference("onenter");
- JSReference onleave = new JSReference("onleave");
List children = panelBar.getChildren();
for (Iterator iterator = children.iterator(); iterator.hasNext();) {
UIComponent child = (UIComponent) iterator.next();
+
if(child instanceof UIPanelBarItem){
+
Map item = new HashMap();
UIPanelBarItem panelBarItem = (UIPanelBarItem) child;
item.put(id_ref, panelBarItem.getClientId(context));
- item.put(onenter, panelBarItem.getAttributes().get("onenter"));
- item.put(onleave, panelBarItem.getAttributes().get("onleave"));
+
+ Object enterScript = panelBarItem.getAttributes().get("onenter");
+ Object leaveScript = panelBarItem.getAttributes().get("onleave");
+
+ if (enterScript != null && !enterScript.equals("")) {
+ JSFunctionDefinition onenter = new JSFunctionDefinition();
+ onenter.addParameter("event");
+ onenter.addToBody(enterScript);
+ item.put("onenter", onenter);
+ } else {
+ item.put("onenter", "");
+ }
+
+ if (leaveScript != null && !leaveScript.equals("")) {
+ JSFunctionDefinition onleave = new JSFunctionDefinition();
+ onleave.addParameter("event");
+ onleave.addToBody(leaveScript);
+ item.put("onleave", onleave);
+ } else {
+ item.put("onleave", "");
+ }
+
items.add(item);
}
}
@@ -155,7 +176,19 @@
List items = getScriptPanelBarItems(context, panelBar);
ScriptOptions options = new ScriptOptions(component);
- options.addOption("onitemchange",panelBar.getAttributes().get("onitemchange"));
+
+
+ Object changeScript = panelBar.getAttributes().get("onitemchange");
+
+ if (changeScript != null && !changeScript.equals("")) {
+ JSFunctionDefinition function = new JSFunctionDefinition();
+ function.addParameter("event");
+ function.addToBody(changeScript);
+ options.addOption("onitemchange",function);
+ } else {
+ options.addOption("onitemchange","");
+ }
+
options.addOption("onclick", panelBar.getAttributes().get("onclick"));
options.addOption("mouseouver", panelBar.getAttributes().get("mouseouver"));
options.addOption("mouseout", panelBar.getAttributes().get("mouseout"));
Modified: trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
===================================================================
--- trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2007-11-22 15:32:14 UTC (rev 4188)
+++ trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2007-11-22 15:49:48 UTC (rev 4189)
@@ -105,51 +105,6 @@
this.firstLoad = false;
},
- onItemChange: function(event,slide){
- var onitemchange = this.onitemchange;
- var changeEvent = event;
- var leaveItem_id = this.current.item.id;
- var enterItem_id = slide.item.id;
- var panel_id = this.panel.id;
-
- if (onitemchange && onitemchange != "") {
- var func = new Function("event","panel_id","leaveItem_id","enterItem_id",onitemchange);
- var result = func(changeEvent,panel_id,leaveItem_id,enterItem_id);
- if (result != undefined && !result) {
- return;
- }
- }
-
- var items = this.items;
- var leaveItem;
- var enterItem;
-
- for (var i = 0; i < items.length; i++) {
- if (leaveItem_id == items[i].id) {
- leaveItem = items[i];
- }
- if (enterItem_id == items[i].id) {
- enterItem = items[i];
- }
- }
-
- if (leaveItem && leaveItem.onleave) {
- var func = new Function("event","leaveItem_id","enterItem_id",leaveItem.onleave);
- var result = func(changeEvent,leaveItem_id,enterItem_id);
- if (result != undefined && !result) {
- return;
- }
- }
-
- if (enterItem && enterItem.onenter) {
- var func = new Function("event","leaveItem_id","enterItem_id",enterItem.onenter);
- var result = func(changeEvent,leaveItem_id,enterItem_id);
- if (result != undefined && !result) {
- return;
- }
- }
- },
-
_attachBehaviors: function() {
var rows=this._getDirectChildrenByTag(this.panel,'DIV');
for(var i=0; i<rows.length; i++) {
@@ -178,8 +133,44 @@
if (this.slides[i].item.id==value) return i;
}
return 0;
- }
+ },
+
+ invokeEvent: function(eventName, event, value, element, eventFunction) {
+ var result;
+ if (eventFunction) {
+
+ var eventObj;
+ if (event)
+ {
+ eventObj = event;
+ }
+ else if( document.createEventObject )
+ {
+ eventObj = document.createEventObject();
+ }
+ else if( document.createEvent )
+ {
+ eventObj = document.createEvent('Events');
+ eventObj.initEvent( eventName, true, false );
+ }
+
+ eventObj.rich = {component:this};
+ eventObj.rich.value = value;
+
+ try
+ {
+ result = eventFunction.call(element, eventObj);
+ }
+ catch (e) { LOG.warn("Exception: "+e.Message + "\n[on"+eventName + "]"); }
+
+ }
+
+ if (result!=false) result = true;
+
+ return result;
+ }
+
}
Richfaces.PanelBar.Slide = Class.create();
@@ -251,9 +242,28 @@
if (this.content.style.display=="block") return;
//this.header.style.display="none";
//this.header_act.style.display="";
- this.slidePanel.onItemChange(event,this);
- this.slidePanel.showSlide(this);
+ var enterElement = this.item;
+ var leaveElement = this.slidePanel.current.item;
+ var enterItem = this.slidePanel.items[this.index];
+ var leaveItem;
+ var items = this.slidePanel.items;
+
+ for (var i = 0; i < items.length; i++) {
+ if (this.slidePanel.items[i].id == leaveElement.id) {
+ leaveItem = this.slidePanel.items[i];
+ }
+ }
+
+ var ret;
+ ret = this.slidePanel.invokeEvent("enter",event,enterItem,enterElement,enterItem.onenter);
+ ret = this.slidePanel.invokeEvent("leave",event,leaveItem,leaveElement,leaveItem.onleave);
+ ret = this.slidePanel.invokeEvent("change",event,this.slidePanel,this.slidePanel.panel,this.slidePanel.onitemchange);
+
+ if (ret) {
+ this.slidePanel.showSlide(this);
+ }
+
this.slidePanel.panel.style.maxHeight="";
this.slidePanel.panel.style.minHeight="";
},
18 years, 5 months
JBoss Rich Faces SVN: r4188 - in branches/3.1.x/ui/panelmenu/src/main: java/org/richfaces/renderkit/html and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-22 10:32:14 -0500 (Thu, 22 Nov 2007)
New Revision: 4188
Modified:
branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java
branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
Panel menu: fixed custom style class for selected element.
Modified: branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java 2007-11-22 15:22:58 UTC (rev 4187)
+++ branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java 2007-11-22 15:32:14 UTC (rev 4188)
@@ -7,8 +7,8 @@
public static final String COMPONENT_TYPE = "org.richfaces.panelMenu";
public static final String DEFAULT_SELECTED_CLASS = "dr-pmenu-selected-item";
- public static final String USER_DEFINED_SELECTED_CLASS = "rich-pmenu-item-selected";
-
+ public static final String USER_DEFINED_SELECTED_CLASS = "rich-pmenu-selected-element";
+
public abstract String getEvent();
public abstract void setEvent(String event);
public abstract String getMode();
@@ -113,4 +113,5 @@
public String getSelectedName(){
return getValue() != null ? getValue().toString() : getSelectedChild();
}
+
}
Modified: branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-22 15:22:58 UTC (rev 4187)
+++ branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-22 15:32:14 UTC (rev 4188)
@@ -196,6 +196,18 @@
}
return styleBuffer.toString();
}
+
+ public String getSelectedClass(FacesContext context, UIComponent component) {
+ if (isSelected(context, component)) {
+ StringBuffer selectedClass = null;
+ selectedClass= new StringBuffer();
+ selectedClass.append(UIPanelMenu.DEFAULT_SELECTED_CLASS).
+ append(" ").
+ append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
+ return selectedClass.toString();
+ }
+ return "";
+ }
public String getLabelClass(FacesContext context, UIComponent component) {
StringBuffer resClass = new StringBuffer();
@@ -208,9 +220,6 @@
resClass.append("rich-pmenu-item-label");
}
}
- if (isSelected(context, component)) {
- resClass.append(" ").append(UIPanelMenu.DEFAULT_SELECTED_CLASS).append(" ").append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
- }
return resClass.toString();
}
Modified: branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-11-22 15:22:58 UTC (rev 4187)
+++ branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-11-22 15:32:14 UTC (rev 4188)
@@ -17,7 +17,7 @@
this.lastExpanded = null;
this.selectedChild = selectedChild;
this.defaultSelectedClass = 'dr-pmenu-selected-item';
- this.userDefinedSelectedClass = 'dr-pmenu-selected-item';
+ this.userDefinedSelectedClass = 'rich-pmenu-selected-element';
this.is = 'panelMenu';
this.selectedNameInput = $(myId + 'selectedItemName');
PanelMenuStorage[myId] = this;
@@ -80,6 +80,7 @@
this.labelArea = $('icon' + ids.myId);
this.content = document.getElementsByClassName("dr-pmenu-group-self-label", this.obj)[0];
this.iconAlign = iconAlign;
+ this.mainRow = $("row_" + ids.myId);
/*
if (level == 0){
this.tdhider.style.display = "";
@@ -314,12 +315,12 @@
setSelectedClass: function(e){
- this.labelArea.addClassName(this.rootMenu.defaultSelectedClass);
- this.labelArea.addClassName(this.rootMenu.userDefinedSelectedClass);
+ this.mainRow.addClassName(this.rootMenu.defaultSelectedClass);
+ this.mainRow.addClassName(this.rootMenu.userDefinedSelectedClass);
},
removeSelectedClass: function(e){
- this.labelArea.removeClassName(this.rootMenu.defaultSelectedClass);
- this.labelArea.removeClassName(this.rootMenu.userDefinedSelectedClass);
+ this.mainRow.removeClassName(this.rootMenu.defaultSelectedClass);
+ this.mainRow.removeClassName(this.rootMenu.userDefinedSelectedClass);
},
Modified: branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-11-22 15:22:58 UTC (rev 4187)
+++ branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-11-22 15:32:14 UTC (rev 4188)
@@ -27,7 +27,8 @@
<f:call name="utils.encodePassThru" />
- <tr class="#{this:getSelectedClass( context, component )}">
+ <tr id="row_#{clientId}"
+ class="#{this:getSelectedClass( context, component )}" >
<td class="dr-pmenu-nowrap #{this:getIconClass( context, component,'left')}">
<f:call name="insertSpacerImages" />
<f:call name="insertImage">
Modified: branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-11-22 15:22:58 UTC (rev 4187)
+++ branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-11-22 15:32:14 UTC (rev 4188)
@@ -23,7 +23,8 @@
<f:parameter value="onclick,onmousedown,onmouseup,onmousemove" />
</f:call>
- <tr>
+ <tr id="row_#{clientId}"
+ class="#{this:getSelectedClass( context, component )}" >
<f:call name="utils.encodeId"/>
<td class="dr-pmenu-nowrap #{this:getIconClass( context, component,'left')}">
<f:call name="insertSpacerImages" />
18 years, 5 months