JBoss Rich Faces SVN: r2845 - in trunk/samples/richfaces-demo/src/main: webapp/WEB-INF and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-09-10 13:32:50 -0400 (Mon, 10 Sep 2007)
New Revision: 2845
Removed:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/IdentifierTreeNode.java
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
Log:
DnD Tree sample reverted
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java 2007-09-10 17:32:50 UTC (rev 2845)
@@ -6,7 +6,7 @@
import org.richfaces.model.TreeNode;
-public class Album implements IdentifierTreeNode {
+public class Album implements TreeNode {
/**
*
*/
@@ -23,9 +23,9 @@
public void addSong(Song song) {
addChild(Long.toString(song.getId()), song);
+ song.setParent(this);
}
public void addChild(Object identifier, TreeNode child) {
- child.setParent(this);
songs.put(identifier, child);
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java 2007-09-10 17:32:50 UTC (rev 2845)
@@ -6,7 +6,7 @@
import org.richfaces.model.TreeNode;
-public class Artist implements IdentifierTreeNode {
+public class Artist implements TreeNode {
private long id;
private Map albums = new HashMap();
private String name;
@@ -24,10 +24,10 @@
public void addAlbum(Album album) {
addChild(Long.toString(album.getId()), album);
+ album.setParent(this);
}
public void addChild(Object identifier, TreeNode child) {
- child.setParent(this);
albums.put(identifier, child);
}
Deleted: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/IdentifierTreeNode.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/IdentifierTreeNode.java 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/IdentifierTreeNode.java 2007-09-10 17:32:50 UTC (rev 2845)
@@ -1,28 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * 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.demo.tree;
-
-import org.richfaces.model.TreeNode;
-
-public interface IdentifierTreeNode extends TreeNode {
- public long getId();
-}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2007-09-10 17:32:50 UTC (rev 2845)
@@ -3,19 +3,11 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
-import javax.faces.FacesException;
-
-import org.richfaces.component.UITree;
-import org.richfaces.component.UITreeNode;
-import org.richfaces.event.DropEvent;
-import org.richfaces.model.ListRowKey;
import org.richfaces.model.TreeNode;
public class Library implements TreeNode {
@@ -38,8 +30,8 @@
}
public void addChild(Object identifier, TreeNode child) {
- child.setParent(this);
getArtists().put(identifier, child);
+ child.setParent(this);
}
public TreeNode getChild(Object id) {
@@ -152,36 +144,4 @@
this.state2 = state2;
}
- public void processDrop(DropEvent event) {
- ListRowKey srcKey = (ListRowKey) event.getDragValue();
- ListRowKey destKey = (ListRowKey) event.getDropValue();
-
- UITree tree = ((UITreeNode) event.getComponent()).getUITree();
-
- TreeNode destNode = tree.getTreeNode(destKey);
- TreeNode srcNode = tree.getTreeNode(srcKey);
-
- try {
- tree.queueNodeCollapse(srcKey);
- tree.queueNodeExpand(destKey);
- } catch (IOException e) {
- throw new FacesException(e.getMessage(), e);
- }
-
- String srcNodeKey = String.valueOf(((IdentifierTreeNode) srcNode).getId());
- srcNode.getParent().removeChild(srcNodeKey);
- destNode.addChild(srcNodeKey, srcNode);
-
- List list = new ArrayList();
- //this is to get row key segments for the parent node of source node
- //candidate for inclusion to UITree API
- for (Iterator iterator = srcKey.iterator(); iterator.hasNext();) {
- Object object = (Object) iterator.next();
- if (iterator.hasNext()) {
- list.add(object);
- }
- }
- tree.addRequestKey(new ListRowKey(list));
- tree.addRequestKey(destKey);
- }
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2007-09-10 17:32:50 UTC (rev 2845)
@@ -5,7 +5,7 @@
import org.richfaces.model.TreeNode;
-public class Song implements IdentifierTreeNode {
+public class Song implements TreeNode {
/**
*
*/
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-09-10 17:32:50 UTC (rev 2845)
@@ -165,20 +165,10 @@
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
- <managed-bean-name>libraryAjaxTree</managed-bean-name>
+ <managed-bean-name>library</managed-bean-name>
<managed-bean-class>org.richfaces.demo.tree.Library</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
- <managed-bean>
- <managed-bean-name>libraryClientTree</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tree.Library</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>libraryServerTree</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tree.Library</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
<managed-bean>
<managed-bean-name>dndBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.dnd.DndBean</managed-bean-class>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml 2007-09-10 17:32:50 UTC (rev 2845)
@@ -7,19 +7,15 @@
<p>This tree uses "ajax" switch type, note that for collapse/expand operations it will be Ajax request to the server. You may see short delay in this case.</p>
<h:form>
- <rich:tree dragIndicator=":treeDragIndicator" dropListener="#{libraryAjaxTree.processDrop}" style="width:300px" value="#{libraryAjaxTree.data}" var="item" nodeFace="#{item.type}">
- <rich:treeNode type="artist" acceptedTypes="album" iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
+ <rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
+ <rich:treeNode type="artist" iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
<h:outputText value="#{item.name}" />
</rich:treeNode>
- <rich:treeNode type="album" dragType="album" acceptedTypes="song" iconLeaf="/images/tree/cd.gif" icon="/images/tree/cd.gif">
+ <rich:treeNode type="album" iconLeaf="/images/tree/cd.gif" icon="/images/tree/cd.gif">
<h:outputText value="#{item.title}" />
-
- <rich:dndParam name="label" type="drag" value="Album: #{item.title}" />
</rich:treeNode>
- <rich:treeNode type="song" dragType="song" iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
+ <rich:treeNode type="song" iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
<h:outputText value="#{item.title}" />
-
- <rich:dndParam name="label" type="drag" value="Song: #{item.title}" />
</rich:treeNode>
</rich:tree>
</h:form>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml 2007-09-10 17:32:50 UTC (rev 2845)
@@ -7,19 +7,15 @@
<p>This is exactly the same tree, but now it uses "client" switch type. Note, that all nodes actually rendered up-front and expand/collapse now do not requre server call</p>
<h:form>
- <rich:tree switchType="client" style="width:300px" dragIndicator=":treeDragIndicator" dropListener="#{libraryClientTree.processDrop}" value="#{libraryClientTree.data}" var="item" nodeFace="#{item.type}">
- <rich:treeNode type="artist" acceptedTypes="album" iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
+ <rich:tree switchType="client" style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
+ <rich:treeNode type="artist" iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
<h:outputText value="#{item.name}" />
</rich:treeNode>
- <rich:treeNode type="album" dragType="album" acceptedTypes="song" iconLeaf="/images/tree/cd.gif" icon="/images/tree/cd.gif">
+ <rich:treeNode type="album" iconLeaf="/images/tree/cd.gif" icon="/images/tree/cd.gif">
<h:outputText value="#{item.title}" />
-
- <rich:dndParam name="label" type="drag" value="Album: #{item.title}" />
</rich:treeNode>
- <rich:treeNode type="song" dragType="song" iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
+ <rich:treeNode type="song" iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
<h:outputText value="#{item.title}" />
-
- <rich:dndParam name="label" type="drag" value="Song: #{item.title}" />
</rich:treeNode>
</rich:tree>
</h:form>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml 2007-09-10 17:32:50 UTC (rev 2845)
@@ -7,19 +7,15 @@
<p>This is again same tree, but now it uses "server" switch type. Full page content will be reloaded at every click.</p>
<h:form>
- <rich:tree switchType="server" style="width:300px" dragIndicator=":treeDragIndicator" dropListener="#{libraryServerTree.processDrop}" value="#{libraryServerTree.data}" var="item" nodeFace="#{item.type}">
- <rich:treeNode type="artist" acceptedTypes="album" iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
+ <rich:tree switchType="server" style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
+ <rich:treeNode type="artist" iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
<h:outputText value="#{item.name}" />
</rich:treeNode>
- <rich:treeNode type="album" dragType="album" acceptedTypes="song" iconLeaf="/images/tree/cd.gif" icon="/images/tree/cd.gif">
+ <rich:treeNode type="album" iconLeaf="/images/tree/cd.gif" icon="/images/tree/cd.gif">
<h:outputText value="#{item.title}" />
-
- <rich:dndParam name="label" type="drag" value="Album: #{item.title}" />
</rich:treeNode>
- <rich:treeNode type="song" dragType="song" iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
+ <rich:treeNode type="song" iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
<h:outputText value="#{item.title}" />
-
- <rich:dndParam name="label" type="drag" value="Song: #{item.title}" />
</rich:treeNode>
</rich:tree>
</h:form>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2007-09-10 16:58:18 UTC (rev 2844)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2007-09-10 17:32:50 UTC (rev 2845)
@@ -7,8 +7,6 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <rich:dragIndicator id="treeDragIndicator" />
-
<p>
Tree is a component that renders a tree control on the page.<br/>
The most important tree features are:
18 years, 8 months
JBoss Rich Faces SVN: r2844 - trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-09-10 12:58:18 -0400 (Mon, 10 Sep 2007)
New Revision: 2844
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java
Log:
http://jira.jboss.com/jira/browse/RF-867
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java 2007-09-10 16:53:17 UTC (rev 2843)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java 2007-09-10 16:58:18 UTC (rev 2844)
@@ -2304,6 +2304,7 @@
*/
public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException
{ // do nothing
+ m_prefixMap.popNamespace(prefix);
}
/**
18 years, 8 months
JBoss Rich Faces SVN: r2843 - in trunk/ui/scrollableDataTable/src: test/java/org/richfaces/renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-09-10 12:53:17 -0400 (Mon, 10 Sep 2007)
New Revision: 2843
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java
Log:
http://jira.jboss.com/jira/browse/RF-874
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2007-09-10 16:27:16 UTC (rev 2842)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2007-09-10 16:53:17 UTC (rev 2843)
@@ -62,7 +62,7 @@
body.setHeight(bodyHeight);
body.moveTo(0, headerHeight);
body.updateLayout();
- bodyBottom = body.getY() + body.contentBox.getY() + body.scrollBox.getHeight();
+ bodyBottom = body.getY() + body.contentBox.getY() + body.scrollBox.getViewportHeight();
}
if(this.panels[GridLayout_Enum.FOOTER]) {
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java 2007-09-10 16:27:16 UTC (rev 2842)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java 2007-09-10 16:53:17 UTC (rev 2843)
@@ -1,5 +1,6 @@
package org.richfaces.renderkit.html;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -113,6 +114,11 @@
}
}
+ static final Set tagNames = new HashSet();
+ static final String [] names = {"input","div","script"};
+ static {
+ Collections.addAll(tagNames, names);
+ }
public void testRenderingFrozenNormalColumns()throws Exception{
@@ -151,7 +157,7 @@
HtmlElement elem = (HtmlElement) childIter.next();
assertNotNull(elem);
- boolean res = (elem.getNodeName().equals("div") || elem.getNodeName().equals("input"));
+ boolean res = tagNames.contains(elem.getNodeName().toLowerCase());
assertTrue(res);
if(elem.getNodeName().equals("div")){
18 years, 8 months
JBoss Rich Faces SVN: r2842 - trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-09-10 12:27:16 -0400 (Mon, 10 Sep 2007)
New Revision: 2842
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
Log:
Fix bug http://jira.jboss.com/jira/browse/RF-878
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-09-10 16:22:53 UTC (rev 2841)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-09-10 16:27:16 UTC (rev 2842)
@@ -360,12 +360,13 @@
setFakeColumnWidth: function() {
var columns = this.grid.getHeader().getColumns();
- columns.last().bodyCol.width = 1;
+ var bodyCell = columns.last().bodyCol;
+ if(bodyCell) bodyCell.width = 1;
var width = this.grid.getElement().offsetWidth - this.fTable.offsetWidth - this.nTable.offsetWidth;
if (width < 1) {
width = 1;
}
- columns.last().bodyCol.width = width;
+ if(bodyCell) bodyCell.width = width;
},
startLoadData: function() {
@@ -784,7 +785,11 @@
_calcDefaultRowHeight: function() {
//var templNormal = this.templNormal.getElement();
- return this.templNormal.getElement().rows[1].offsetTop;//Math.ceil(templNormal.offsetHeight / templNormal.rows.length);
+ // var height = Math.ceil(templNormal.offsetHeight / templNormal.rows.length);
+ var height = (this.templNormal && this.templNormal.getElement() &&
+ this.templNormal.getElement().rows &&
+ this.templNormal.getElement().rows.length>1) ? this.templNormal.getElement().rows[1].offsetTop : 16;
+ return height;
}
});
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-09-10 16:22:53 UTC (rev 2841)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-09-10 16:27:16 UTC (rev 2842)
@@ -427,10 +427,12 @@
}
}
*/
+ var rows = this.grid.getBody().templFrozen.getElement().rows;
+ var startRow = rows && rows.length>0 ? this.grid.getBody()._getRowIndex(rows[0].id) : 0;
this.grid.eventOnSort.fire({
column: index,
/*order: dir,*/
- startRow: this.grid.getBody()._getRowIndex(this.grid.getBody().templFrozen.getElement().rows[0].id),
+ startRow: startRow,
index: this.grid.getBody().currRange.start
});
Event.stop(event);
18 years, 8 months
JBoss Rich Faces SVN: r2841 - trunk/ui/core/src/test/java/org/ajax4jsf/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-09-10 12:22:53 -0400 (Mon, 10 Sep 2007)
New Revision: 2841
Modified:
trunk/ui/core/src/test/java/org/ajax4jsf/component/LoadBundleComponentTest.java
Log:
Added Junit tests for some function in class ResourceBundleMap.
Modified: trunk/ui/core/src/test/java/org/ajax4jsf/component/LoadBundleComponentTest.java
===================================================================
--- trunk/ui/core/src/test/java/org/ajax4jsf/component/LoadBundleComponentTest.java 2007-09-10 16:00:41 UTC (rev 2840)
+++ trunk/ui/core/src/test/java/org/ajax4jsf/component/LoadBundleComponentTest.java 2007-09-10 16:22:53 UTC (rev 2841)
@@ -21,6 +21,7 @@
package org.ajax4jsf.component;
+import java.util.HashMap;
import java.util.Map;
import javax.faces.component.UIForm;
@@ -93,4 +94,51 @@
assertFalse(loadedMap.containsKey("non-existent key"));
}
+
+ public void testFakeFunctions() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ Map loadedMap = (Map)facesContext.getExternalContext().getRequestMap().get(BUNDLE_NAME);
+ assertNotNull(loadedMap);
+
+ assertFalse(loadedMap.isEmpty());
+
+ assertFalse(loadedMap.containsValue(null));
+ assertFalse(loadedMap.containsValue("any-string"));
+
+ try {
+ loadedMap.put("key1", "value1");
+ assertFalse(true);
+ } catch (UnsupportedOperationException e) {
+
+ }
+
+ try {
+ loadedMap.putAll(new HashMap());
+ assertFalse(true);
+ } catch (UnsupportedOperationException e) {
+
+ }
+
+ try {
+ loadedMap.remove("key1");
+ assertFalse(true);
+ } catch (UnsupportedOperationException e) {
+
+ }
+
+ try {
+ loadedMap.clear();
+ assertFalse(true);
+ } catch (UnsupportedOperationException e) {
+
+ }
+
+ assertNull(loadedMap.keySet());
+
+ assertNull(loadedMap.values());
+
+ assertNull(loadedMap.entrySet());
+ }
}
18 years, 8 months
JBoss Rich Faces SVN: r2840 - in trunk: framework/api/src/main/java/org/ajax4jsf/component and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-09-10 12:00:41 -0400 (Mon, 10 Sep 2007)
New Revision: 2840
Modified:
trunk/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
trunk/ui/tabPanel/src/test/java/org/richfaces/component/UITabTest.java
trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-862
Modified: trunk/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent 2007-09-10 15:37:40 UTC (rev 2839)
+++ trunk/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent 2007-09-10 16:00:41 UTC (rev 2840)
@@ -62,6 +62,11 @@
<classname>java.lang.String</classname>
<description>JavaScript code for call after request completed on client side</description>
</property>
+ <property>
+ <name>onbeforedomupdate</name>
+ <classname>java.lang.String</classname>
+ <description>JavaScript code for call before DOM has been updated on client side</description>
+ </property>
<property >
<name>focus</name>
<classname>java.lang.String</classname>
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java 2007-09-10 15:37:40 UTC (rev 2839)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java 2007-09-10 16:00:41 UTC (rev 2840)
@@ -83,13 +83,13 @@
/**
* @return value or result of valueBinding of Name of JavaScript function, called before updating DOM
*/
- public abstract String getBeforeUpdate();
+ public abstract String getOnbeforedomupdate();
/**
* setter method for property
* @param new value of Name of JavaScript function, called before updating DOM to set
*/
- public abstract void setBeforeUpdate(String beforeUpdate);
+ public abstract void setOnbeforedomupdate(String beforeUpdate);
/**
* setter method for property
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2007-09-10 15:37:40 UTC (rev 2839)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2007-09-10 16:00:41 UTC (rev 2840)
@@ -54,7 +54,6 @@
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
-import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.util.ServicesUtils;
import org.apache.commons.logging.Log;
@@ -93,7 +92,7 @@
* Attribute for keep JavaScript function name for call before updating
* DOM tree.
*/
- public static final String BEFOREUPDATE_ATTR_NAME = "beforeupdate";
+ public static final String ONBEFOREDOMUPDATE_ATTR_NAME = "onbeforedomupdate";
/**
@@ -304,10 +303,10 @@
function.addParameter("data");
function.addToBody(oncomplete);
- options.put("oncomplete", function);
+ options.put(ONCOMPLETE_ATTR_NAME, function);
}
- String beforeupdate = getAjaxBeforeUpdate(uiComponent);
+ String beforeupdate = getAjaxOnBeforeDomUpdate(uiComponent);
if (null != beforeupdate) {
JSFunctionDefinition function = new JSFunctionDefinition();
function.addParameter("request");
@@ -315,7 +314,7 @@
function.addParameter("data");
function.addToBody(beforeupdate);
- options.put("beforeupdate", function);
+ options.put(ONBEFOREDOMUPDATE_ATTR_NAME, function);
}
@@ -594,12 +593,12 @@
* for wich calculate function name
* @return name of JavaScript function or <code>null</code>
*/
- public static String getAjaxBeforeUpdate(UIComponent component) {
+ public static String getAjaxOnBeforeDomUpdate(UIComponent component) {
if (component instanceof AjaxComponent) {
- return ((AjaxComponent) component).getBeforeUpdate();
+ return ((AjaxComponent) component).getOnbeforedomupdate();
}
- return (String) component.getAttributes().get(BEFOREUPDATE_ATTR_NAME);
+ return (String) component.getAttributes().get(ONBEFOREDOMUPDATE_ATTR_NAME);
}
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-09-10 15:37:40 UTC (rev 2839)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-09-10 16:00:41 UTC (rev 2840)
@@ -688,9 +688,9 @@
if(req.getParserStatus() == Sarissa.PARSED_OK){
// perform beforeupdate if exists
- if(options.beforeupdate){
- LOG.debug( "Call request beforeupdate function before replacing elemements" );
- options.beforeupdate(req, req.domEvt, req.getJSON('_ajax:data'));
+ if(options.onbeforedomupdate){
+ LOG.debug( "Call request onbeforedomupdate function before replacing elemements" );
+ options.onbeforedomupdate(req, req.domEvt, req.getJSON('_ajax:data'));
}
var idsFromResponse = req.getResponseHeader("Ajax-Update-Ids");
Modified: trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
===================================================================
--- trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-09-10 15:37:40 UTC (rev 2839)
+++ trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-09-10 16:00:41 UTC (rev 2840)
@@ -251,7 +251,7 @@
</property>
<property hidden="true">
- <name>beforeUpdate</name>
+ <name>onbeforedomupdate</name>
<classname>java.lang.String</classname>
</property>
Modified: trunk/ui/tabPanel/src/test/java/org/richfaces/component/UITabTest.java
===================================================================
--- trunk/ui/tabPanel/src/test/java/org/richfaces/component/UITabTest.java 2007-09-10 15:37:40 UTC (rev 2839)
+++ trunk/ui/tabPanel/src/test/java/org/richfaces/component/UITabTest.java 2007-09-10 16:00:41 UTC (rev 2840)
@@ -269,11 +269,11 @@
public void setSwitchType(String newvalue) {
}
- public String getBeforeUpdate() {
+ public String getOnbeforedomupdate() {
return null;
}
- public void setBeforeUpdate(String beforeUpdate) {
+ public void setOnbeforedomupdate(String beforeUpdate) {
}
}
}
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-09-10 15:37:40 UTC (rev 2839)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-09-10 16:00:41 UTC (rev 2840)
@@ -165,17 +165,17 @@
eventOptions.put("oncomplete", onComplete);
}
- if(eventOptions.containsKey("beforeupdate")){
- JSFunctionDefinition beforeUpdate = (JSFunctionDefinition)eventOptions.get("beforeupdate");
+ if(eventOptions.containsKey(AjaxRendererUtils.ONBEFOREDOMUPDATE_ATTR_NAME)){
+ JSFunctionDefinition beforeUpdate = (JSFunctionDefinition)eventOptions.get(AjaxRendererUtils.ONBEFOREDOMUPDATE_ATTR_NAME);
beforeUpdate.addToBody(fireBeforeUpdateDOM);
- eventOptions.put("beforeupdate", beforeUpdate);
+ eventOptions.put(AjaxRendererUtils.ONBEFOREDOMUPDATE_ATTR_NAME, beforeUpdate);
} else {
JSFunctionDefinition beforeUpdate = new JSFunctionDefinition();
beforeUpdate.addParameter("request");
beforeUpdate.addParameter("event");
beforeUpdate.addParameter("data");
beforeUpdate.addToBody(fireBeforeUpdateDOM);
- eventOptions.put("beforeupdate", beforeUpdate);
+ eventOptions.put(AjaxRendererUtils.ONBEFOREDOMUPDATE_ATTR_NAME, beforeUpdate);
}
18 years, 8 months
JBoss Rich Faces SVN: r2839 - in trunk/ui: modal-panel/src/main/config/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-09-10 11:37:40 -0400 (Mon, 10 Sep 2007)
New Revision: 2839
Modified:
trunk/ui/drag-drop/src/main/config/component/dragIndicator.xml
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
Log:
add style attribute
Modified: trunk/ui/drag-drop/src/main/config/component/dragIndicator.xml
===================================================================
--- trunk/ui/drag-drop/src/main/config/component/dragIndicator.xml 2007-09-10 15:24:56 UTC (rev 2838)
+++ trunk/ui/drag-drop/src/main/config/component/dragIndicator.xml 2007-09-10 15:37:40 UTC (rev 2839)
@@ -30,9 +30,9 @@
<classname>org.ajax4jsf.tag.TestHandler</classname>
</taghandler>
-->
- &ui_component_attributes;
-
- <property>
+ &ui_component_attributes; &html_style_attributes;
+
+ <property>
<name>styleClass</name>
<classname>java.lang.String</classname>
<description>Corresponds to the HTML class attribute</description>
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-09-10 15:24:56 UTC (rev 2838)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-09-10 15:37:40 UTC (rev 2839)
@@ -28,7 +28,8 @@
<classname>org.ajax4jsf.tag.TestHandler</classname>
</taghandler>
-->
- &ui_component_attributes; &ui_input_attributes; &ui_output_attributes; <!--
+ &ui_component_attributes; &ui_input_attributes; &ui_output_attributes; &html_style_attributes;
+ <!--
<property>
<name>param</name>
<classname>java.lang.String</classname>
@@ -37,6 +38,9 @@
<defaultvalue>"default"</defaultvalue>
</property>
-->
+
+
+
<property>
<name>headerClass</name>
<classname>java.lang.String</classname>
18 years, 8 months
JBoss Rich Faces SVN: r2838 - in trunk/ui/calendar/src: main/templates/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-09-10 11:24:56 -0400 (Mon, 10 Sep 2007)
New Revision: 2838
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
Log:
RF-854 done
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-09-10 15:17:04 UTC (rev 2837)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-09-10 15:24:56 UTC (rev 2838)
@@ -204,15 +204,8 @@
months. Should accept list with the month names
</description>
</property>
+
<property>
- <name>buttonLabel</name>
- <classname>java.lang.String</classname>
- <description>
- Defines label for the popup button element
- </description>
- <defaultvalue>"popupButton"</defaultvalue>
- </property>
- <property>
<name>toolTipMode</name>
<classname>java.lang.String</classname>
<description>
@@ -447,6 +440,25 @@
<name>data</name>
<classname>java.lang.Object</classname>
</property>
+
+ <property>
+ <name>buttonIcon</name>
+ <classname>java.lang.String</classname>
+ <description>Defines icon for the popup button element</description>
+ </property>
+
+ <property>
+ <name>buttonLabel</name>
+ <classname>java.lang.String</classname>
+ <description>Defines label for the popup button element</description>
+ </property>
+
+ <property>
+ <name>buttonIconDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>Defines disabled icon for the popup button element</description>
+ </property>
+
</component>
&listeners;
</components>
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-09-10 15:17:04 UTC (rev 2837)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-09-10 15:24:56 UTC (rev 2838)
@@ -10,11 +10,11 @@
component="org.richfaces.component.UICalendar">
<f:clientid var="clientId" />
<h:scripts>new org.ajax4jsf.javascript.PrototypeScript(),new org.ajax4jsf.javascript.AjaxScript(),/org/richfaces/renderkit/html/scripts/events.js,/org/richfaces/renderkit/html/scripts/utils.js,/org/richfaces/renderkit/html/scripts/json/json-dom.js,/org/richfaces/renderkit/html/scripts/scriptaculous/effects.js,/org/richfaces/renderkit/html/scripts/calendar.js</h:scripts>
-
+
<h:styles>/org/richfaces/renderkit/html/css/calendar.xcss</h:styles>
<div id="#{clientId}"
- style="z-index:#{component.attributes['zindex']}; #{component.attributes['style']}"
+ style="z-index: #{ component . attributes [ 'zindex' ]"
class="#{component.attributes['styleClass']}"
x:passThruWithExclusions="value,name,type,id"><script
type="text/javascript">
@@ -91,19 +91,18 @@
writePreloadBody(context, component);
/*]]>*/</jsp:scriptlet>
);
- </script>
- </div>
+ </script></div>
<f:call name="addPopupToAjaxRendered" />
-
- <span id="#{clientId}Popup" >
+
+ <span id="#{clientId}Popup">
<jsp:scriptlet>
<![CDATA[
boolean popup = getUtils().isBooleanAttribute(component, "popup");
if (!popup) {
getUtils().writeAttribute(writer, "style", "display: none");
} else {
-
+ boolean disabled = getUtils().isBooleanAttribute(component, "disabled");
boolean showInput = getUtils().isBooleanAttribute(component, "showInput");
boolean manualInput = getUtils().isBooleanAttribute(component, "enableManualInput");
String onfieldclick =null;
@@ -121,45 +120,98 @@
variables.setVariable("onfieldclick",onfieldclick);
variables.setVariable("type",type);
+ variables.setVariable("disabled",new Boolean(disabled));
]]>
+ </jsp:scriptlet>
+ <f:resource name="org.richfaces.renderkit.html.iconimages.CalendarIcon" var="icon"/>
+ <f:resource name="org.richfaces.renderkit.html.iconimages.DisabledCalendarIcon" var="disabledIcon"/>
+ <input id="#{clientId}InputDate" name="#{clientId}InputDate"
+ value="#{this:getInputValue(context,component)}" type="#{type}"
+ readonly="#{manualInput}"
+ disabled="#{disabled}"
+ accesskey="#{component.attributes['accesskey']}"
+ maxlength="#{component.attributes['maxlength']}"
+ onchange="#{component.attributes['oninputchange']}"
+ onselect="#{component.attributes['oninputselect']}"
+ onfocus="#{component.attributes['oninputfocus']}"
+ onblur="#{component.attributes['oninputblur']}"
+ onclick="#{onfieldclick} #{component.attributes['oninputclick']}"
+ onkeypress="#{component.attributes['oninputkeypress']}"
+ onkeydown="#{component.attributes['oninputkeydown']}"
+ onkeyup="#{component.attributes['oninputkeyup']}"
+ size="#{component.attributes['inputSize']}"
+ style="vertical-align: middle;"
+ class="rich-calendar-input #{component.attributes['inputClass']}"
+ tabindex="#{component.attributes['tabindex']}"> </input>
+ <jsp:scriptlet>
+ <![CDATA[
+ String buttonIcon = (String) component.getAttributes().get("buttonIcon");
+ String buttonLabel = (String) component.getAttributes().get("buttonLabel");
+ String buttonIconDisabled = (String) component.getAttributes().get("buttonIconDisabled");
+ variables.setVariable("buttonIcon",buttonIcon);
+ variables.setVariable("buttonLabel",buttonLabel);
+ variables.setVariable("buttonIconDisabled",buttonIconDisabled);
+ if(buttonLabel==null){
+ ]]>
+ </jsp:scriptlet>
+ <img id="#{clientId}PopupButton" class="rich-calendar-popupicon"
+ accesskey="#{component.attributes['accesskey']}"
+ name="#{clientId}"
+ style="vertical-align: middle"
+ tabindex="#{component.attributes['tabindex']}">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ if(!disabled){
+
+ getUtils().writeAttribute(writer, "onclick", "$('"+clientId+"').component.doSwitch();");
+ if(buttonIcon==null){
+ getUtils().writeAttribute(writer, "src", variables.getVariable("icon"));
+ }
+ else{
+ getUtils().writeAttribute(writer, "src", buttonIcon);
+ }
+ }
+ else{
+
+ getUtils().writeAttribute(writer, "onclick", null);
+ if(buttonIconDisabled==null){
+ getUtils().writeAttribute(writer, "src", variables.getVariable("disabledIcon"));
+ }
+ else{
+ getUtils().writeAttribute(writer, "src", buttonIconDisabled);
+ }
+ }
+ ]]>
</jsp:scriptlet>
- <f:resource name="org.richfaces.renderkit.html.iconimages.CalendarIcon" var="icon" />
- <input
- id="#{clientId}InputDate"
- name="#{clientId}InputDate"
- value="#{this:getInputValue(context,component)}"
- type="#{type}"
- readonly="#{manualInput}"
- disabled="#{component.attributes['disabled']}"
- accesskey="#{component.attributes['accesskey']}"
- maxlength="#{component.attributes['maxlength']}"
- onchange="#{component.attributes['oninputchange']}"
- onselect="#{component.attributes['oninputselect']}"
- onfocus="#{component.attributes['oninputfocus']}"
- onblur="#{component.attributes['oninputblur']}"
- onclick="#{onfieldclick} #{component.attributes['oninputclick']}"
- onkeypress="#{component.attributes['oninputkeypress']}"
- onkeydown="#{component.attributes['oninputkeydown']}"
- onkeyup="#{component.attributes['oninputkeyup']}"
- size="#{component.attributes['inputSize']}"
- style="vertical-align: middle; #{component.attributes['inputStyle']}"
- class="rich-calendar-input #{component.attributes['inputClass']}"
- tabindex="#{component.attributes['tabindex']}">
- </input>
- <img id="#{clientId}PopupButton"
- class="rich-calendar-popupicon"
- src="#{icon}"
- accesskey="#{component.attributes['accesskey']}"
- name="#{clientId}"
- onclick="$('#{clientId}').component.doSwitch();return true;"
- style="vertical-align: middle"
- tabindex="#{component.attributes['tabindex']}">
- </img>
+
+ </img>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ else{
+ ]]>
+ </jsp:scriptlet>
+ <button
+ type="button"
+ id="#{clientId}PopupButton"
+ name="#{clientId}"
+ onclick="$('#{clientId}').component.doSwitch();return true; #{component.attributes['oninputclick']}"
+ style="vertical-align: middle"
+ tabindex="#{component.attributes['tabindex']}"
+ disabled="#{disabled}">
+ #{buttonLabel}
+ </button>
<jsp:scriptlet>
<![CDATA[
}
]]>
- </jsp:scriptlet>
- </span>
+ </jsp:scriptlet>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet> </span>
</f:root>
Modified: trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
===================================================================
--- trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2007-09-10 15:17:04 UTC (rev 2837)
+++ trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2007-09-10 15:24:56 UTC (rev 2838)
@@ -171,7 +171,7 @@
*/
HtmlPage page = renderView();
assertNotNull(page);
- System.out.println(page.asXml());
+ //System.out.println(page.asXml());
HtmlElement htmlCalendar = page.getHtmlElementById(calendar
.getClientId(facesContext));
@@ -180,7 +180,7 @@
HtmlInput htmlCalendarInput = (HtmlInput) page
.getHtmlElementById(calendar.getClientId(facesContext)
+ "InputDate");
- HtmlImage htmlCalendarButton = (HtmlImage) page
+ HtmlButton htmlCalendarButton = (HtmlButton) page
.getHtmlElementById(calendar.getClientId(facesContext)
+ "PopupButton");
HtmlSpan htmlCalendarSpan = (HtmlSpan) page.getHtmlElementById(calendar
18 years, 8 months
JBoss Rich Faces SVN: r2837 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-09-10 11:17:04 -0400 (Mon, 10 Sep 2007)
New Revision: 2837
Added:
trunk/docs/userguide/en/src/main/resources/images/treeNodesAdaptor1.png
Removed:
trunk/docs/userguide/en/src/main/resources/images/treeNodes1.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.xml
Log:
http://jira.jboss.com/jira/browse/RF-869
change name treeNodes to treeNodesAdaptor
Modified: trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.desc.xml 2007-09-10 14:45:38 UTC (rev 2836)
+++ trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.desc.xml 2007-09-10 15:17:04 UTC (rev 2837)
@@ -2,20 +2,20 @@
<section>
<sectioninfo>
<keywordset>
- <keyword>treeNodes</keyword>
+ <keyword>treeNodesAdaptor</keyword>
</keywordset>
</sectioninfo>
<section>
<title>Description</title>
<para>
- The <property>rich:treeNodes</property> provides possibility to define data models and create representations for them.
+ The <property>rich:treeNodesAdaptor</property> provides possibility to define data models and create representations for them.
</para>
<figure>
- <title>Expanded tree with treeNodes</title>
+ <title>Expanded tree with treeNodesAdaptor</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/treeNodes1.png"/>
+ <imagedata fileref="images/treeNodesAdaptor1.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.xml 2007-09-10 14:45:38 UTC (rev 2836)
+++ trunk/docs/userguide/en/src/main/docbook/included/treeNodesAdaptor.xml 2007-09-10 15:17:04 UTC (rev 2837)
@@ -2,9 +2,9 @@
<section>
<sectioninfo>
<keywordset>
- <keyword>treeNodes</keyword>
- <keyword>rich:treeNodes</keyword>
- <keyword>HtmlTreeNodes</keyword>
+ <keyword>treeNodesAdaptor</keyword>
+ <keyword>rich:treeNodesAdaptor</keyword>
+ <keyword>HtmltreeNodesAdaptor</keyword>
</keywordset>
</sectioninfo>
@@ -20,15 +20,15 @@
<tbody>
<row>
<entry>component-type</entry>
- <entry>org.richfaces.TreeNodes</entry>
+ <entry>org.richfaces.TreeNodesAdaptor</entry>
</row>
<row>
<entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlTreeNodes</entry>
+ <entry>org.richfaces.component.html.HtmlTreeNodesAdaptor</entry>
</row>
<row>
<entry>component-family</entry>
- <entry>org.richfaces.TreeNodes</entry>
+ <entry>org.richfaces.TreeNodesAdaptor</entry>
</row>
<!--
<row>
@@ -38,7 +38,7 @@
-->
<row>
<entry>tag-class</entry>
- <entry>org.richfaces.taglib.TreeNodesTag</entry>
+ <entry>org.richfaces.taglib.TreeNodesAdaptorTag</entry>
</row>
</tbody>
</tgroup>
@@ -46,14 +46,14 @@
<section>
<title>Creating the Component with a Page Tag</title>
- <para>To create the simplest variant of <property>rich:treeNodes</property> on a page, use the
+ <para>To create the simplest variant of <property>rich:treeNodesAdaptor</property> on a page, use the
following syntax:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:treeNodes var="issue" nodes="#{model.issues}">
+<rich:treeNodesAdaptor var="issue" nodes="#{model.issues}">
...
<rich:treeNode>
<!-- node content -->
@@ -61,7 +61,7 @@
...
<!-- Others nodes -->
...
-</rich:treeNodes>
+</rich:treeNodesAdaptor>
...
]]></programlisting>
</section>
@@ -72,9 +72,9 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlTreeNodes;
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlTreeNodesAdaptor;
...
-HtmlTreeNodes myTreeNodes = new HtmlTreeNodes();
+HtmlTreeNodesAdaptor myTreeNodesAdaptor = new HtmlTreeNodesAdaptor();
...
]]></programlisting>
</section>
@@ -86,26 +86,26 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:tree adviseNodeOpened="#{treeModelBean.adviseNodeOpened}" switchType="client">
- <rich:treeNodes id="project" nodes="#{loaderBean.projects}" var="project">
+ <rich:treeNodesAdaptor id="project" nodes="#{loaderBean.projects}" var="project">
<rich:treeNode>
<h:commandLink action="#{project.click}" value="Project: #{project.name}" />
</rich:treeNode>
- <rich:treeNodes id="srcDir" var="srcDir" nodes="#{project.srcDirs}">
+ <rich:treeNodesAdaptor id="srcDir" var="srcDir" nodes="#{project.srcDirs}">
<rich:treeNode>
<h:commandLink action="#{srcDir.click}" value="Source directory: #{srcDir.name}" />
</rich:treeNode>
- <rich:treeNodes id="pkg" var="pkg" nodes="#{srcDir.packages}">
+ <rich:treeNodesAdaptor id="pkg" var="pkg" nodes="#{srcDir.packages}">
<rich:treeNode>
<h:commandLink action="#{pkg.click}" value="Package: #{pkg.name}" />
</rich:treeNode>
- <rich:treeNodes id="class" var="class" nodes="#{pkg.classes}">
+ <rich:treeNodesAdaptor id="class" var="class" nodes="#{pkg.classes}">
<rich:treeNode>
<h:commandLink action="#{class.click}" value="Class: #{class.name}" />
</rich:treeNode>
- </rich:treeNodes>
- </rich:treeNodes>
- </rich:treeNodes>
- </rich:treeNodes>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
</rich:tree>
...
]]></programlisting>
Deleted: trunk/docs/userguide/en/src/main/resources/images/treeNodes1.png
===================================================================
(Binary files differ)
Added: trunk/docs/userguide/en/src/main/resources/images/treeNodesAdaptor1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/treeNodesAdaptor1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 8 months
JBoss Rich Faces SVN: r2836 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-09-10 10:45:38 -0400 (Mon, 10 Sep 2007)
New Revision: 2836
Modified:
trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
Log:
http://jira.jboss.com/jira/browse/RF-872
Modified: trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2007-09-10 13:53:36 UTC (rev 2835)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2007-09-10 14:45:38 UTC (rev 2836)
@@ -12,16 +12,17 @@
<tbody>
<row>
- <entry>component-type</entry>
- <entry>org.ajax4jsf.Listener</entry>
+ <entry>listener-class</entry>
+ <entry>org.ajax4jsf.framework.ajax.AjaxListener</entry>
</row>
- <row>
- <entry>component-family</entry>
- <entry>org.ajax4jsf.Listener</entry>
+ <row>
+ <entry>event-class</entry>
+ <entry>org.ajax4jsf.framework.ajax.AjaxEvent</entry>
</row>
+
<row>
- <entry>component-class</entry>
- <entry>org.ajax4jsf.component.html.AjaxListener</entry>
+ <entry>tag-class</entry>
+ <entry>org.ajax4jsf.taglib.html.jsp.AjaxListenerTag</entry>
</row>
</tbody>
@@ -42,19 +43,27 @@
...
]]></programlisting>
</section>
-
+
<section>
<title>Dynamical creation of a component from Java code</title>
<para>
<emphasis role="bold">Example:</emphasis></para>
- <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.component.html.AjaxListener;
+ <programlisting role="JAVA"><![CDATA[package demo;
+
+public class ImplBean implements import org.ajax4jsf.component.html.AjaxListener{
+ ...
+}
+]]></programlisting>
+
+ <programlisting role="JAVA"><![CDATA[
+import demo.ImplBean;
...
-AjaxListener myListener = new AjaxListener();
+ImplBean myListener = new ImplBean();
...
- ]]></programlisting>
-
- </section>
-
+]]></programlisting>
+
+ </section>
+
<section>
<title>Key attributes and ways of usage</title>
<para>
@@ -77,7 +86,6 @@
</para>
<programlisting role="XML"><![CDATA[...
-
<a4j:commandLink id="cLink" value="Click it To Send Ajax Request">
<a4j:ajaxListener type="demo.Bean"/>
</a4j:commandLink>
@@ -88,13 +96,11 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[
-package demo;
+ <programlisting role="JAVA"><![CDATA[package demo;
import org.ajax4jsf.framework.ajax.AjaxEvent;
public class Bean implements org.ajax4jsf.framework.ajax.AjaxListener{
-
...
public void processAjax(AjaxEvent arg0){
//Custom Developer Code
18 years, 8 months