JBoss Rich Faces SVN: r13844 - trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-24 15:00:59 -0400 (Fri, 24 Apr 2009)
New Revision: 13844
Modified:
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss
Log:
'Smooth' theme XCSS borders fixed
Modified: trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss
===================================================================
--- trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss 2009-04-24 18:51:58 UTC (rev 13843)
+++ trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss 2009-04-24 19:00:59 UTC (rev 13844)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-
+
<f:template xmlns:f='http:/jsf.exadel.com/template'
xmlns:u='http:/jsf.exadel.com/template/util'
xmlns="http://www.w3.org/1999/xhtml">
@@ -18,7 +18,8 @@
<u:selector name=".bg_tabbody">
<u:style name="background" skin="generalBackgroundColor"/>
<u:style name="border-color" skin="panelBorderColor" />
- <u:style name="border-top" value="solid 15px" />
+ <u:style name="border-top-style" value="solid" />
+ <u:style name="border-top-width" value="15px" />
</u:selector>
<u:selector name=".content_body">
@@ -30,7 +31,8 @@
<u:selector name=".menu_col">
<u:style name="background" skin="generalBackgroundColor"/>
<u:style name="border-color" skin="panelBorderColor" />
- <u:style name="border-right" value="solid 2px" />
+ <u:style name="border-right-style" value="solid" />
+ <u:style name="border-right-width" value="2px" />
<u:style name="vertical-align" value="top"/>
</u:selector>
<u:selector name=".content_col">
15 years, 8 months
JBoss Rich Faces SVN: r13843 - trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-24 14:51:58 -0400 (Fri, 24 Apr 2009)
New Revision: 13843
Modified:
trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java
trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java
Log:
Modified: trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java
===================================================================
--- trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java 2009-04-24 18:40:03 UTC (rev 13842)
+++ trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java 2009-04-24 18:51:58 UTC (rev 13843)
@@ -83,7 +83,6 @@
@Fetch(FetchMode.SUBSELECT)
private List<Image> images = new ArrayList<Image>();
- @NotNull
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "SHELF_ID", nullable = false)
@ForeignKey(name = "FK_SHELF_ID")
Modified: trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java
===================================================================
--- trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java 2009-04-24 18:40:03 UTC (rev 13842)
+++ trunk/examples/photoalbum/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java 2009-04-24 18:51:58 UTC (rev 13843)
@@ -25,6 +25,8 @@
*/
package org.richfaces.photoalbum.domain;
+import org.hibernate.annotations.Fetch;
+import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.hibernate.annotations.OrderBy;
@@ -163,6 +165,7 @@
CascadeType.ALL}, fetch = FetchType.LAZY)
@LazyCollection(LazyCollectionOption.EXTRA)
@OrderBy(clause = "date asc")
+ @Fetch(FetchMode.SUBSELECT)
private List<Comment> comments = new ArrayList<Comment>();
@ManyToOne(fetch = FetchType.LAZY)
15 years, 8 months
JBoss Rich Faces SVN: r13842 - trunk/ui/columns/src/main/java/org/richfaces/taglib.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-24 14:40:03 -0400 (Fri, 24 Apr 2009)
New Revision: 13842
Modified:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
Log:
https://jira.jboss.org/jira/browse/RF-6923
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2009-04-24 18:30:46 UTC (rev 13841)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2009-04-24 18:40:03 UTC (rev 13842)
@@ -237,7 +237,7 @@
String expr = attribute.getValue();
IterationContext itContext = iterationContextLocal.get();
- ValueExpression ve = ELBuilder.createValueExpression(expr, Object.class, ctx.getExpressionFactory(), ctx.getFacesContext().getELContext(),
+ ValueExpression ve = ELBuilder.createValueExpression(expr, Object.class, ctx.getExpressionFactory(), ctx,
itContext._itemId, itContext._indexId,
itContext.getVarReplacement(), itContext.getIndexReplacement());
((UIComponent)instance).setValueExpression(name, ve);
15 years, 8 months
JBoss Rich Faces SVN: r13841 - in trunk/docs/userguide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-24 14:30:46 -0400 (Fri, 24 Apr 2009)
New Revision: 13841
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
Log:
https://jira.jboss.org/jira/browse/RF-4616
All Articles -http://www.jboss.org/community/docs/DOC-11846 are looked through, links are created where it's necessary
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2009-04-24 17:59:05 UTC (rev 13840)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2009-04-24 18:30:46 UTC (rev 13841)
@@ -553,6 +553,10 @@
<property><rich:dataTable></property>
</emphasis> flexibility can be found in the <ulink
url="http://www.jboss.org/community/docs/DOC-11847"> "rich:dataTable Flexibility " article </ulink>.</para>
+ <para>
+ <ulink url="http://www.jboss.org/community/docs/DOC-11848">Article on dataTable skinability</ulink> provides you a simple example of skinnability.
+
+ </para>
<para>More information about using <emphasis role="bold">
<property><rich:dataTable></property>
</emphasis> and <emphasis role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2009-04-24 17:59:05 UTC (rev 13840)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2009-04-24 18:30:46 UTC (rev 13841)
@@ -529,8 +529,17 @@
demonstrates some aspects of interaction with JBoss Developer Studio while working with RichFaces.
</para>
</listitem>
+
+ <listitem>
+ <para>
+ "<ulink url="http://docs.jboss.org/tools/movies/demos/rich_faces_demo/rich_faces_demo.htm">How to Configure Maven for RichFaces</ulink>" article shortly discusses Maven configuration for RichFaces.
+ </para>
+ </listitem>
+
</itemizedlist>
<para>Read also the <ulink url="http://mkblog.exadel.com/?p=110">quick overview</ulink> to "Practical RichFaces " book by Max Katz at his blog.</para>
+
+
</section>
</chapter>
15 years, 8 months
JBoss Rich Faces SVN: r13840 - trunk/docs/realworld_app_guide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-04-24 13:59:05 -0400 (Fri, 24 Apr 2009)
New Revision: 13840
Modified:
trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml
Log:
https://jira.jboss.org/jira/browse/RF-5768 - Photo Album review
Modified: trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml 2009-04-24 17:56:29 UTC (rev 13839)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml 2009-04-24 17:59:05 UTC (rev 13840)
@@ -845,7 +845,7 @@
</section>
- <section id="ContextMenu">
+ <section id="contextMenu">
<title>Context Menu</title>
<para>Work in progress...</para>
</section>
15 years, 8 months
JBoss Rich Faces SVN: r13839 - in trunk/docs/realworld_app_guide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-04-24 13:56:29 -0400 (Fri, 24 Apr 2009)
New Revision: 13839
Modified:
trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml
trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml
Log:
https://jira.jboss.org/jira/browse/RF-5768 - Photo Album review
Modified: trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml 2009-04-24 17:56:12 UTC (rev 13838)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml 2009-04-24 17:56:29 UTC (rev 13839)
@@ -19,6 +19,11 @@
<email>atsebro(a)exadel.com</email>
</author>
<author>
+ <firstname>Svetlana</firstname>
+ <surname>Mukhina</surname>
+ <email>smukhina(a)exadel.com</email>
+ </author>
+ <author>
<firstname>Gleb</firstname>
<surname>Galkin</surname>
<email>ggalkin(a)exadel.com</email>
@@ -39,7 +44,7 @@
<toc/>
&intro;
&getting_started;
- &application_overview;
+ <!-- &application_overview; -->
&hiw;
Modified: trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml 2009-04-24 17:56:12 UTC (rev 13838)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/modules/hiw.xml 2009-04-24 17:56:29 UTC (rev 13839)
@@ -12,7 +12,7 @@
<section>
<title>Used Components</title>
- <para>Below there is a list of components used in <property>Photo Album Demo</property>.</para>
+ <para>Below there is a list of components used in <property>Photo Album</property>.</para>
<table>
<title>Components used in "Photo Album Demo"</title>
<tgroup cols="2">
@@ -31,12 +31,12 @@
<entry>a4j:commandButton</entry>
<entry>The component is very similar to the <h:commandButton> component, the only difference is that an Ajax form submit is generated on a click and it allows dynamic rerendering after a response comes back. It's not necessary to plug any support into the component, as Ajax support is already built in.</entry>
</row>
- <row>
+ <!-- row>
<entry>a4j:push</entry>
<entry>The component periodically perform Ajax request to the server, to simulate 'push' data.</entry>
- </row>
+ </row-->
<row>
- <entry>a4J:poll</entry>
+ <entry>a4j:poll</entry>
<entry>The component allows periodical sending of Ajax requests to the server and is used for a page updating according to a specified time interval.</entry>
</row>
<row>
@@ -91,33 +91,73 @@
</section>
<section>
- <title>Albums Representation</title>
-
+ <title>Navigation panel represented by <rich:tree></title>
+ <para>
+ The <emphasis role="bold"><property><rich:tree></property></emphasis> component takes one of the main places
+ in the <property>Photo Album</property> and is tightly bounded with the application logic.
+ It helps to represent
+ and implement inherently the "Shelves - Albums" hierarchy.
+ Shelf is the highest possible level in the tree hierarchy, that
+ is used to group thematic albums and may contain as many albums as needed.
+ </para>
+ <para>
+ There are two types of navigation panel in the application: for a registered user and for a guest.
+ The difference between them is that the first one has a context menu and drag-and-drop possibility.
+ </para>
<section>
- <title>Building the <rich:tree> on the page</title>
+ <title>Navigation panel for a guest</title>
+ <!--para>
+ The <emphasis role="bold"><property><rich:tree></property></emphasis> component is designed for
+ hierarchical data presentation and is used to build a tree structure.
+ The component also supports built-in drag-and-drop functionality.
+ </para-->
<para>
- The <emphasis role="bold"><property><rich:tree></property></emphasis> component is designed for hierarchical data presentation and is used to build a tree structure. The component also supports built-in drag and drop functionality.
+ Navigation panel for a guest is represented as a simple
+ <emphasis role="bold"><property><rich:tree></property></emphasis> component.
</para>
<para>
- The <emphasis role="bold"><property><rich:tree></property></emphasis> component in the <property>Photo Album Demo</property> application helps to represent and implement inherently the "Shelves—Albums—Photos" hierarchy.
- Shelf is the highest possible level in the tree hierarchy.
- shelves are used to group thematic albums and may contain as many albums as needed.
- Photos are not represented in the tree because it can be a great number of them and it can make a tree clumsy.
- Photos are rendered in the center of the screen (hereinafter referred to as a watching area).
+ There are several ways to implement the <emphasis role="bold"><property><rich:tree></property></emphasis> on a page.
+ In the current application the <emphasis role="bold"><property><rich:tree></property></emphasis> is designed
+ using a model tag <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis>.
</para>
-
<para>
- Implicitly, the <emphasis role="bold"><property><rich:tree></property></emphasis> component takes one of the main places in the <property>Photo Album Demo</property> and is tightly bounded with the application logic.
- There are several ways to implement the <emphasis role="bold"><property><rich:tree></property></emphasis>.
- In the current application the <emphasis role="bold"><property><rich:tree></property></emphasis> is designed using a model tag <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis>.
+ The <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component
+ has a <emphasis><property>"nodes"</property></emphasis> attribute that accepts
+ a collection of elements, so <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis>
+ iterates over the collection and renders hierarchical tree structure on a page.
+ </para>
+ <para>
+ According to the "Shelves - Albums" hierarchy we need two nested
+ <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> components.
+ The first one iterates through the Shelves collection
+ that is returned from the <code>getPredefinedShelves()</code> method:
</para>
- <para>
- The <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component accepts a collection of elements, which are allowed to include lists, arrays, maps, XML NodeList or NamedNodeMap, and iterate over it.
+ <programlisting role="JAVA"><![CDATA[...
+public List<Shelf> getPredefinedShelves() {
+ if (shelves == null) {
+ shelves = shelfAction.getPredefinedShelves();
+ }
+ return shelves;
+ }
+}
+...]]></programlisting>
+ <para>
+ The second <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component
+ iterates through the Albums collection of the current Shelf which is available via
+ <emphasis><property>"var"</property></emphasis> attribute.
+ The <emphasis><property>"var"</property></emphasis> attribute
+ is used to get access to the data object of the current collection element Shelf,
+ so it is possible to output any necessary data:
+ </para>
+ <!--
+ The <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component accepts
+ a collection of elements, which are allowed to include lists, arrays, maps, XML NodeList or NamedNodeMap, and iterate over it.
The <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component repeats a hierarchical tree structure on a <code>xhtml</code> or <code>jsp</code> page in a component tree and can be nested without any limitations.
The code snippet below schematically shows the idea of how a tree can be built on a page with the help of adaptors:
- </para>
+
+
<programlisting role="XML"><![CDATA[<rich:tree>
<rich:treeNodesAdaptor>
<rich:treeNode />
@@ -134,86 +174,85 @@
</rich:tree>]]></programlisting>
<para>
- When using <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component there is no need to specify
- the <emphasis><property>"value"</property></emphasis> and <emphasis><property>"var"</property></emphasis> attributes for the <emphasis role="bold"><property><rich:tree></property></emphasis>.
- The values for nodes to render are passed directly into the corresponding adaptor and the component performs all the necessary iterative work
+ When using <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component
+ there is no need to specify
+ the <emphasis><property>"value"</property></emphasis> and
+ <emphasis><property>"var"</property></emphasis> attributes
+ for the <emphasis role="bold"><property><rich:tree></property></emphasis>.
+ The values for nodes to render are passed directly into the corresponding adaptor
+ and the component performs all the necessary iterative work
(vizit the <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/treeNodesAdaptor.jsf?..."><rich:treeNodesAdaptor> page</ulink> on the RichFacesLiveDemo for more details).
</para>
<para>
- Implementation of the <emphasis role="bold"><property><rich:tree></property></emphasis> in the application is very similar to the model shown above.
- The <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> component has <nodes> attribute.
- The top <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> in the <emphasis role="bold"><property><rich:tree></property></emphasis> in the Photo Album Demo application is responsible for shelves rendering.
- Its <emphasis><property>"nodes"</property></emphasis> attribute refers to <emphasis><property>getShelves()</property></emphasis> method of the <code>ShelfManager</code> class and gets the collection of shelves associated with the current user including all shared shelves in the system.
+ Implementation of the <emphasis role="bold"><property><rich:tree></property></emphasis> in the application
+ is very similar to the model shown above.
+ The top <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis>
+ in the <emphasis role="bold"><property><rich:tree></property></emphasis> in the Photo Album
+ application is responsible for shelves rendering.
+ Its <emphasis><property>"nodes"</property></emphasis> attribute refers
+ to <emphasis><property>getShelves()</property></emphasis> method of the <code>ShelfManager</code> class
+ and gets the collection of shelves associated with the current user including all shared shelves in the system.
Take a look at this method:
- </para>
-
- <programlisting role="JAVA"><![CDATA[public List<Shelf> getShelves(){
- if(shelves == null){
- shelves = shelfAction.getShelves(user);
- }
- return shelves;
-} ]]></programlisting>
-
- <para>
+ </para-->
+
+ <!-- para>
When the <emphasis><property>"nodes"</property></emphasis> attribute of the <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis>, which is responsible for shelves rendering, receives the collection of shelves,
the iteration process switches to the nested <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis>, which is responsible for albums.
The "albums" <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> <emphasis><property>"nodes"</property></emphasis> attribute refers in its turn to the <code>albums</code> field of the <code>Shelf</code> class
and takes a collection of all albums associated with the current shelf.
The "albums" <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> renders all albums that belong to the current iterating shelf and then switches back to the "shelf" <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis> to render and iterate the next shelf in the shelves collection received earlier.
Here is how it looks in the <code>webapp/includes/index/tree.xhtml</code> file:
- </para>
+ </para-->
- <programlisting role="XML"><![CDATA[<rich:tree id="tree" switchType="client" treeNodeVar="treeNode" showConnectingLines="false" dragIndicator="dragIndicator" ajaxSubmitSelection="false"
- adviseNodeOpened="#{treeManager.adviseNodeSelected}"
- adviseNodeSelected="#{treeManager.adviseNodeSelected}"
- iconCollapsed="/img/shell/tree_icon_plus.png"
- iconExpanded="/img/shell/tree_icon_minus.png">
- <rich:treeNodesAdaptor nodes="#{shelfManager.getShelves()}" var="shelf">
- <rich:treeNode reRender="mainArea" selectedClass="tree-selected-node">
- <f:facet name="icon">
- <h:graphicImage style="border: none" value="/img/shell/tree_icon_shelf.png">
- <a4j:support reRender="tree, mainArea" event="onclick" actionListener="#{controller.showShelf(shelf)}" similarityGroupingId="sel" />
- </h:graphicImage>
- </f:facet>
- <rich:dropSupport id="shelfDND" acceptedTypes="album" dropValue="#{shelf}" dropListener="#{dndManager.processDrop}" reRender="mainArea, tree" />
- <ui:include src="/includes/contextMenu/CMForShelf.xhtml" >
- <ui:param name="shelf" value="#{shelf}" />
- </ui:include>
- <a4j:outputPanel>
- <h:outputText value="#{shelf.name}" />
- <h:outputText value=" :: " />
- <strong>#{shelf.unvisitedImages.size()}</strong> new
- <a4j:support reRender="tree, mainArea" event="onclick" actionListener="#{controller.showShelf(shelf)}" similarityGroupingId="sel" />
- </a4j:outputPanel>
- </rich:treeNode>
+ <programlisting role="XML"><![CDATA[...
+<rich:tree
+ adviseNodeOpened="#{treeManager.adviseNodeSelected}"
+ adviseNodeSelected="#{treeManager.adviseNodeSelected}"
+ ajaxSubmitSelection="false" id="PreDefinedTree"
+ treeNodeVar="treeNode" switchType="client"
+ iconCollapsed="/img/shell/tree_icon_plus.png"
+ iconExpanded="/img/shell/tree_icon_minus.png"
+ showConnectingLines="false">
+ <rich:treeNodesAdaptor nodes="#{shelfManager.getPredefinedShelves()}" var="shelf">
+ <rich:treeNode style="cursor:pointer" reRender="treeform,mainArea"
+ selectedClass="tree-selected-node">
+ <f:facet name="icon">
+ <h:graphicImage style="border: none" value="/img/shell/tree_icon_shelf.png">
+ <a4j:support reRender="treeform,mainArea" event="onclick" actionListener="#{controller.showShelf(shelf)}" similarityGroupingId="sel" />
+ </h:graphicImage>
+ </f:facet>
+ <a4j:outputPanel >
+ <h:outputText style="cursor:pointer" value="#{shelf.name}" />
+ <h:outputText value=" :: " />
+ <strong>#{shelf.unvisitedImages.size()}</strong> new
+ <a4j:support reRender="treeform,mainArea" event="onclick" actionListener="#{controller.showShelf(shelf)}" similarityGroupingId="sel" />
+ </a4j:outputPanel>
+ </rich:treeNode>
+ <rich:treeNodesAdaptor var="album"
+ nodes="#{shelf.albums}">
+ <rich:treeNode style="cursor:pointer" reRender="treeform,mainArea"
+ selectedClass="tree-selected-node"
+ icon="img/shell/tree_icon_album.png">
+ <f:facet name="iconLeaf">
+ <h:graphicImage style="border: none" value="img/shell/tree_icon_album.png">
+ <a4j:support reRender="treeform,mainArea" event="onclick" actionListener="#{controller.showAlbum(album)}" similarityGroupingId="sel" />
+ </h:graphicImage>
+ </f:facet>
+ <a4j:outputPanel>
+ <h:outputText style="cursor:pointer" value="#{album.name}" />
+ <h:outputText value=" :: " />
+ <strong>#{album.unvisitedImages.size()}</strong> new
+ <a4j:support reRender="treeform,mainArea" event="onclick" actionListener="#{controller.showAlbum(album)}" similarityGroupingId="sel" />
+ </a4j:outputPanel>
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+ </rich:tree>
+...]]></programlisting>
- <rich:treeNodesAdaptor var="album" nodes="#{shelf.albums}">
- <rich:treeNode reRender="mainArea" dragType="album" dragValue="#{album}" dropValue="#{album}" acceptedTypes="image, album"
- selectedClass="tree-selected-node" icon="img/shell/tree_icon_album.png">
- <f:facet name="iconLeaf">
- <h:graphicImage style="border: none" value="img/shell/tree_icon_album.png">
- <a4j:support reRender="tree, mainArea" event="onclick" actionListener="#{controller.showAlbum(album)}" similarityGroupingId="sel" />
- </h:graphicImage>
- </f:facet>
- <ui:include src="/includes/contextMenu/CMForAlbum.xhtml" >
- <ui:param name="album" value="#{album}" />
- </ui:include>
- <rich:dndParam name="label" type="drag" value="#{album.name}" />
- <a4j:outputPanel>
- <h:outputText value="#{album.name}" />
- <h:outputText value=" :: " />
- <strong>#{album.unvisitedImages.size()}</strong> new
- <a4j:support reRender="tree, mainArea" event="onclick" actionListener="#{controller.showAlbum(album)}" similarityGroupingId="sel" />
- </a4j:outputPanel>
- <rich:dropSupport id="php" acceptedTypes="image" dropValue="#{album}" dropListener="#{dndManager.processDrop}" reRender="mainArea, tree" />
- </rich:treeNode>
- </rich:treeNodesAdaptor>
- </rich:treeNodesAdaptor>
-</rich:tree>]]></programlisting>
-
<para>
- The illustration below shows how the Shelves—Albums hierarchy is rendered on the page.
+ The illustration below shows how the navigation panel for a guest is rendered on the page.
</para>
<figure>
@@ -228,38 +267,52 @@
</section>
<section>
- <title>Drag-and-drop inside the <rich:tree></title>
+ <title>Navigation panel for a registered user</title>
<para>
- Drag and drop features supported in the Photo Album Demo application are not so complicated as it may seem from the first view.
- In this application we can mark out two types of drag-and-drop: one type takes place only inside the tree (between tree nodes) and another one — between the watching area and the tree.
- The difference is not considerable enough to describe two types separately, but also not at all insignificant to be omitted here.
+ As it was mentioned before a navigation panel for a registered user has
+ two main features: drag-and-drop and context menu. Context menu is described
+ in the <link linkend="contextMenu">"Context menu"</link> chapter.
</para>
+ <para>
+ Drag-and-drop feature supported in the Photo Album application is not so complicated
+ as it may seem from the first view.
+ In this application we can mark out two types of drag-and-drop:
+ one type takes place only inside the tree (between tree nodes)
+ and another one - between the watching area and the tree.
+ The difference is not considerable enough to describe two types separately,
+ but also not at all insignificant to be omitted here.
+ </para>
<para>
- Let's examine drag-and-drop inside tree. The tree related components (<emphasis role="bold"><property><rich:tree></property></emphasis> and <emphasis role="bold"><property><rich:treeNode></property></emphasis>)
- have their own attributes that provide drag-and-drop functionality. These attributes can be divided into two groups: those which provide drag (dragValue, dragListener, dragIndicator, dragType attributes) and those which provide drop operations (dropValue, dropListener, acceptedTypes, typeMapping).
+ Let's examine drag-and-drop inside tree.
+ The tree related components
+ (<emphasis role="bold"><property><rich:tree></property></emphasis> and <emphasis role="bold"><property><rich:treeNode></property></emphasis>)
+ have their own attributes that provide drag-and-drop functionality.
+ These attributes can be divided into two groups:
+ those which provide drag (dragValue, dragListener, dragIndicator, dragType attributes)
+ and those which provide drop operations (dropValue, dropListener, acceptedTypes, typeMapping).
</para>
-
<note>
<title>
Note:
</title>
<para>
- Due to "Shelves—Albums—Photos" hierarchy we can say that photos could be moved between albums, albums could be moved between shelves.
- To avoid a mishmash, it's not allowed to place photos directly in shelves as well as nesting shelves inside shelves or albums inside albums.
+ Due to "Shelves - Albums - Photos" hierarchy we can say that photos could be moved between albums,
+ albums could be moved between shelves.
+ To avoid a mishmash, it's not allowed to place photos directly in shelves as well as nesting shelves
+ inside shelves or albums inside albums.
</para>
</note>
<para>
- All albums or images (<property>drag-and-drop zones</property> in terms of RichFaces drag-and-drop), which are assumed to be dragged, must be marked somehow in the application code.
- For albums that are represented as tree nodes we will use previously mentioned <property>drag group</property> attributes:
+ All albums or images, which are assumed to be dragged, must be marked somehow in the application code.
+ For albums that are represented as tree nodes we will use previously mentioned
+ <property>drag group</property> attributes:
</para>
<programlisting role="XML"><![CDATA[<rich:treeNodesAdaptor var="album" nodes="#{shelf.albums}">
- <rich:treeNode dragType="album"
- dragValue="#{album}"
- dropValue="#{album}"
- acceptedTypes="image, album" />
- …
+ <rich:treeNode dropListener="#{dndManager.processDrop}" dragType="album" dragValue="#{album}" dropValue="#{album}" acceptedTypes="image" reRender="mainArea, treeform">
+ ...
+ </rich:treeNode>
</rich:treeNodesAdaptor>
]]></programlisting>
@@ -268,15 +321,11 @@
For this purpose we add the <emphasis role="bold"><property>rich:dropSupport</property></emphasis> component to the "shelf" node:
</para>
<programlisting role="XML"><![CDATA[<rich:treeNodesAdaptor nodes="#{shelfManager.getShelves()}" var="shelf">
- <rich:treeNode
- <rich:dropSupport id="shelfDND"
- acceptedTypes="album"
- dropValue="#{album}"
- dropListener="#{dndManager.processDrop}"
- reRender="mainArea">
+ <rich:treeNode>
+ <rich:dropSupport id="shelfDND" acceptedTypes="album" dropValue="#{album}" dropListener="#{dndManager.processDrop}" reRender="mainArea">
</rich:dropSupport>
- …
- </rich:treeNode>
+ ...
+ </rich:treeNode>
</rich:treeNodeAdaptor>]]></programlisting>
<para>
@@ -796,6 +845,9 @@
</section>
+ <section id="ContextMenu">
+ <title>Context Menu</title>
+ <para>Work in progress...</para>
+ </section>
-
</chapter>
15 years, 8 months
JBoss Rich Faces SVN: r13838 - in trunk/docs/common-resources/en/src/main: css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-04-24 13:56:12 -0400 (Fri, 24 Apr 2009)
New Revision: 13838
Modified:
trunk/docs/common-resources/en/src/main/archetypes/richfaces_archetype/readme.txt
trunk/docs/common-resources/en/src/main/css/html-common.css
Log:
style correction
Modified: trunk/docs/common-resources/en/src/main/archetypes/richfaces_archetype/readme.txt
===================================================================
--- trunk/docs/common-resources/en/src/main/archetypes/richfaces_archetype/readme.txt 2009-04-24 17:09:52 UTC (rev 13837)
+++ trunk/docs/common-resources/en/src/main/archetypes/richfaces_archetype/readme.txt 2009-04-24 17:56:12 UTC (rev 13838)
@@ -2,6 +2,6 @@
1. Build the archetype with "mvn clean install"
2. Cd to RichFaces_trunk\docs\. Run
mvn archetype:generate -DarchetypeGroupId=org.richfaces.docs -DarchetypeArtifactId=richfacesguide-archetype -DarchetypeVersion=3.3.1-SNAPSHOT -DartifactId=RichFacesGuide -DgroupId=org.richfaces.docs
-(artifactId � project folder name).
+(artifactId - project folder name).
When the build is finished you will see the RichFacesGuide(your project name folder).
3. Cd to RichFacesGuide (your project name folder) and "mvn clean install" to build the guide.
Modified: trunk/docs/common-resources/en/src/main/css/html-common.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html-common.css 2009-04-24 17:09:52 UTC (rev 13837)
+++ trunk/docs/common-resources/en/src/main/css/html-common.css 2009-04-24 17:56:12 UTC (rev 13838)
@@ -20,6 +20,14 @@
color:#333333;
}
+div.author{
+ margin-bottom: 20px;
+}
+
+h3.author{
+ margin: 0px;
+}
+
div.book, div.chapter, div.section{
width:1000px;
margin:0 auto;
15 years, 8 months
JBoss Rich Faces SVN: r13837 - trunk/framework/api/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-24 13:09:52 -0400 (Fri, 24 Apr 2009)
New Revision: 13837
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java
Log:
https://jira.jboss.org/jira/browse/RF-6924
Modified: trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java 2009-04-24 16:41:21 UTC (rev 13836)
+++ trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java 2009-04-24 17:09:52 UTC (rev 13837)
@@ -37,8 +37,6 @@
import org.ajax4jsf.model.Range;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.iterators.FilterIterator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.w3c.dom.NamedNodeMap;
/**
@@ -292,25 +290,28 @@
if (treeRange == null || treeRange.processNode(argumentKey)) {
StackingTreeModel rootModel = getRoot();
- rootModel.setRowKey(context, argumentKey);
-
if (argumentKey != null) {
processElement(context, dataVisitor, argument, argumentKey, last);
}
-
- //setup key in order for nested components to initialize data models
- rootModel.setRowKey(context, argumentKey);
-
+
final ShiftingDataVisitor shiftingDataVisitor = new ShiftingDataVisitor(
new Visitor1(dataVisitor));
if (treeRange == null || treeRange.processChildren(argumentKey)) {
+
+ Object savedRowKey = rootModel.getRowKey();
+ //setup key in order for nested components to initialize data models
+ rootModel.setRowKey(context, argumentKey);
Iterator<StackingTreeModel> iterator = this.getInternalModelsIterator();
+ rootModel.setRowKey(context, savedRowKey);
+
while (iterator.hasNext()) {
final StackingTreeModel model = iterator.next();
+ savedRowKey = rootModel.getRowKey();
rootModel.setRowKey(context, argumentKey);
final ExtendedDataModel scalarModel = model.getDataModel();
+ rootModel.setRowKey(context, savedRowKey);
Argument argument2 = new Argument();
argument2.listRowKey = argumentKey;
@@ -369,69 +370,21 @@
return models.values().iterator();
}
- private static final Log keyBackupVisitorLog = LogFactory.getLog(KeyBackupVisitor.class);
-
- private class KeyBackupVisitor implements DataVisitor, LastElementAware {
-
- private ExtendedDataModel dataModel;
-
- private Object rowKey;
-
- private DataVisitor dataVisitor;
-
- private boolean last;
-
- public KeyBackupVisitor(ExtendedDataModel dataModel,
- DataVisitor dataVisitor) {
- super();
-
- this.dataModel = dataModel;
- this.rowKey = dataModel.getRowKey();
- this.dataVisitor = dataVisitor;
- }
-
- public void process(FacesContext context, Object rowKey, Object argument)
- throws IOException {
-
- this.dataModel.setRowKey(this.rowKey);
- try {
- processElement(context, this.dataVisitor, argument, (TreeRowKey<?>) rowKey, this.last);
- } finally {
- try {
- this.rowKey = this.dataModel.getRowKey();
- } catch (Exception e) {
- keyBackupVisitorLog.error(e.getMessage(), e);
- }
- }
- }
-
- public void resetLastElement() {
- this.last = false;
- }
-
- public void setLastElement() {
- this.last = true;
- }
-
- }
-
public void walk(FacesContext context, DataVisitor dataVisitor,
Range range, Object rowKey, Object argument,
boolean last) throws IOException {
-
StackingTreeModel rootModel = getRoot();
- KeyBackupVisitor backupVisitor = new KeyBackupVisitor(rootModel, dataVisitor);
if (rowKey != null) {
ListRowKey listRowKey = (ListRowKey) rowKey;
StackingTreeModel treeModel = rootModel.setupKey(listRowKey, context);
- treeModel.doWalk(context, backupVisitor, range, listRowKey, argument,
+ treeModel.doWalk(context, dataVisitor, range, listRowKey, argument,
last);
} else {
- doWalk(context, backupVisitor, range,
+ doWalk(context, dataVisitor, range,
(ListRowKey) rowKey, argument, last);
}
}
15 years, 8 months
JBoss Rich Faces SVN: r13836 - in trunk/docs: userguide/en/src/main/docbook and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-24 12:41:21 -0400 (Fri, 24 Apr 2009)
New Revision: 13836
Modified:
trunk/docs/migrationguide/en/src/main/docbook/master.xml
trunk/docs/userguide/en/src/main/docbook/master.xml
Log:
RF-5725 - Versions and dates in documentation of 3.3.1 release, dates are corrested in migration and dev guide guide
Modified: trunk/docs/migrationguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/master.xml 2009-04-24 16:33:50 UTC (rev 13835)
+++ trunk/docs/migrationguide/en/src/main/docbook/master.xml 2009-04-24 16:41:21 UTC (rev 13836)
@@ -36,7 +36,7 @@
<email>ggalkin(a)exadel.com</email>
</author>
<copyright>
- <year>2008</year>
+ <year>2008, 2009</year>
<holder>Red Hat</holder>
</copyright>
<abstract>
Modified: trunk/docs/userguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/master.xml 2009-04-24 16:33:50 UTC (rev 13835)
+++ trunk/docs/userguide/en/src/main/docbook/master.xml 2009-04-24 16:41:21 UTC (rev 13836)
@@ -67,7 +67,7 @@
<title>RichFaces Developer Guide</title>
<subtitle>RichFaces framework with a huge library of rich components and skinnability support</subtitle>
<copyright>
- <year>2008</year>
+ <year>2008, 2009</year>
<holder>Red Hat</holder>
</copyright>
15 years, 8 months
JBoss Rich Faces SVN: r13835 - in trunk/docs/cdkguide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-24 12:33:50 -0400 (Fri, 24 Apr 2009)
New Revision: 13835
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
Log:
RF-5725 - Versions and dates in documentation of 3.3.1 release, versions are checked in CDK guide
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml 2009-04-24 15:43:59 UTC (rev 13834)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/pcreate.xml 2009-04-24 16:33:50 UTC (rev 13835)
@@ -14,7 +14,7 @@
At first we need to create a project for the component itself. In the library directory
<property>Sandbox</property> you just created, launch the following command (all in one line):
</para>
- <programlisting role="XML"><![CDATA[mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsf-component -DarchetypeVersion=3.3.0.GA -DartifactId=inputDate]]>
+ <programlisting role="XML"><![CDATA[mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsf-component -DarchetypeVersion=3.3.1.GA -DartifactId=inputDate]]>
</programlisting>
<para>
As is easy to see a new directory with the name <property>inputDate</property> will be created.
@@ -164,7 +164,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.3.0.GA</version>
+ <version>3.3.1.GA</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -202,7 +202,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.3.0.GA</version>
+ <version>3.3.1.GA</version>
</dependency>
</dependencies>
</project>]]>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml 2009-04-24 15:43:59 UTC (rev 13834)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml 2009-04-24 16:33:50 UTC (rev 13835)
@@ -21,7 +21,7 @@
where you have created the <emphasis role="bold"><property><inputDate></property></emphasis> component
and launch the following command (all in one line):
</para>
- <programlisting role="XML"><![CDATA[mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=3.3.0.GA -DgroupId=org.mycompany -DartifactId=inputDate-sample]]></programlisting>
+ <programlisting role="XML"><![CDATA[mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=3.3.1.GA -DgroupId=org.mycompany -DartifactId=inputDate-sample]]></programlisting>
<para>
As easy to see a new directory <property>inputDate-sample</property> is created with the predefined JSF project structure:
</para>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2009-04-24 15:43:59 UTC (rev 13834)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2009-04-24 16:33:50 UTC (rev 13835)
@@ -104,7 +104,7 @@
<listitem>
<para>
add necessary jar files
- (inputDate-1.0-SNAPSHOT.jar, jsf-api.jar, jsf-impl.jar, jstl-api-1.2.jar, richfaces-api-3.3.0.jar, richfaces-impl-3.3.0.jar, richfaces-ui-3.3.0.jar, commons-logging.jar, commons-digester.jar, commons-collections.jar, commons-beanutils.jar, common-annotations.jar)
+ (inputDate-1.0-SNAPSHOT.jar, jsf-api.jar, jsf-impl.jar, jstl-api-1.2.jar, richfaces-api-3.3.1.jar, richfaces-impl-3.3.1.jar, richfaces-ui-3.3.1.jar, commons-logging.jar, commons-digester.jar, commons-collections.jar, commons-beanutils.jar, common-annotations.jar)
into the <property>WEB-INF/lib</property> folder
</para>
</listitem>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2009-04-24 15:43:59 UTC (rev 13834)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2009-04-24 16:33:50 UTC (rev 13835)
@@ -180,7 +180,7 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.3.0.GA</version>
+ <version>3.3.1.GA</version>
</dependency>
</dependencies>
</project>]]>
15 years, 8 months