JBoss Rich Faces SVN: r1047 - in trunk/richfaces: datascroller/src/main/config/component and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-06-06 10:38:21 -0400 (Wed, 06 Jun 2007)
New Revision: 1047
Modified:
trunk/richfaces/dataTable/src/main/config/component/colgroup.xml
trunk/richfaces/dataTable/src/main/config/component/column.xml
trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
trunk/richfaces/tree/src/main/config/component/tree.xml
Log:
Modified: trunk/richfaces/dataTable/src/main/config/component/colgroup.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/colgroup.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/dataTable/src/main/config/component/colgroup.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -32,7 +32,7 @@
<property>
<name>breakBefore</name>
<classname>java.lang.String</classname>
- <description>if 'true' next column begins from the first row</description>
+ <description>if "true" next column begins from the first row</description>
</property>
<property>
<name>columnClasses</name>
Modified: trunk/richfaces/dataTable/src/main/config/component/column.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/column.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/dataTable/src/main/config/component/column.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -48,7 +48,7 @@
<property>
<name>breakBefore</name>
<classname>boolean</classname>
- <description>if 'true' next column begins from the first row</description>
+ <description>if "true" next column begins from the first row</description>
</property>
<property>
<name>headerClass</name>
Modified: trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -189,7 +189,7 @@
<property>
<name>ignoreDupResponses</name>
<classname>boolean</classname>
- <description>If true, unfinished request will be aborted on new event
+ <description>If "true", unfinished request will be aborted on new event
</description>
<defaultvalue>true</defaultvalue>
</property>
Modified: trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -111,7 +111,7 @@
<name>resizeable</name>
<classname>boolean</classname>
<description>
- if 'true' there is possibily to change component size
+ if "true" there is possibily to change component size
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -119,7 +119,7 @@
<name>moveable</name>
<classname>boolean</classname>
<description>
- if 'true' there is possibily to move component
+ if "true" there is possibily to move component
</description>
<defaultvalue>true</defaultvalue>
</property>
Modified: trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -69,7 +69,7 @@
<name>bodyClass</name>
<classname>java.lang.String</classname>
<description>
- A class that defines a style for a panel content.
+ A class that defines a style for a panel content
</description>
</property>
@@ -77,7 +77,7 @@
<name>switchType</name>
<classname>java.lang.String</classname>
<description>
- <![CDATA[Facets switch algorithm: "client", "server"(default), "ajax".]]>
+ <![CDATA[Facets switch algorithm: "client", "server"(default), "ajax"]]>
</description>
</property>
<property required="false" el="true" elonly="true">
Modified: trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -78,7 +78,7 @@
<name>ajaxSingle</name>
<classname>boolean</classname>
<description>
- if true, submit ONLY one field/link, instead of all
+ if "true", submit ONLY one field/link, instead of all
form controls
</description>
<defaultvalue>true</defaultvalue>
@@ -91,7 +91,7 @@
<name>selfRendered</name>
<classname>boolean</classname>
<description>
- If true, forces active Ajax region render response
+ If "true", forces active Ajax region render response
directly from stored components tree, bypasses page
processing. Can be used for increase performance. Also,
must be set to 'true' inside iteration components, such
@@ -135,7 +135,7 @@
<classname>java.lang.String</classname>
<description>
Name of the CSS class for a selected suggestion entry
- element (table row).
+ element (table row)
</description>
</property>
<property>
@@ -283,7 +283,7 @@
<name>shadowOpacity</name>
<classname>java.lang.String</classname>
<description>
- Attribute defines shadow opacity for suggestion content.
+ Attribute defines shadow opacity for suggestion content
</description>
</property>
<property>
@@ -302,7 +302,7 @@
<name>zindex</name>
<classname>int</classname>
<description>
- Attribute is similar to the standard HTML attribute and can specify window placement relative to the content.
+ Attribute is similar to the standard HTML attribute and can specify window placement relative to the content
</description>
<defaultvalue>200</defaultvalue>
</property>
Modified: trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -46,7 +46,7 @@
<name>validatorMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator
</description>
</property>
<property>
Modified: trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
===================================================================
--- trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -87,7 +87,7 @@
<name>validatorMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator
</description>
</property>
<property hidden="true">
@@ -183,7 +183,7 @@
<property required="false" el="true" elonly="true">
<name>panelId</name>
<classname>java.lang.String</classname>
- <description>Attribute defines Id for corresponding panel.
+ <description>Attribute defines Id for corresponding panel
</description>
</property>
@@ -369,7 +369,7 @@
<name>ajaxSingle</name>
<classname>boolean</classname>
<description>
- if true, submit ONLY one field/link, instead of all
+ if "true", submit ONLY one field/link, instead of all
form controls
</description>
</property>
Modified: trunk/richfaces/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-06 14:35:32 UTC (rev 1046)
+++ trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-06 14:38:21 UTC (rev 1047)
@@ -125,19 +125,19 @@
<property>
<name>showConnectingLines</name>
<classname>boolean</classname>
- <description>If true, connecting lines are show</description>
+ <description>If "true", connecting lines are show</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>preserveDataInRequest</name>
<classname>boolean</classname>
- <description>If true, data is preserved in a request</description>
+ <description>If "true", data is preserved in a request</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>ajaxSubmitSelection</name>
<classname>boolean</classname>
- <description>If true, an Ajax request to be submit when selecting node</description>
+ <description>If "true", an Ajax request to be submit when selecting node</description>
<defaultvalue>false</defaultvalue>
</property>
@@ -199,8 +199,8 @@
<name>toggleOnClick</name>
<classname>boolean</classname>
<description>
- If false do not toggle node state on click.
- If true, than node will be toggles on click on ether node content,
+ If "false" do not toggle node state on click.
+ If "true", than node will be toggles on click on ether node content,
or node icon.
Default value is false.
</description>
17 years, 7 months
JBoss Rich Faces SVN: r1046 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-06 10:35:32 -0400 (Wed, 06 Jun 2007)
New Revision: 1046
Modified:
trunk/docs/userguide/en/included/paint2D.xml
Log:
Modified: trunk/docs/userguide/en/included/paint2D.xml
===================================================================
--- trunk/docs/userguide/en/included/paint2D.xml 2007-06-06 14:19:17 UTC (rev 1045)
+++ trunk/docs/userguide/en/included/paint2D.xml 2007-06-06 14:35:32 UTC (rev 1046)
@@ -96,25 +96,31 @@
role="italic"><property>"data"</property></emphasis> attributes.</para>
<para>Example:</para>
<programlisting role="JAVA"><![CDATA[paintBean.java:
- public void paint(Graphics2D g2, Object obj) {
+
+ public void paint(Graphics2D g2, Object obj) {
// code that gets data from the data Bean (PaintData)
- PaintData data = (PaintData) obj;
- //...
- g2.drawRect(0, 0, data.Width, data.Height);
- // a code drawing a rectangle
- //...
- // some more code placing graphical data into g2 stream below
- }
- dataBean.java:
- public class PaintData implements Serializable{
- private static final long serialVersionUID = 1L;
- Integer Width=100;
- Integer Height=50;
- ...}
- page.xhtml:
- ...
- <rich:paint2D paint="#{paint2D.paint}" data="#{paint2DModel.data}"/>
- ... ]]></programlisting>
+ PaintData data = (PaintData) obj;
+ ...
+ // a code drawing a rectangle
+ g2.drawRect(0, 0, data.Width, data.Height);
+ ...
+ // some more code placing graphical data into g2 stream below
+ }
+
+dataBean.java:
+
+ public class PaintData implements Serializable{
+ private static final long serialVersionUID = 1L;
+ Integer Width=100;
+ Integer Height=50;
+ ...
+ }
+
+page.xhtml:
+...
+ <rich:paint2D paint="#{paint2D.paint}" data="#{paint2DModel.data}"/>
+...
+]]></programlisting>
</section>
<section>
17 years, 7 months
JBoss Rich Faces SVN: r1045 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-06 10:19:17 -0400 (Wed, 06 Jun 2007)
New Revision: 1045
Modified:
trunk/docs/userguide/en/included/modalPanel.xml
Log:
added details of usage
Modified: trunk/docs/userguide/en/included/modalPanel.xml
===================================================================
--- trunk/docs/userguide/en/included/modalPanel.xml 2007-06-06 13:31:40 UTC (rev 1044)
+++ trunk/docs/userguide/en/included/modalPanel.xml 2007-06-06 14:19:17 UTC (rev 1045)
@@ -8,54 +8,54 @@
</keywordset>
</sectioninfo>
-
- <table>
- <title>Component identification parameters</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Name</entry>
+ <table>
+ <title>Component identification parameters</title>
- <entry>Value</entry>
- </row>
- </thead>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
- <tbody>
- <row>
- <entry>component-type</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
- <entry>org.richfaces.ModalPanel</entry>
- </row>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
- <row>
- <entry>component-class</entry>
+ <entry>org.richfaces.ModalPanel</entry>
+ </row>
- <entry>org.richfaces.component.html.ModalPanel</entry>
- </row>
+ <row>
+ <entry>component-class</entry>
- <row>
- <entry>component-family</entry>
+ <entry>org.richfaces.component.html.ModalPanel</entry>
+ </row>
- <entry>org.richfaces.ModalPanel</entry>
- </row>
+ <row>
+ <entry>component-family</entry>
- <row>
- <entry>renderer-type</entry>
+ <entry>org.richfaces.ModalPanel</entry>
+ </row>
- <entry>org.richfaces.ModalPanelRenderer</entry>
- </row>
+ <row>
+ <entry>renderer-type</entry>
- <row>
- <entry>tag-class</entry>
+ <entry>org.richfaces.ModalPanelRenderer</entry>
+ </row>
- <entry>org.richfaces.taglib.ModalPanelTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.ModalPanelTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
<section>
<title>Creating the Component with a Page Tag</title>
@@ -90,9 +90,8 @@
<section>
<title>Details of Usage</title>
- <para>The component is defined as a panel with some content inside that
- displays its content as a modal dialog. To call it and to close it, the
- client API for the window is used.</para>
+ <para>The component is defined as a panel with some content inside that displays its content as
+ a modal dialog. To call it and to close it, the client API for the window is used.</para>
<table>
<title>Functions description</title>
@@ -122,11 +121,15 @@
</tgroup>
</table>
-<important><title>New:</title><para>In order to avoid a bug in IE, the root node of the dialog is moved on the top of a DOM tree. However, you should have a separate form inside the modal panel if you want to perform submits from this panel.
-</para></important>
+ <important>
+ <title>New:</title>
+ <para>In order to avoid a bug in IE, the root node of the dialog is moved on the top of a DOM
+ tree. However, you should have a separate form inside the modal panel if you want to perform
+ submits from this panel. </para>
+ </important>
- <para>It's possible to add a "header" facet to the component to set the
- content for the header.</para>
+ <para>It's possible to add a "header" facet to the component to set
+ the content for the header.</para>
<programlisting role="XML">...
<form jsfc="h:form" id="form">
@@ -142,22 +145,21 @@
...
</programlisting>
- <para>This defines a window with a particular size and ID. It includes one
- "Open" link. Clicking on this link makes the modal window content
- appear.</para>
+ <para>This defines a window with a particular size and ID. It includes one "Open" link. Clicking
+ on this link makes the modal window content appear.</para>
<figure>
<title>ModalPanel with links</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/modalpanel2.gif" />
+ <imagedata fileref="images/modalpanel2.gif"/>
</imageobject>
</mediaobject>
</figure>
- <para>A facet named "controls" can be added to the component to place
- control elements on a header.</para>
+ <para>A facet named "controls" can be added to the component to place control
+ elements on a header.</para>
<programlisting role="XML">
<rich:modalPanel id="panel">
@@ -176,50 +178,57 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/modalpanel3.gif" />
+ <imagedata fileref="images/modalpanel3.gif"/>
</imageobject>
</mediaobject>
</figure>
- <para>To manage the placement of inserted windows, use the <emphasis
- role="italic">
+ <para>To manage the placement of inserted windows, use the <emphasis role="italic">
<property>"zindex"</property>
- </emphasis> attribute that is similar to the standard HTML attribute and
- can specify window placement relative to the content.</para>
+ </emphasis> attribute that is similar to the standard HTML attribute and can specify window
+ placement relative to the content.</para>
- <para>To manage window placement relative to the component, there are
- <emphasis role="italic">
+ <para>To manage window placement relative to the component, there are <emphasis role="italic">
<property>"left"</property>
</emphasis> and <emphasis role="italic">
<property>"top"</property>
- </emphasis> attributes defining a window shifting relative to the
- top-left corner of the window.</para>
+ </emphasis> attributes defining a window shifting relative to the top-left corner of the
+ window.</para>
- <para>Modal windows can also support resize and move operations on the
- client side. To allow or disallow these operations, set the <emphasis
- role="italic">
+ <para>Modal windows can also support resize and move operations on the client side. To allow or
+ disallow these operations, set the <emphasis role="italic">
<property>"resizeable"</property>
</emphasis> and <emphasis role="italic">
<property>"moveable"</property>
- </emphasis> attributes to "true" or "false" values. Window resizing is
- also limited by <emphasis role="italic">
+ </emphasis> attributes to "true" or "false" values. Window
+ resizing is also limited by <emphasis role="italic">
<property>"minWidth"</property>
</emphasis> and <emphasis role="italic">
<property>"minHeight"</property>
</emphasis> attributes specifying the minimal window sizes.</para>
+ <para> You can pass your parameters during modalPanel opening or closing. This passing could be
+ performed in the following way: </para>
+ <programlisting role="JAVA">Richfaces.showModalPanel('panelId', {left: auto}, {param1: value1});</programlisting>
+ <para> Thus, except the standard modalPanel parameters you can pass any of your own parameters. </para>
+ <para> Also modalPanel allows to handle its own opening and closing events on the client side.
+ The "onshow" and "onclose" attributes are used in this
+ case. </para>
+ <para> The following example shows how on the client side to define opening and closing event
+ handling in such a way that your own parameters could also be obtained: </para>
+ <programlisting role="JAVA">onshow="alert(event.parameters.param1)"</programlisting>
+ <para> Here, during modalPanel opening the value of a passing parameter is output. </para>
+
</section>
<section>
<title>Look-and-Feel Customization</title>
- <para>For implementing skinability the components use a <emphasis
- role="italic">
+ <para>For implementing skinability the components use a <emphasis role="italic">
<property>style class redefinition method</property>
- </emphasis>. Default style classes are mapped on <emphasis
- role="italic"><property>skin parameters</property>.</emphasis></para>
+ </emphasis>. Default style classes are mapped on <emphasis role="italic"><property>skin
+ parameters</property>.</emphasis></para>
- <para>There are two ways to redefine the appearance of all modal panels at
- once:</para>
+ <para>There are two ways to redefine the appearance of all modal panels at once:</para>
<itemizedlist>
<listitem>Redefine the corresponding skin parameters</listitem>
@@ -372,13 +381,12 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/modalpanel4.gif" />
+ <imagedata fileref="images/modalpanel4.gif"/>
</imageobject>
</mediaobject>
</figure>
- <para>The screenshot shows the classes names for defining different
- elements.</para>
+ <para>The screenshot shows the classes names for defining different elements.</para>
<table>
<title>Class names</title>
@@ -388,22 +396,22 @@
<row>
<entry>rich-mpnl-pnl-h</entry>
- <entry>This class defines the header style. It's applied to the
- header elements of all panels.</entry>
+ <entry>This class defines the header style. It's applied to the header elements
+ of all panels.</entry>
</row>
<row>
<entry>rich-mpnl-pnl-text</entry>
- <entry>This class defines the header content style. It's applied
- to the header elements of all panels.</entry>
+ <entry>This class defines the header content style. It's applied to the header
+ elements of all panels.</entry>
</row>
<row>
<entry>rich-mpnl-pnl-body</entry>
- <entry>This class defines the style for the content inside a
- panel. It's applied to the elements inside panels.</entry>
+ <entry>This class defines the style for the content inside a panel. It's
+ applied to the elements inside panels.</entry>
</row>
<row>
@@ -415,4 +423,4 @@
</tgroup>
</table>
</section>
-</section>
\ No newline at end of file
+</section>
17 years, 7 months
JBoss Rich Faces SVN: r1044 - in trunk: richfaces/dataTable/src/main/config/component and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-06-06 09:31:40 -0400 (Wed, 06 Jun 2007)
New Revision: 1044
Modified:
trunk/docs/userguide/en/included/dropSupport.xml
trunk/richfaces/dataTable/src/main/config/component/dataList.xml
trunk/richfaces/dataTable/src/main/config/component/dataTable.xml
trunk/richfaces/dataTable/src/main/config/component/subTable.xml
trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml
trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml
trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml
trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml
trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
trunk/richfaces/paint2D/src/main/config/component/paint2D.xml
trunk/richfaces/panelbar/src/main/config/component/panelbar.xml
trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
trunk/richfaces/tree/src/main/config/component/tree.xml
Log:
Modified: trunk/docs/userguide/en/included/dropSupport.xml
===================================================================
--- trunk/docs/userguide/en/included/dropSupport.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/docs/userguide/en/included/dropSupport.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -106,7 +106,7 @@
<rich:dropSupport acceptedTypes="[iconsDragged, textDragged]" typeMapping="{iconsDragged: DropIcon}">
<rich:dndParam name="DropIcon">
<h:graphicImage value="/images/drop-icon.png"/>
- </rich:dndParam>
+ </rich:dndParam>
...
</programlisting>
Modified: trunk/richfaces/dataTable/src/main/config/component/dataList.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/dataList.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/dataTable/src/main/config/component/dataList.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -34,7 +34,7 @@
<property>
<name>type</name>
<classname>java.lang.String</classname>
- <description>Corresponds to the HTML DL type attribute.
+ <description>Corresponds to the HTML DL type attribute
</description>
</property>
<property>
@@ -57,7 +57,7 @@
<name>stateVar</name>
<classname>java.lang.String</classname>
<description>
- The attribute provides access to a component state on the client side.
+ The attribute provides access to a component state on the client side
</description>
</property>
<property>
@@ -112,7 +112,7 @@
<property>
<name>type</name>
<classname>java.lang.String</classname>
- <description>Corresponds to the HTML OL type attribute.
+ <description>Corresponds to the HTML OL type attribute
</description>
</property>
<property>
@@ -139,7 +139,7 @@
<name>stateVar</name>
<classname>java.lang.String</classname>
<description>
- The attribute provides access to a component state on the client side.
+ The attribute provides access to a component state on the client side
</description>
</property>
<property>
Modified: trunk/richfaces/dataTable/src/main/config/component/dataTable.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/dataTable.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/dataTable/src/main/config/component/dataTable.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -40,7 +40,7 @@
<property>
<name>columns</name>
<classname>int</classname>
- <description>Quantity of columns.
+ <description>Quantity of columns
</description>
</property>
<property>
@@ -71,7 +71,7 @@
In addition to the standard pixel, percentage, and relative values,
this attribute allows the special form "0*" (zero asterisk) which
means that the width of the each column in the group should be the minimum width necessary
- to hold the column's contents. This implies that a column's entire contents must be known before its width may be correctly computed. Authors should be aware that specifying "0*" will prevent visual user agents from rendering a table incrementally.
+ to hold the column's contents. This implies that a column's entire contents must be known before its width may be correctly computed. Authors should be aware that specifying "0*" will prevent visual user agents from rendering a table incrementally
]]></description>
</property>
<property>
@@ -87,7 +87,7 @@
<property>
<name>headerClass</name>
<classname>java.lang.String</classname>
- <description>Space-separated list of CSS style class(es) that are be applied to header for this component.
+ <description>Space-separated list of CSS style class(es) that are be applied to header for this component
</description>
</property>
<property>
@@ -106,7 +106,7 @@
<name>rowKey</name>
<classname>java.lang.String</classname>
<description>
- RowKey is a representation of an identifier for a specific data row.
+ RowKey is a representation of an identifier for a specific data row
</description>
</property>
<property>
@@ -118,14 +118,14 @@
<name>stateVar</name>
<classname>java.lang.String</classname>
<description>
- The attribute provides access to a component state on the client side.
+ The attribute provides access to a component state on the client side
</description>
</property>
<property>
<name>value</name>
<classname>java.lang.String</classname>
<description>
- The current value for this component.
+ The current value for this component
</description>
</property>
<!-- rows javascript events -->
@@ -133,43 +133,43 @@
<name>onRowClick</name>
<classname>java.lang.String</classname>
<description>
- HTML: a script expression; a pointer button is clicked on row.
+ HTML: a script expression; a pointer button is clicked on row
</description>
</property>
<property>
<name>onRowDblClick</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is double-clicked on row.
+ <description>HTML: a script expression; a pointer button is double-clicked on row
</description>
</property>
<property>
<name>onRowMouseUp</name>
<classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is released on row.
+ <description>HTML: script expression; a pointer button is released on row
</description>
</property>
<property>
<name>onRowMouseDown</name>
<classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is pressed down on row.
+ <description>HTML: script expression; a pointer button is pressed down on row
</description>
</property>
<property>
<name>onRowMouseOver</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved onto of row.
+ <description>HTML: a script expression; a pointer is moved onto of row
</description>
</property>
<property>
<name>onRowMouseOut</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved away of row.
+ <description>HTML: a script expression; a pointer is moved away of row
</description>
</property>
<property>
<name>onRowMouseMove</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved within of row.
+ <description>HTML: a script expression; a pointer is moved within of row
</description>
</property>
</component>
Modified: trunk/richfaces/dataTable/src/main/config/component/subTable.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/subTable.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/dataTable/src/main/config/component/subTable.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -56,21 +56,21 @@
<name>stateVar</name>
<classname>java.lang.String</classname>
<description>
- The attribute provides access to a component state on the client side.
+ The attribute provides access to a component state on the client side
</description>
</property>
<property>
<name>rowKey</name>
<classname>java.lang.String</classname>
<description>
- RowKey is a representation of an identifier for a specific data row.
+ RowKey is a representation of an identifier for a specific data row
</description>
</property>
<property>
<name>value</name>
<classname>java.lang.String</classname>
<description>
- The current value for this component.
+ The current value for this component
</description>
</property>
<!--
@@ -87,43 +87,43 @@
<name>onRowClick</name>
<classname>java.lang.String</classname>
<description>
- HTML: a script expression; a pointer button is clicked on row.
+ HTML: a script expression; a pointer button is clicked on row
</description>
</property>
<property>
<name>onRowDblClick</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is double-clicked on row.
+ <description>HTML: a script expression; a pointer button is double-clicked on row
</description>
</property>
<property>
<name>onRowMouseUp</name>
<classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is released on row.
+ <description>HTML: script expression; a pointer button is released on row
</description>
</property>
<property>
<name>onRowMouseDown</name>
<classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is pressed down on row.
+ <description>HTML: script expression; a pointer button is pressed down on row
</description>
</property>
<property>
<name>onRowMouseOver</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved onto of row.
+ <description>HTML: a script expression; a pointer is moved onto of row
</description>
</property>
<property>
<name>onRowMouseOut</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved away of row.
+ <description>HTML: a script expression; a pointer is moved away of row
</description>
</property>
<property>
<name>onRowMouseMove</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved within of row.
+ <description>HTML: a script expression; a pointer is moved within of row
</description>
</property>
</component>
Modified: trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -32,13 +32,13 @@
<property required="true">
<name>name</name>
<classname>java.lang.String</classname>
- <description>A name of this parameter.
+ <description>A name of this parameter
</description>
</property>
<property>
<name>type</name>
<classname>java.lang.String</classname>
- <description>This attribute defines parameter functionality. Possible values are "drag", "drop" and "default".
+ <description>This attribute defines parameter functionality. Possible values are "drag", "drop" and "default"
</description>
<defaultvalue>"default"</defaultvalue>
</property>
@@ -46,7 +46,7 @@
<name>value</name>
<classname>java.lang.Object</classname>
<description>
- The current value for this component.
+ The current value for this component
</description>
</property>
</component>
Modified: trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -44,7 +44,7 @@
<name>dragListener</name>
<classname>javax.faces.el.MethodBinding</classname>
<description>
- MethodBinding representing an action listener method that will be notified afrer drag operation.
+ MethodBinding representing an action listener method that will be notified afrer drag operation
</description>
<methodargs>org.ajax4jsf.dnd.event.DragEvent.class</methodargs>
</property>
@@ -52,7 +52,7 @@
<name>disableDefault</name>
<classname>java.lang.String</classname>
<description>
- Disable default action for target event (append "return false;" to javascript ).
+ Disable default action for target event (append "return false;" to JavaScript)
</description>
</property>
<property>
Modified: trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -45,7 +45,7 @@
<name>disableDefault</name>
<classname>java.lang.String</classname>
<description>
- Disable default action for target event (append "return false;" to javascript ).
+ Disable default action for target event (append "return false;" to JavaScript)
</description>
</property>
<property>
Modified: trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -94,8 +94,7 @@
<property>
<name> showBoundaryValues </name>
<classname>boolean</classname>
- <description>If the min/max values are shown on the right/left borders of a control.
- Default=true;
+ <description>If the min/max values are shown on the right/left borders of a control. Default=true
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -135,7 +134,7 @@
<property>
<name> onerror </name>
<classname>java.lang.String</classname>
- <description>This error is called when a non-number value or a number value that is out of the range is input.
+ <description>This error is called when a non-number value or a number value that is out of the range is input
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -149,7 +148,7 @@
<property>
<name> style </name>
<classname>java.lang.String</classname>
- <description>Styles for main div element of the slider control.
+ <description>Styles for main div element of the slider control
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -162,7 +161,7 @@
<property>
<name> barStyle </name>
<classname>java.lang.String</classname>
- <description>Style for a slider control line.
+ <description>Style for a slider control line
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -187,7 +186,7 @@
<property>
<name> tipStyle </name>
<classname>java.lang.String</classname>
- <description>A style for the tool tip element.
+ <description>A style for the tool tip element
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -201,21 +200,21 @@
<name>converterMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter
</description>
</property>
<property>
<name>requiredMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used
</description>
</property>
<property>
<name>validatorMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator
</description>
</property>
&ui_component_attributes;
Modified: trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -41,21 +41,21 @@
<name>converterMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter
</description>
</property>
<property>
<name>requiredMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used
</description>
</property>
<property>
<name>validatorMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator
</description>
</property>
<property>
Modified: trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -44,7 +44,7 @@
<property>
<name>headerClass</name>
<classname>java.lang.String</classname>
- <description>CSS style(s) is/are to be applied to component header when this component is rendered.
+ <description>CSS style(s) is/are to be applied to component header when this component is rendered
</description>
<defaultvalue>""</defaultvalue>
</property>
@@ -52,7 +52,7 @@
<property>
<name>controlsClass</name>
<classname>java.lang.String</classname>
- <description>CSS style(s) is/are to be applied to component controls when this component is rendered.
+ <description>CSS style(s) is/are to be applied to component controls when this component is rendered
</description>
<defaultvalue>""</defaultvalue>
</property>
@@ -61,14 +61,14 @@
<name>width</name>
<classname>int</classname>
<description>
- Attribute defines width of component.
+ Attribute defines width of component
</description>
<defaultvalue>300</defaultvalue>
</property>
<property>
<name>height</name>
<classname>int</classname>
- <description>Attribute defines height of component.
+ <description>Attribute defines height of component
</description>
<defaultvalue>200</defaultvalue>
</property>
@@ -77,7 +77,7 @@
<name>minWidth</name>
<classname>int</classname>
<description>
- Attribute defines min width of component.
+ Attribute defines min width of component
</description>
<defaultvalue>-1</defaultvalue>
</property>
@@ -85,7 +85,7 @@
<name>minHeight</name>
<classname>int</classname>
<description>
- Attribute defines min height of component.
+ Attribute defines min height of component
</description>
<defaultvalue>-1</defaultvalue>
</property>
@@ -94,7 +94,7 @@
<name>left</name>
<classname>java.lang.String</classname>
<description>
- Attribute defines X position of component left-top corner.
+ Attribute defines X position of component left-top corner
</description>
<defaultvalue>"auto"</defaultvalue>
</property>
@@ -102,7 +102,7 @@
<name>top</name>
<classname>java.lang.String</classname>
<description>
- Attribute defines Y position of component left-top corner.
+ Attribute defines Y position of component left-top corner
</description>
<defaultvalue>"auto"</defaultvalue>
</property>
@@ -111,7 +111,7 @@
<name>resizeable</name>
<classname>boolean</classname>
<description>
- if 'true' there is possibily to change component size.
+ if 'true' there is possibily to change component size
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -119,7 +119,7 @@
<name>moveable</name>
<classname>boolean</classname>
<description>
- if 'true' there is possibily to move component.
+ if 'true' there is possibily to move component
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -128,7 +128,7 @@
<name>zindex</name>
<classname>int</classname>
<description>
- Attribute is similar to the standard HTML attribute and can specify window placement relative to the content.
+ Attribute is similar to the standard HTML attribute and can specify window placement relative to the content
</description>
<defaultvalue>100</defaultvalue>
</property>
Modified: trunk/richfaces/paint2D/src/main/config/component/paint2D.xml
===================================================================
--- trunk/richfaces/paint2D/src/main/config/component/paint2D.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/paint2D/src/main/config/component/paint2D.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -52,7 +52,7 @@
Value calculated at render time and stored in Image URI (as part of cache Key),
at paint time passed to a paint method. It can be used for updating cache at change of image generating
conditions, and for creating paint beans as "Lightweight" pattern components (request scope).
- IMPORTANT: Since serialized data stored in URI, avoid using big objects.
+ IMPORTANT: Since serialized data stored in URI, avoid using big objects
]]></description>
</property>
<property elonly="true">
@@ -60,7 +60,7 @@
<classname>javax.faces.el.MethodBinding</classname>
<description><![CDATA[
The method calls expression to paint Image on prepared Buffered image. It must have two parameters with a type of java.awt.Graphics2D (graphics to paint) and Object (restored from URI "data" property).
- For painting used 32-bit RGBA color model (for 8-bit images used Diffusion filtration before sending).
+ For painting used 32-bit RGBA color model (for 8-bit images used Diffusion filtration before sending)
]]></description>
<methodargs>java.awt.Graphics2D.class,java.lang.Object.class</methodargs>
</property>
@@ -87,7 +87,7 @@
<description>Supported (or not) client/server caching for generated images.
Caching on client supported by properly sending and processing of HTTP headers (Last-Modified, Expires, If-Modified-Since, etc.)
Server-side caching is supported by application-scope object cache.
- For build of cache key use "value" attribute, serialized to URI.
+ For build of cache key use "value" attribute, serialized to URI
</description>
</property>
<property>
@@ -98,7 +98,7 @@
Hex colors can be used, as well as common color names.
Invalid values are treated as transparent.
Note, that JPEG format doesn't support transparency, and transparent background is painted black.
- Also note, that several browsers (e.g. IE6) do not support PNG transparency.]]></description>
+ Also note, that several browsers (e.g. IE6) do not support PNG transparency]]></description>
<defaultvalue>"transparent"</defaultvalue>
</property>
<property hidden="true">
Modified: trunk/richfaces/panelbar/src/main/config/component/panelbar.xml
===================================================================
--- trunk/richfaces/panelbar/src/main/config/component/panelbar.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/panelbar/src/main/config/component/panelbar.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -33,21 +33,21 @@
<name>converterMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter
</description>
</property>
<property>
<name>requiredMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used
</description>
</property>
<property>
<name>validatorMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator
</description>
</property>
<property>
@@ -96,7 +96,7 @@
<name>converter</name>
<classname>javax.faces.convert.Converter</classname>
<description>
- Id of Converter to be used or reference to a Converter.
+ Id of Converter to be used or reference to a Converter
</description>
</property>
<property hidden="true">
Modified: trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -32,14 +32,14 @@
<name>converterMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter
</description>
</property>
<property>
<name>requiredMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used
</description>
</property>
<property>
Modified: trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
===================================================================
--- trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -73,14 +73,14 @@
<name>converterMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the converter message, replacing any message that comes from the converter
</description>
</property>
<property>
<name>requiredMessage</name>
<classname>java.lang.String</classname>
<description>
- A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used.
+ A ValueExpression enabled attribute that, if present, will be used as the text of the validation message for the "required" facility, if the "required" facility is used
</description>
</property>
<property>
Modified: trunk/richfaces/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-06 12:56:22 UTC (rev 1043)
+++ trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-06 13:31:40 UTC (rev 1044)
@@ -57,7 +57,7 @@
<name>stateVar</name>
<classname>java.lang.String</classname>
<description>
- The attribute provides access to a component state on the client side.
+ The attribute provides access to a component state on the client side
</description>
</property>
<property>
17 years, 7 months
JBoss Rich Faces SVN: r1043 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-06 08:56:22 -0400 (Wed, 06 Jun 2007)
New Revision: 1043
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/AjaxFunctionBuilder.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/AjaxFunctionBuilder.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/AjaxFunctionBuilder.java 2007-06-06 12:56:06 UTC (rev 1042)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/AjaxFunctionBuilder.java 2007-06-06 12:56:22 UTC (rev 1043)
@@ -17,6 +17,8 @@
private static final JSReference request = new JSReference("request");
private static final JSReference event = new JSReference("event");
private static final JSReference data = new JSReference("data");
+ public static final int SORT = 0;
+ public static final int SCROLL = 1;
public static JSFunction createFunction(String name) {
JSFunction function = new JSFunction(name);
@@ -27,12 +29,20 @@
return function;
}
- public static JSFunctionDefinition getOnDataReady(FacesContext context, UIScrollableGrid grid, RendererBase renderer) {
+ public static JSFunctionDefinition getOnComplete(FacesContext context, UIScrollableGrid grid, RendererBase renderer, int type) {
ScrollableGridBaseRenderer sr = (ScrollableGridBaseRenderer)renderer;
+ JSFunction function = null;
- JSFunction function = createFunction(sr.getJavaScriptVarName(context, grid) + ".onCompleteGridInvalidation");
-// JSFunction function = createFunction(sr.getJavaScriptVarName(context, grid) + ".getModel().fireEvent");
+ switch (type) {
+ case SCROLL:
+ function = createFunction(sr.getJavaScriptVarName(context, grid) + ".onScrollComplete");
+ break;
+ case SORT:
+ function = createFunction(sr.getJavaScriptVarName(context, grid) + ".onSortComplete");
+ break;
+ }
+
JSFunctionDefinition functionDefinition = new JSFunctionDefinition();
functionDefinition.addToBody(function);
functionDefinition.addParameter(request);
@@ -41,6 +51,4 @@
return functionDefinition;
}
-
-
}
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-06-06 12:56:06 UTC (rev 1042)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-06-06 12:56:22 UTC (rev 1043)
@@ -213,7 +213,7 @@
* @return Returns the rowIndex.
*/
public int getRowIndex() {
- if(_rowIndex >= _grid.getRows()){
+ if(_rowIndex >= _grid.getDefaultRows()){
_rowIndex = 0;
}
return _rowIndex;
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-06 12:56:06 UTC (rev 1042)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-06 12:56:22 UTC (rev 1043)
@@ -8,7 +8,6 @@
import javax.faces.application.Application;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIOutput;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
@@ -30,10 +29,10 @@
import org.richfaces.component.UIScrollableGridColumn;
import org.richfaces.event.sort.SortEvent;
import org.richfaces.model.selection.ClientSelection;
-import org.richfaces.model.selection.ClientSelectionConverter;
import org.richfaces.model.selection.Selection;
import org.richfaces.model.selection.SimpleSelection;
import org.richfaces.renderkit.CompositeRenderer;
+import org.richfaces.renderkit.html.response.Options;
import org.richfaces.utils.TemplateLoader;
@@ -63,7 +62,6 @@
private static final String CLIENT_SELECTION = "clientSelection";
-
private final Log log = LogFactory.getLog(ScrollableGridBaseRenderer.class);
private final ColumnVisitor columnsWidthCounter = new ColumnVisitor(){
@@ -248,8 +246,6 @@
String row_id = null;
-
-
System.out.println("row data index: " + grid.getRowIndex());
System.out.println("rows count " + grid.getRows());
System.out.println("local rows " + state.getRowIndex());
@@ -413,7 +409,7 @@
JSFunction function = AjaxRendererUtils.buildAjaxFunction(grid, context);
Map options = AjaxRendererUtils.buildEventOptions(context, grid);
- options.put("oncomplete", AjaxFunctionBuilder.getOnDataReady(context, grid, this));
+ options.put("oncomplete", AjaxFunctionBuilder.getOnComplete(context, grid, this, AjaxFunctionBuilder.SCROLL));
function.addParameter(options);
String completeFunction = function.toScript()+"; return false;";
@@ -439,7 +435,7 @@
options.put("parameters", parametersMap);
JSFunction function = AjaxRendererUtils.buildAjaxFunction(grid, context);
- options.put("oncomplete", AjaxFunctionBuilder.getOnDataReady(context, grid, this));
+ options.put("oncomplete", AjaxFunctionBuilder.getOnComplete(context, grid, this, AjaxFunctionBuilder.SORT));
function.addParameter(options);
String completeFunction = function.toScript() + "; return false;";
@@ -678,10 +674,22 @@
ajaxContext.setResponseData(grid.getResponseData());
ajaxContext.getAjaxRenderedAreas().remove(grid.getClientId(context));
-
+ Options options = createOptions(grid);
+ ajaxContext.getResponseDataMap().put("options", options);
grid.setRows(grid.getDefaultRows());
}
+ private Options createOptions(UIScrollableGrid grid){
+
+ int index = grid.getRowIndex();
+ int startRow = ((Integer)grid.getAttributes().get(CLIENT_ROW_KEY)).intValue();
+ int count = grid.getRows();
+
+ Options options = new Options(index, startRow, count);
+
+ return options;
+ }
+
public void encodeChildren(FacesContext context, UIComponent component
) throws IOException {
17 years, 7 months
JBoss Rich Faces SVN: r1042 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-06 08:56:06 -0400 (Wed, 06 Jun 2007)
New Revision: 1042
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-06 12:55:57 UTC (rev 1041)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-06 12:56:06 UTC (rev 1042)
@@ -228,48 +228,25 @@
Event.observe(grid.eventOnSort, "on sort", onSorted);
},
- onCompleteGridInvalidation : function(request, event, data){
- var theDoc = document;
- var getEl = theDoc.getElementById;
- var options = dataModel.getCurrentOptions();
- var rowCount = grid.getBody().templFrozen.getElement().rows.length;
- var startRow = options.startRow;
- var count = options.count;
- var row, id, rowindex, i, el;
- for(i=0; i<count; i++) {
- rowindex = startRow + i;
- if(rowindex >= rowCount) rowindex -= rowCount;
- id = '#{clientId}' + ":f:row_" + rowindex;
- row = request.getElementById(id);
+ onSortComplete : function(request, event, data){
+ var options = request.getJSON("options");
+ var clientid = '#{clientId}';
+ AjaxUpdater.updateRows(options,request,grid, clientid);
- if(ClientUILib.isIE) {
- el = getEl(id);
- AjaxUpdater.updateTr(el,row.xml);
- }
- else {
- el = theDoc.getElementById(id);
- AjaxUpdater.updateTr(el,row.innerHTML);
- }
-
- id = '#{clientId}' + ":n:row_" + rowindex;
- row = request.getElementById(id);
- if(ClientUILib.isIE) {
- el = getEl(id);
- AjaxUpdater.updateTr(el,row.xml);
- }
- else {
- el = theDoc.getElementById(id);
- AjaxUpdater.updateTr(el,row.innerHTML);
- }
- }
-
- dataModel.eventDataReady.fire(options);
- }
+ },
+
+ onScrollComplete : function(request, event, data,clientid){
+ var options = dataModel.getCurrentOptions();
+ var clientid = '#{clientId}';
+ AjaxUpdater.updateRows(options,request,grid,clientid);
+ }
}
+
}();
+
+
#{this:getScriptContributions(context, component)};
Event.observe(window, 'load', #{this:getJavaScriptVarName(context, component)}.init);
-
// ]]>
</script>
17 years, 7 months
JBoss Rich Faces SVN: r1041 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-06 08:55:57 -0400 (Wed, 06 Jun 2007)
New Revision: 1041
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-06-06 12:55:38 UTC (rev 1040)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-06-06 12:55:57 UTC (rev 1041)
@@ -41,7 +41,7 @@
var="issues"
frozenColCount="3"
first="0"
- rows="40"
+ defaultRows="40"
width="800px"
height="500px">
17 years, 7 months
JBoss Rich Faces SVN: r1040 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-06 08:55:38 -0400 (Wed, 06 Jun 2007)
New Revision: 1040
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-06 12:55:27 UTC (rev 1039)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-06 12:55:38 UTC (rev 1040)
@@ -1,4 +1,5 @@
var AjaxUpdater = {
+
updateTr:function(trObj, innerHTML){
if(trObj) {
if(ClientUILib.isIE) {
@@ -24,5 +25,47 @@
trObj.innerHTML = innerHTML;
}
}
+ },
+
+ updateRows: function(options,request,grid,clientid){
+ var theDoc = document;
+ var getEl = theDoc.getElementById;
+ var localOptions = options;
+ var rowCount = grid.getBody().templFrozen.getElement().rows.length;
+ var startRow = localOptions.startRow;
+ var count = localOptions.count;
+ var row, id, rowindex, i, el;
+ var dataModel = grid.dataModel;
+ var baseid = clientid;
+
+ for(i=0; i<count; i++) {
+ rowindex = startRow + i;
+ if(rowindex >= rowCount){
+ rowindex -= rowCount;
+ }
+
+ id = baseid + ":f:row_" + rowindex;
+ row = request.getElementById(id);
+
+ if(ClientUILib.isIE) {
+ el = getEl(id);
+ this.updateTr(el,row.xml);
+ }else {
+ el = theDoc.getElementById(id);
+ this.updateTr(el,row.innerHTML);
+ }
+
+ id = baseid + ":n:row_" + rowindex;
+ row = request.getElementById(id);
+ if(ClientUILib.isIE) {
+ el = getEl(id);
+ this.updateTr(el,row.xml);
+ }else {
+ el = theDoc.getElementById(id);
+ this.updateTr(el,row.innerHTML);
+ }
+ }
+
+ dataModel.eventDataReady.fire(localOptions);
}
}
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r1039 - in trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html: response and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-06 08:55:27 -0400 (Wed, 06 Jun 2007)
New Revision: 1039
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/response/
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/response/Options.java
Log:
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/response/Options.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/response/Options.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/response/Options.java 2007-06-06 12:55:27 UTC (rev 1039)
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html.response;
+
+/**
+ * @author Anton Belevich
+ * Class for storing response options
+ */
+public class Options {
+
+ private int index;
+
+ private int startRow;
+
+ private int count;
+
+
+
+ public Options(int index, int startRow, int count) {
+
+ this.index = index;
+
+ this.startRow = startRow;
+
+ this.count = count;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public void setCount(int count) {
+ this.count = count;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ public int getStartRow() {
+ return startRow;
+ }
+
+ public void setStartRow(int startRow) {
+ this.startRow = startRow;
+ }
+}
17 years, 7 months
JBoss Rich Faces SVN: r1038 - in trunk/sandbox/scrollable-grid/src/main: java/org/richfaces/model and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-06 08:04:15 -0400 (Wed, 06 Jun 2007)
New Revision: 1038
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SelectionRange.java
Modified:
trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SimpleSelection.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
selection first steps
Modified: trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-06-06 11:28:57 UTC (rev 1037)
+++ trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-06-06 12:04:15 UTC (rev 1038)
@@ -107,4 +107,9 @@
<template>org/richfaces/scrollable-grid-footer-cell.jspx</template>
</renderer>
+ <converter generate="false">
+ <classname>org.richfaces.model.selection.ClientSelectionConverter</classname>
+ <forclass>org.richfaces.model.selection.ClientSelection</forclass>
+ </converter>
+
</components>
\ No newline at end of file
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java 2007-06-06 11:28:57 UTC (rev 1037)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java 2007-06-06 12:04:15 UTC (rev 1038)
@@ -27,6 +27,8 @@
private Serializable rowKey;
+ private int rowIndex = Integer.MIN_VALUE;
+
private Map mapping;
public Object getRowKey() {
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelection.java 2007-06-06 12:04:15 UTC (rev 1038)
@@ -0,0 +1,45 @@
+/**
+ *
+ */
+package org.richfaces.model.selection;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class ClientSelection implements Serializable{
+
+ private static final long serialVersionUID = 5855157282287053681L;
+
+ private List ranges = new ArrayList();
+
+ public ClientSelection() {
+ }
+
+
+ public void addRange(SelectionRange range) {
+ ranges.add(range);
+ }
+
+ public boolean isSelected(int i) {
+ boolean result = false;
+ Iterator iterator = ranges.iterator();
+ while (iterator.hasNext() && !result) {
+ result |= ((SelectionRange) iterator.next()).within(i);
+ }
+ return result;
+ }
+
+ public List getRanges() {
+ return ranges;
+ }
+
+ public void addIndex(int i) {
+
+ }
+}
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/ClientSelectionConverter.java 2007-06-06 12:04:15 UTC (rev 1038)
@@ -0,0 +1,87 @@
+/**
+ *
+ */
+package org.richfaces.model.selection;
+
+import java.util.Iterator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.richfaces.component.UIScrollableGrid;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class ClientSelectionConverter implements Converter {
+
+ public static final String CONVERTER_ID =
+ ClientSelectionConverter.class.getName();
+
+ private static final Log log =
+ LogFactory.getLog(ClientSelectionConverter.class);
+
+ public Object getAsObject(FacesContext context, UIComponent component, String value) {
+ return getAsSelection(context, (UIScrollableGrid) component, value);
+ }
+
+ public String getAsString(FacesContext context, UIComponent component, Object value) {
+
+ StringBuffer buffer = new StringBuffer();
+ Iterator iterator = ((ClientSelection) value).getRanges().iterator();
+
+ while(iterator.hasNext()) {
+
+ SelectionRange selectionRange =
+ (SelectionRange) iterator.next();
+
+ buffer
+ .append(selectionRange.getStartIndex())
+ .append(",")
+ .append(selectionRange.getEndIndex())
+ .append(";");
+ }
+
+ return buffer.toString();
+ }
+
+ private ClientSelection getAsSelection(FacesContext context, UIScrollableGrid grid, String stringSelection) {
+
+ final ClientSelection clientSelection = new ClientSelection();
+
+ String [] selections = stringSelection.split(";");
+
+ for (int i = 0; i < selections.length; i++) {
+
+ String range = selections[i];
+
+ if (range.length() == 0) {
+ continue;
+ }
+ String [] rng = range.split(",");
+
+ try {
+ int fi = Integer.parseInt(rng[0]);
+ int il = Integer.parseInt(rng[1]);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Parsed range " + fi + " " + il);
+ }
+
+ clientSelection.addRange(new SelectionRange(fi, il));
+
+ } catch (NumberFormatException e) {
+ throw new ConverterException(e);
+ }
+ }
+
+
+ return clientSelection;
+ }
+
+}
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SelectionRange.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SelectionRange.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SelectionRange.java 2007-06-06 12:04:15 UTC (rev 1038)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.richfaces.model.selection;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class SelectionRange {
+ private int startIndex = -1;;
+ private int endIndex = -1;
+
+ public SelectionRange(int startIndex, int endIndex) {
+ super();
+ this.startIndex = startIndex;
+ this.endIndex = endIndex;
+ }
+
+ public int getStartIndex() {
+ return startIndex;
+ }
+
+ public void setStartIndex(int startIndex) {
+ this.startIndex = startIndex;
+ }
+
+ public int getEndIndex() {
+ return endIndex;
+ }
+
+ public void setEndIndex(int endIndex) {
+ this.endIndex = endIndex;
+ }
+
+ public boolean within(int index) {
+ return startIndex <= index && endIndex >= index;
+ }
+
+}
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SimpleSelection.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SimpleSelection.java 2007-06-06 11:28:57 UTC (rev 1037)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/selection/SimpleSelection.java 2007-06-06 12:04:15 UTC (rev 1038)
@@ -22,6 +22,10 @@
return keys.add(rowKey);
}
+ public boolean removeKey(Serializable rowKey) {
+ return keys.remove(rowKey);
+ }
+
public Iterator getKeys() {
return keys.iterator();
}
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-06 11:28:57 UTC (rev 1037)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-06 12:04:15 UTC (rev 1038)
@@ -1,14 +1,18 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
+import javax.faces.application.Application;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import javax.faces.convert.Converter;
import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.framework.ajax.AjaxContext;
@@ -25,6 +29,10 @@
import org.richfaces.component.UIScrollableGrid;
import org.richfaces.component.UIScrollableGridColumn;
import org.richfaces.event.sort.SortEvent;
+import org.richfaces.model.selection.ClientSelection;
+import org.richfaces.model.selection.ClientSelectionConverter;
+import org.richfaces.model.selection.Selection;
+import org.richfaces.model.selection.SimpleSelection;
import org.richfaces.renderkit.CompositeRenderer;
import org.richfaces.utils.TemplateLoader;
@@ -53,6 +61,9 @@
private RendererBase footerCellTemplate = null;
+ private static final String CLIENT_SELECTION = "clientSelection";
+
+
private final Log log = LogFactory.getLog(ScrollableGridBaseRenderer.class);
private final ColumnVisitor columnsWidthCounter = new ColumnVisitor(){
@@ -170,7 +181,7 @@
}
};
-
+
private final DataVisitor rowsRenderer = new DataVisitor(){
public void process(FacesContext context, Object rowKey, Object argument) throws IOException {
@@ -486,9 +497,130 @@
grid.queueEvent(new AjaxEvent(grid));
}
}
+
+
}
+ private void decodeSelection(FacesContext context, UIScrollableGrid grid)
+ throws IOException{
+
+ String clientId = grid.getClientId(context);
+ String id = clientId + "_selection";
+ ExternalContext externalContext = context.getExternalContext();
+ Map requestParamMap = externalContext.getRequestParameterMap();
+ Application application = context.getApplication();
+ String value = (String) requestParamMap.get(id);
+
+ Converter converter = application.createConverter(ClientSelection.class);
+
+ ClientSelection _oldClientSelection =
+ (ClientSelection) grid.getAttributes().get(CLIENT_SELECTION);
+
+ final ClientSelection oldClientSelection =
+ _oldClientSelection == null ?
+ new ClientSelection() :
+ _oldClientSelection;
+
+ final ClientSelection clientSelection =
+ (ClientSelection) converter.getAsObject(context, grid, value);
+
+
+
+ //FIXME: Obscure code. Hope Anton will make it more clear
+ final GridRendererState state = GridRendererState.createState(context, grid);
+
+ final SimpleSelection simpleSelection = new SimpleSelection();
+
+ grid.walk(context,
+ new DataVisitor() {
+ public void process(FacesContext context, Object rowKey,
+ Object argument) throws IOException {
+
+ int i = state.getRowIndex();
+
+ if (shouldAddToSelection(i, oldClientSelection, clientSelection)) {
+
+ simpleSelection.addKey((Serializable)rowKey);
+
+ } else if (shouldRemoveFromSelection(i, oldClientSelection, clientSelection)){
+
+ simpleSelection.removeKey((Serializable) rowKey);
+
+ }
+
+ }
+ },
+ state);
+
+
+ GridRendererState.restoreState(context);
+
+ //FIXME:
+
+
+ }
+
+ //Decide whether to add new row to selection based on comparison with old one
+ private boolean shouldAddToSelection(int i, ClientSelection oldSelection, ClientSelection newSelection) {
+ return false;
+ }
+
+ //Decide whether to remove new row to selection based on comparison with old one
+ private boolean shouldRemoveFromSelection(int i, ClientSelection oldSelection, ClientSelection newSelection) {
+ return false;
+ }
+
+
+ private void encodeSelection(FacesContext context, UIScrollableGrid grid) throws IOException {
+ final GridRendererState state = GridRendererState.createState(context, grid);
+
+ final Selection gridSelection = new SimpleSelection();
+ final ClientSelection clientSelection = new ClientSelection();
+
+ grid.walk(context,
+ new DataVisitor() {
+ public void process(FacesContext context, Object rowKey,
+ Object argument) throws IOException {
+
+ if (gridSelection.isSelected((Serializable) rowKey)) {
+
+ int i = state.getRowIndex();
+
+ clientSelection.addIndex(i);
+ }
+
+
+
+
+ }
+ },
+ state);
+
+
+ GridRendererState.restoreState(context);
+
+ grid.getAttributes().put(CLIENT_SELECTION, clientSelection);
+ }
+
+ public void writeSelection(FacesContext context, UIScrollableGrid grid)
+ throws IOException {
+
+ Application application = context.getApplication();
+
+ Converter converter =
+ application.createConverter(ClientSelection.class);
+
+ String string =
+ converter.getAsString(context, grid, grid.getAttributes().get(CLIENT_SELECTION));
+
+ if (string == null) {
+ string = "";
+ }
+
+ }
+
+
private void decodeScrolling(String submitedState, UIScrollableGrid grid){
boolean isEmpty = true;
17 years, 7 months