JBoss Rich Faces SVN: r6257 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-02-21 10:59:18 -0500 (Thu, 21 Feb 2008)
New Revision: 6257
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
Some sentences were rewritten or corrected.
http://jira.jboss.com/jira/browse/RF-1137
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-02-21 15:58:40 UTC (rev 6256)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-02-21 15:59:18 UTC (rev 6257)
@@ -397,45 +397,41 @@
</imageobject>
</mediaobject>
</figure>
- <para>In the example when each node of data model is processed, data contained in the property
- <property>"data"</property> of
- <property>"TreeNode"</property> interface is placed in a request scope
- variable, which name is defined with <emphasis>
+ <para>In the example above, when each node of data model is processed, data contained in the <property>"data"</property> property
+ of
+ <property>"TreeNode"</property> interface is assigned to a request scope variable, which name is defined with <emphasis>
<property>"var"</property>
</emphasis> attribute. The value of the <emphasis>
<property>"nodeFace"</property>
- </emphasis> attribute is evaluated in correspondence with data placed in the <emphasis>
+ </emphasis> attribute is evaluated in correspondence with the data assigned to the <emphasis>
<property>"var"</property>
- </emphasis> attribute. And for the node representation is used the corresponding <emphasis
- role="bold">
- <property><rich:treeNode></property>
- </emphasis> component (with a value of <emphasis>
+ </emphasis> attribute. The corresponding <emphasis role="bold"><property><rich:treeNode></property></emphasis> component (with a value of <emphasis>
<property>"type"</property>
</emphasis> attribute equal to a value of <emphasis>
<property>"nodeFace"</property>
- </emphasis>). For example, during processing of data model an object with name "Chris
- Rea" was placed in the <emphasis>
+ </emphasis>) is used for the node representation. For example, during data model processing, an object with a name "Chris
+ Rea" was inserted in the <emphasis>
<property>"var"</property>
- </emphasis> attribute. Then value of <emphasis>
+ </emphasis> attribute. Then the value of <emphasis>
<property>"nodeFace"</property>
- </emphasis> attribute is evaluated as "artist". Thus, for node
+ </emphasis> attribute was evaluated as "artist". Thus, for the node
representation the <emphasis role="bold">
<property><rich:treeNode></property>
</emphasis> with <emphasis>
<property>"type"</property>
- </emphasis> equal to "artist" is used.</para>
- <para>Also you can define an EL-expression as value of the <emphasis>
+ </emphasis> equal to "artist" was used.</para>
+ <para>You can also assign an EL-expression as value of the <emphasis>
<property>"nodeFace"</property>
</emphasis> attribute. See an example below: </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[nodeFace="#{data.name != 'param-value' ? 'artist' : 'album'}" ]]></programlisting>
- <para>There are some essential moments in a <emphasis>
+ <para>There are some essential points in a <emphasis>
<property>"nodeFace"</property>
- </emphasis> attribute usage. For their description it's necessary to define notions
- of a <property>"typeless node"</property> and a <property>"default
- node"</property>.</para>
+ </emphasis> attribute usage: you need to define notions for <property>typeless</property> and a <property>default</property> nodes.
+ </para>
+
<para>The <property>typeless node</property> is the first <emphasis role="bold">
<property><rich:treeNode></property>
</emphasis> component (from all children nodes nested to the <emphasis role="bold">
@@ -472,20 +468,20 @@
</emphasis> attribute for this node is
<property>"false"</property>.</listitem>
</itemizedlist>
- <para>There is also one especial moment in the <emphasis>
+ <para>There is also one thing that has to be remembered using <emphasis>
<property>"type"</property>
</emphasis> and <emphasis>
<property>"rendered"</property>
- </emphasis> attributes usage. It's possible to define several <emphasis role="bold">
+ </emphasis> attributes: it's possible to define several <emphasis role="bold">
<property><rich:treeNode></property>
- </emphasis> components with the equal values of <emphasis>
+ </emphasis> components with equal values of <emphasis>
<property>"type"</property>
</emphasis> attribute and different values of <emphasis>
<property>"rendered"</property>
- </emphasis> attribute. It provides the possibility to define different representation for the
+ </emphasis> attribute. It provides a possibility to define different representation styles for the
same node types. In the example with artists and their albums (see <link linkend="example"
>above</link>) it's possible to represent albums that are available for sale and
- albums that are not available. An example is placed below:</para>
+ albums that are not available. Please study the example below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -506,7 +502,7 @@
</rich:tree>
</h:form>
...]]></programlisting>
- <para>This is a result: </para>
+ <para>This is a result of the code: </para>
<figure>
<title>The <emphasis>
<property>"type"</property>
@@ -536,18 +532,16 @@
<property>"false"</property>. Thus, the first <emphasis role="bold">
<property><rich:treeNode></property>
</emphasis> is selected for node representation. </para>
- <para>Switching on tree nodes could be performed in three modes. Modes could be specified with <emphasis>
+ <para>Tree node can be run in tree modes. Modes can be specified with <emphasis>
<property>"switchType"</property>
</emphasis> attribute for<emphasis role="bold">
<property><rich:tree></property>
</emphasis> component.</para>
<itemizedlist>
- <listitem>Ajax (default value) - Ajax submission is used for switching. Note, that for
- collapse/expand operations, an Ajax request is sent to the server and it could cause a
- short delay.</listitem>
- <listitem>Server - regular form submission request is used.</listitem>
- <listitem>Client - switching is done as a whole on a client, no interaction with a server
- presents. Full page content is reloaded after every click.</listitem>
+ <listitem>Ajax (default value) - Ajax submission is used performing the functionality.
+Note, that for collapse/expand operations an Ajax request is sent to the server and it can cause a short delay.</listitem>
+ <listitem>Server - regular form of submission request is used.</listitem>
+ <listitem>Client – all operations are performed totally on the client; no interaction with a server is involved. Full page content is reloaded after every action.</listitem>
</itemizedlist>
<para> The <emphasis>
<property>"icon"</property>
@@ -557,9 +551,10 @@
<property>"iconExpanded"</property>
</emphasis>, <emphasis>
<property>"iconLeaf"</property>
- </emphasis> attributes define icons for the component. Also you can define icons using facets
- with the same names. If the facets are defined, the corresponding attributes are ignored and
- facets content is used as icons. By default the width of a rendered facet area is 16px. </para>
+ </emphasis> attributes set the icons' images for the component. You can also define icons using facets with the same names.
+
+If the facets are defined, the corresponding attributes are ignored and
+ facets' content is used as icons. By default the width of a rendered facet area is 16px. </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -592,10 +587,10 @@
</emphasis> and <emphasis>
<property>"var"</property>
</emphasis>. Besides, visual representation shouldn't be defined right in the
- <property>tree</property>. In this case a tree tag is intended mainly for defining common
+ <property>tree</property>. In this case a <property><rich: tree></property> tag is applied mainly for defining common
attributes such as <emphasis>
<property>"ajaxSubmitSelection"</property>
- </emphasis>, for instance. </para>
+ </emphasis> etc. </para>
</section>
<section>
@@ -603,25 +598,32 @@
<para>The <emphasis role="bold">
<property><rich: tree></property>
</emphasis> component functionality provides a built-in support for Drag and Drop operations.
- The main usage principles are the same as for RichFaces DnD wrapper components. Hence, to get
- additional information on the topic, read the corresponding chapters:<link linkend="dndParam"
+ The main usage principles are similar to RichFaces DnD wrapper components. Hence, to get
+ additional information on the issue, read the corresponding chapters:<link linkend="dndParam"
>"rich:dndParam"</link>, <link linkend="dragSupport"
>"rich:dragSupport"</link>, <link linkend="dragIndicator"
>"rich:dragIndicator"</link>, <link linkend="dropSupport"
- >"rich:dropSupport"</link>. As <property>treeNodes</property> could be
- Drag, Drop or DnD elements, a <property>tree</property> can include the following attributes
- groups.</para>
+ >"rich:dropSupport"</link>. Since <property>treeNodes</property>can be assigned as
+ Drag, Drop or Drag-and-Drop elements, a <property>tree</property> can include the following
+ groups of attributes.</para>
<table>
- <title>Drag attributes group</title>
+ <title>Drag group</title>
<tgroup cols="2">
<thead>
<row>
- <entry>dragValue</entry>
- <entry>Element value drag passing into processing after a Drop event</entry>
+ <entry>Attribute Name</entry>
+ <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
+ <entry>dragValue</entry>
+ <entry>Element value drag passing into processing after a Drop event</entry>
+ </row>
+
+
+
+ <row>
<entry>dragListener</entry>
<entry>A listener that processes a Drag event</entry>
</row>
@@ -638,16 +640,21 @@
</tgroup>
</table>
<table>
- <title>Drop attributes group</title>
+ <title>Drop group</title>
<tgroup cols="2">
<thead>
<row>
- <entry>dropValue</entry>
- <entry>Element value drop passed into processing after Drop events .</entry>
+ <entry>Attribute Name</entry>
+ <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
+ <entry>dropValue</entry>
+ <entry>Element value drop passed into processing after Drop events </entry>
+ </row>
+
+ <row>
<entry>dropListener</entry>
<entry>A listener that processes a Drop event. </entry>
</row>
16 years, 11 months
JBoss Rich Faces SVN: r6256 - management/design/standardComponent.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-02-21 10:58:40 -0500 (Thu, 21 Feb 2008)
New Revision: 6256
Added:
management/design/standardComponent/advanced.css
management/design/standardComponent/basic.css
management/design/standardComponent/example.html
management/design/standardComponent/hs~advanced.css
management/design/standardComponent/hs~example.html
Removed:
management/design/standardComponent/default_example.html
Log:
Added: management/design/standardComponent/advanced.css
===================================================================
--- management/design/standardComponent/advanced.css (rev 0)
+++ management/design/standardComponent/advanced.css 2008-02-21 15:58:40 UTC (rev 6256)
@@ -0,0 +1,91 @@
+button[type="button"], input[type="reset"], input[type="submit"], input[type="button"] {
+ border-width: 1px;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*headerTextColor*/;
+ background-color : #BED6F8 /*headerBackgroundColor*/;
+ background-image : url(btn_bg.gif)/*from headerGradientColor to headerBackgroundColor, width generalSizeFont*/;
+ background-repeat : repeat-x;
+ background-position : top left;
+}
+
+textarea[type="textarea"], input[type="text"], input[type="password"], select{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFFFFF /*controlBackgroundColor*/;
+ background-image : url(input_bg.gif)/*from additionalBackgroundColor to controlBackgroundColor, width generalSizeFont*/;
+ background-repeat : no-repeat;
+ background-position : 1px 1px;
+ }
+
+
+input, select, textarea, button, keygen, isindex {
+ border-width: 1px;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ color : #000000 /*controlTextColor*/;
+}
+
+
+.input_def{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFFFFF /*controlBackgroundColor*/;
+ background-image : url(input_bg.gif)/*from additionalBackgroundColor to controlBackgroundColor, width generalSizeFont*/;
+ background-repeat : no-repeat;
+ background-position : 1px 1px;
+}
+.input_sel{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFF2D0 /*NEW - inputLightColor*/;
+}
+.input_error{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFE6E6 /*NEW - errorBackgroundColor*/;
+ background-image : url(input_error.gif); /*NEW - errorColor*/
+ background-repeat : no-repeat;
+ background-position : center right;
+}
+.btn_def{
+ border-width: 1px;
+ border-style : outset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*headerTextColor*/;
+ background-color : #BED6F8 /*headerBackgroundColor*/;
+ background-image : url(btn_bg.gif)/*from headerGradientColor to headerBackgroundColor, width generalSizeFont*/;
+ background-repeat : repeat-x;
+ background-position : top left;
+}
+.btn_press{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*headerTextColor*/;
+ background-color : #BED6F8 /*headerBackgroundColor*/;
+ background-image : url(btn_press_bg.gif)/*from headerBackgroundColor to headerGradientColor, width generalSizeFont*/;
+ background-repeat : repeat-x;
+ background-position : bottom left;
+}
+
Added: management/design/standardComponent/basic.css
===================================================================
--- management/design/standardComponent/basic.css (rev 0)
+++ management/design/standardComponent/basic.css 2008-02-21 15:58:40 UTC (rev 6256)
@@ -0,0 +1,11 @@
+input, select, textarea, button, keygen, isindex, legend {
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+}
+fieldset {
+ border-width: 1px;
+ border-style : solid;
+ padding:10px;
+}
+
Deleted: management/design/standardComponent/default_example.html
===================================================================
--- management/design/standardComponent/default_example.html 2008-02-21 15:43:05 UTC (rev 6255)
+++ management/design/standardComponent/default_example.html 2008-02-21 15:58:40 UTC (rev 6256)
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
- <title>Untitled</title>
-</head>
-
-<body>
-
-<style>
- button, input[type="reset"], input[type="submit"], input[type="button"] {
- /*background-color: initial;*/ /* Webkit */
- }
-
- input, select, textarea, button, keygen, isindex {
- border-width: 1px;
- border-color : #BED6F8 /*panelBorderColor*/;
- font-size: 11px /*generalSizeFont*/;
- font-family: verdana /*generalFamilyFont*/;
- color : #000000 /*controlTextColor*/;
- }
- fieldset {
- border-width: 1px;
- border-color : #BED6F8 /*panelBorderColor*/;
- border-style : solid;
- padding:10px;
- }
- legend {
- font-size: 11px /*generalSizeFont*/;
- font-family: verdana /*generalFamilyFont*/;
- color : #000000 /*controlTextColor*/;
- }
-
-</style>
-<fieldset>
-<legend>Legend</legend>
-<button>Test</button>
-<input type="Button" value="Test">
-<input type="Checkbox">
-<input type="File">
-<input type="Radio">
-<input type="Text" value="Test">
-<select size="1">
- <option>Test</option>
-</select>
-
-<select multiple>
- <option>Test</option>
- <option>Test1</option>
- <option>Test2</option>
- <option>Test3</option>
-</select>
-
-
-<br><br>
-<textarea>text</textarea>
-
-<keygen />
-<br><br>
-<isindex />
-
-</fieldset>
-</body>
-</html>
Added: management/design/standardComponent/example.html
===================================================================
--- management/design/standardComponent/example.html (rev 0)
+++ management/design/standardComponent/example.html 2008-02-21 15:58:40 UTC (rev 6256)
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+ <title>Untitled</title>
+
+<link rel="STYLESHEET" type="text/css" href="basic.css">
+<link rel="STYLESHEET" type="text/css" href="advanced.css">
+</head>
+
+<body>
+
+<fieldset>
+<legend>Legend</legend>
+<button>Test</button>
+<input type="Button" value="Test">
+<input type="Checkbox">
+<input type="File">
+<input type="Radio">
+<input type="Text" value="Test">
+<select size="1">
+ <option>Test</option>
+</select>
+
+<select multiple>
+ <option>Test</option>
+ <option>Test1</option>
+ <option>Test2</option>
+ <option>Test3</option>
+</select>
+
+
+<br><br>
+<textarea>text</textarea>
+
+<keygen />
+<br><br>
+<isindex />
+
+</fieldset>
+</body>
+</html>
Added: management/design/standardComponent/hs~advanced.css
===================================================================
--- management/design/standardComponent/hs~advanced.css (rev 0)
+++ management/design/standardComponent/hs~advanced.css 2008-02-21 15:58:40 UTC (rev 6256)
@@ -0,0 +1,91 @@
+button, input[type="reset"], input[type="submit"], input[type="button"] {
+ border-width: 1px;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*headerTextColor*/;
+ background-color : #BED6F8 /*headerBackgroundColor*/;
+ background-image : url(btn_bg.gif)/*from headerGradientColor to headerBackgroundColor, width generalSizeFont*/;
+ background-repeat : repeat-x;
+ background-position : top left;
+}
+
+textarea, input[type="text"], input[type="password"], select{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFFFFF /*controlBackgroundColor*/;
+ background-image : url(input_bg.gif)/*from additionalBackgroundColor to controlBackgroundColor, width generalSizeFont*/;
+ background-repeat : no-repeat;
+ background-position : 1px 1px;
+ }
+
+
+input, select, textarea, button, keygen, isindex {
+ border-width: 1px;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ color : #000000 /*controlTextColor*/;
+}
+
+
+ .input_def{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFFFFF /*controlBackgroundColor*/;
+ background-image : url(input_bg.gif)/*from additionalBackgroundColor to controlBackgroundColor, width generalSizeFont*/;
+ background-repeat : no-repeat;
+ background-position : 1px 1px;
+ }
+ .input_sel{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFF2D0 /*NEW - inputLightColor*/;
+ }
+ .input_error{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ background-color : #FFE6E6 /*NEW - errorBackgroundColor*/;
+ background-image : url(input_error.gif); /*NEW - errorColor*/
+ background-repeat : no-repeat;
+ background-position : center right;
+ }
+ .btn_def{
+ border-width: 1px;
+ border-style : outset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*headerTextColor*/;
+ background-color : #BED6F8 /*headerBackgroundColor*/;
+ background-image : url(btn_bg.gif)/*from headerGradientColor to headerBackgroundColor, width generalSizeFont*/;
+ background-repeat : repeat-x;
+ background-position : top left;
+ }
+ .btn_press{
+ border-width: 1px;
+ border-style : inset;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*headerTextColor*/;
+ background-color : #BED6F8 /*headerBackgroundColor*/;
+ background-image : url(btn_press_bg.gif)/*from headerBackgroundColor to headerGradientColor, width generalSizeFont*/;
+ background-repeat : repeat-x;
+ background-position : bottom left;
+ }
+
Added: management/design/standardComponent/hs~example.html
===================================================================
--- management/design/standardComponent/hs~example.html (rev 0)
+++ management/design/standardComponent/hs~example.html 2008-02-21 15:58:40 UTC (rev 6256)
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+ <title>Untitled</title>
+
+<link rel="STYLESHEET" type="text/css" href="basic.css">
+<link rel="STYLESHEET" type="text/css" href="advanced.css">
+</head>
+
+<body>
+
+<fieldset>
+<legend>Legend</legend>
+<button>Test</button>
+<input type="Button" value="Test">
+<input type="Checkbox">
+<input type="File">
+<input type="Radio">
+<input type="Text" value="Test">
+<select size="1">
+ <option>Test</option>
+</select>
+
+<select multiple>
+ <option>Test</option>
+ <option>Test1</option>
+ <option>Test2</option>
+ <option>Test3</option>
+</select>
+
+
+<br><br>
+<textarea>text</textarea>
+
+<keygen />
+<br><br>
+<isindex />
+
+</fieldset>
+</body>
+</html>
16 years, 11 months
JBoss Rich Faces SVN: r6255 - trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-21 10:43:05 -0500 (Thu, 21 Feb 2008)
New Revision: 6255
Modified:
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
fix max files count attr
Modified: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-21 15:35:22 UTC (rev 6254)
+++ trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-21 15:43:05 UTC (rev 6255)
@@ -158,7 +158,7 @@
onerror : #{this:getAsEventHandler(context, component, "onerror")}
};
- new FileUpload('#{clientId}', #{this:getStopScript(context, component)}, #{this:getFileSizeScript(context, component)} ,'#{this:getProgressBarId(context, component)}', FileUpload.CLASSES, #{this:getLabelMarkup(context, component)}, '#{component.attributes["maxFiles"]}', events, #{component.attributes["disabled"]});
+ new FileUpload('#{clientId}', #{this:getStopScript(context, component)}, #{this:getFileSizeScript(context, component)} ,'#{this:getProgressBarId(context, component)}', FileUpload.CLASSES, #{this:getLabelMarkup(context, component)}, '#{component.attributes["maxFilesQuantity"]}', events, #{component.attributes["disabled"]});
</script>
</span>
16 years, 11 months
JBoss Rich Faces SVN: r6254 - in trunk/sandbox/samples/fileUploadDemo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-21 10:35:22 -0500 (Thu, 21 Feb 2008)
New Revision: 6254
Modified:
trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
Log:
demo site upgrade
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-21 15:33:07 UTC (rev 6253)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-21 15:35:22 UTC (rev 6254)
@@ -24,8 +24,11 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
@@ -49,25 +52,12 @@
}
public void setFlag(boolean flag) {
- System.out.println(flag);
this.flag = flag;
}
public void listener(UploadEvent event) throws IOException{
-
File file = event.getFile();
- System.out.println("File name : " + file.getName());
- FileInputStream stream = new FileInputStream(file);
- ByteArrayOutputStream buffer = new ByteArrayOutputStream(4096);
- byte [] bytes = new byte[4096];
- int read;
- while ((read = stream.read(bytes)) != -1) {
- buffer.write(bytes, 0 , read);
- }
- stream.close();
- file.delete();
- System.out.println(buffer.toString());
-
+ System.out.println("File name : " + file.getAbsolutePath());
}
public void action(ActionEvent event) {
@@ -111,4 +101,5 @@
}
-}
\ No newline at end of file
+}
+
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-21 15:33:07 UTC (rev 6253)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-21 15:35:22 UTC (rev 6254)
@@ -7,6 +7,15 @@
<html>
<head>
<title></title>
+<style>
+ .list {background-color: white;}
+ .list_disabled { background-color: #f1f1f1;}
+ .entry {color: Brown; font-weight: bold;}
+ .entry_disabled { background-color: #f1f1f1; color: gray; }
+ .entry_control {text-decoration: none; color: Brown; font-weight: bold;}
+ .entry_control_disabled { background-color: #f1f1f1; color: #BCDEFF; text-decoration: none; color: gray;}
+
+</style>
</head>
<body>
<f:view>
@@ -20,16 +29,26 @@
<h:messages />
-<fu:fileUpload data="#{bean.data}" fileUploadListener="#{bean.listener}" maxFiles="5">
+<fu:fileUpload data="#{bean.data}" fileUploadListener="#{bean.listener}" listWidth="600px" listHeight="150px"
+ uploadListClass="list"
+ uploadListClassDisabled="list_disabled"
+ fileEntryClass="entry"
+ fileEntryClassDisabled="entry_disabled"
+ fileEntryControlClass="entry_control"
+ fileEntryControlClassDisabled="entry_control_disabled"
+ maxFilesQuantity="4">
<f:facet name="progress">
<progressBar:progressBar style="height: 10px; width: 300px;">
</progressBar:progressBar>
</f:facet>
<f:facet name="label">
- <h:outputText value="{_MB}MB from {MB}MB uploaded --- {mm}:{ss}"></h:outputText>
+ <h:outputText value="{_KB}KB from {KB}KB uploaded --- {mm}:{ss}"></h:outputText>
</f:facet>
</fu:fileUpload><br/><br/><br/>
<h:commandButton actionListener="#{bean.action}" style="font-weight: bold; width: 300px;" value="Print file content in console"></h:commandButton>
+<br/>
+<input type="button" onclick="$('j_id_jsp_223736782_1:j_id_jsp_223736782_7').component.enable();" value="Enable" />
+<input type="button" onclick="$('j_id_jsp_223736782_1:j_id_jsp_223736782_7').component.disable();" value="Disable" /><br/>
</h:form>
</f:view>
</body>
16 years, 11 months
JBoss Rich Faces SVN: r6253 - trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-21 10:33:07 -0500 (Thu, 21 Feb 2008)
New Revision: 6253
Modified:
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java
Log:
fix null pointer exception
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java 2008-02-21 15:32:46 UTC (rev 6252)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java 2008-02-21 15:33:07 UTC (rev 6253)
@@ -247,8 +247,19 @@
return (result != null) ? new JSLiteral(result.toString()) : null;
}
+ /**
+ * Generate component custom events functions
+ * @param context
+ * @param component
+ * @param attributeName
+ * @return
+ */
public String getAsEventHandler(FacesContext context, UIComponent component, String attributeName) {
- return RendererUtils.getInstance().getAsEventHandler(context, component, attributeName, "").toScript();
+ Object eventHandler = RendererUtils.getInstance().getAsEventHandler(context, component, attributeName, "");
+ if (eventHandler != null) {
+ return eventHandler.toString();
+ }
+ return JSReference.NULL.toScript();
}
/**
16 years, 11 months
JBoss Rich Faces SVN: r6252 - trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-21 10:32:46 -0500 (Thu, 21 Feb 2008)
New Revision: 6252
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
little fix
Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-21 15:20:33 UTC (rev 6251)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-21 15:32:46 UTC (rev 6252)
@@ -122,7 +122,7 @@
this.fileInput = fileInput;
this.uploadObject = uploadObject;
- var content = FileUploadEntry.template.invoke('getContent', {fileName: $F(this.fileInput)}).join('');
+ var content = FileUploadEntry.template.invoke('getContent', {fileName: $F(this.fileInput), className : this.uploadObject.classes.FILE_ENTRY.ENABLED }).join('');
Element.insert(this.uploadObject.items, content);
16 years, 11 months
JBoss Rich Faces SVN: r6251 - in trunk/sandbox/ui/fileUpload/src/main: resources/org/richfaces/renderkit/html/css and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-21 10:20:33 -0500 (Thu, 21 Feb 2008)
New Revision: 6251
Modified:
trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/css/fileUpload.xcss
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
add customization classes
Modified: trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-02-21 15:10:08 UTC (rev 6250)
+++ trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-02-21 15:20:33 UTC (rev 6251)
@@ -1,46 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd"
[
<!ENTITY listeners SYSTEM "listener.ent">
]
->
-<components>
- <component>
- <name>org.richfaces.component.FileUpload</name>
- <family>org.richfaces.component.FileUpload</family>
- <classname>org.richfaces.component.html.HtmlFileUpload</classname>
- <superclass>org.richfaces.org.jboss.seam.ui.component.UIFileUpload</superclass>
- <description>
+>
+<components>
+ <component>
+ <name>org.richfaces.component.FileUpload</name>
+ <family>org.richfaces.component.FileUpload</family>
+ <classname>org.richfaces.component.html.HtmlFileUpload</classname>
+ <superclass>org.richfaces.org.jboss.seam.ui.component.UIFileUpload</superclass>
+ <description>
<![CDATA[
-Renders a file upload control. This control must be used within a form with an encoding type of multipart/form-data, i.e:
-
-<h:form enctype="multipart/form-data">
-
-For multipart requests, the Seam Multipart servlet filter must also be configured in web.xml:
-
-<filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
-</filter>
-
-<filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
-</filter-mapping>
-
-The following configuration options for multipart requests may be configured in components.xml:
-
-* createTempFiles - if this option is set to true, uploaded files are streamed to a temporary file instead of in memory.
-* maxRequestSize - the maximum size of a file upload request, in bytes.
-
-Here's an example:
-
-<component class="org.jboss.seam.servlet.MultipartConfig">
- <property name="createTempFiles">true</property>
- <property name="maxRequestSize">1000000</property>
+Renders a file upload control. This control must be used within a form with an encoding type of multipart/form-data, i.e:
+
+<h:form enctype="multipart/form-data">
+
+For multipart requests, the Seam Multipart servlet filter must also be configured in web.xml:
+
+<filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+</filter>
+
+<filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+</filter-mapping>
+
+The following configuration options for multipart requests may be configured in components.xml:
+
+* createTempFiles - if this option is set to true, uploaded files are streamed to a temporary file instead of in memory.
+* maxRequestSize - the maximum size of a file upload request, in bytes.
+
+Here's an example:
+
+<component class="org.jboss.seam.servlet.MultipartConfig">
+ <property name="createTempFiles">true</property>
+ <property name="maxRequestSize">1000000</property>
</component>
-]]>
- </description>
+]]>
+ </description>
<test>
<classname>org.richfaces.component.html.HtmlFileUploadComponentTestCase</classname>
<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
@@ -49,99 +49,129 @@
<name>org.richfaces.renderkit.html.FileUploadRenderer</name>
<template>org/richfaces/fileUpload.jspx</template>
</renderer>
- <tag>
- <name>fileUpload</name>
- <classname>org.richfaces.taglib.FileUploadTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
+ <tag>
+ <name>fileUpload</name>
+ <classname>org.richfaces.taglib.FileUploadTag</classname>
+ <superclass>
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
+ </superclass>
<test>
<classname>org.richfaces.taglib.HtmlFileUploadTagTestCase</classname>
<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
</test>
- </tag>
- &ui_component_attributes;
- &ui_input_attributes;
- &html_style_attributes;
- &html_input_attributes;
- &html_events;
- &html_input_events;
- <property transient="true">
- <name>accept</name>
- <classname>java.lang.String</classname>
- <description>a comma-separated list of content types to accept, may not be supported by the browser. E.g. "images/png,images/jpg", "images/*".</description>
+ </tag>
+ &ui_component_attributes;
+ &ui_input_attributes;
+ &html_style_attributes;
+ &html_input_attributes;
+ &html_events;
+ &html_input_events;
+ <property transient="true">
+ <name>accept</name>
+ <classname>java.lang.String</classname>
+ <description>a comma-separated list of content types to accept, may not be supported by the browser. E.g. "images/png,images/jpg", "images/*".</description>
</property>
- <property elonly="true">
- <name>data</name>
- <classname>java.lang.Object</classname>
- <description>this value binding receives the file's content type (optional).</description>
- </property>
- <property elonly="true">
- <name>contentType</name>
- <classname>java.lang.String</classname>
- <description>the property to receive the contentType</description>
- </property>
- <property elonly="true">
- <name>fileName</name>
- <classname>java.lang.String</classname>
- <description>this value binding receives the filename (optional).</description>
- </property>
- <property elonly="true">
- <name>fileSize</name>
- <classname>java.lang.Integer</classname>
- <description>this value binding receives the file size (optional).</description>
+ <property elonly="true">
+ <name>data</name>
+ <classname>java.lang.Object</classname>
+ <description>this value binding receives the file's content type (optional).</description>
</property>
+ <property elonly="true">
+ <name>contentType</name>
+ <classname>java.lang.String</classname>
+ <description>the property to receive the contentType</description>
+ </property>
+ <property elonly="true">
+ <name>fileName</name>
+ <classname>java.lang.String</classname>
+ <description>this value binding receives the filename (optional).</description>
+ </property>
+ <property elonly="true">
+ <name>fileSize</name>
+ <classname>java.lang.Integer</classname>
+ <description>this value binding receives the file size (optional).</description>
+ </property>
<property>
<name>progressInfo</name>
<classname>java.lang.String</classname>
<description>Defines bean name where progress info should be stored (optional).</description>
</property>
<property>
- <name>maxFiles</name>
+ <name>maxFilesQuantity</name>
<classname>java.lang.Integer</classname>
<description>Defines max files count allowed for upload (optional).</description>
</property>
<property>
- <name>addStyle</name>
+ <name>addButtonClass</name>
<classname>java.lang.String</classname>
<description>CSS style for add button</description>
</property>
<property>
- <name>addStyleDisabled</name>
+ <name>addButtonClassDisabled</name>
<classname>java.lang.String</classname>
<description>CSS style for add button disabled</description>
</property>
<property>
- <name>uploadStyle</name>
+ <name>uploadButtonClass</name>
<classname>java.lang.String</classname>
<description>CSS style for upload button</description>
</property>
<property>
- <name>uploadStyleDisabled</name>
+ <name>uploadButtonClassDisabled</name>
<classname>java.lang.String</classname>
<description>CSS style for upload button disabled</description>
</property>
<property>
- <name>cancelStyle</name>
+ <name>cancelButtonClass</name>
<classname>java.lang.String</classname>
<description>CSS style for cancel button</description>
</property>
<property>
- <name>cancelStyleDisabled</name>
+ <name>cancelButtonClassDisabled</name>
<classname>java.lang.String</classname>
<description>CSS style for cancel button disabled</description>
</property>
<property>
- <name>cleanStyle</name>
+ <name>cleanButtonClass</name>
<classname>java.lang.String</classname>
<description>CSS style for clean button</description>
</property>
<property>
- <name>cleanStyleDisabled</name>
+ <name>cleanButtonClassDisabled</name>
<classname>java.lang.String</classname>
<description>CSS style for clean button disabled</description>
</property>
<property>
+ <name>uploadListClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style for upload list</description>
+ </property>
+ <property>
+ <name>uploadListClassDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style for upload list disabled</description>
+ </property>
+ <property>
+ <name>fileEntryClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style upload file entry</description>
+ </property>
+ <property>
+ <name>fileEntryClassDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style upload file entry disabled</description>
+ </property>
+ <property>
+ <name>fileEntryControlClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style for upload enrty control</description>
+ </property>
+ <property>
+ <name>fileEntryControlClassDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style for upload enrty control disabled</description>
+ </property>
+ <property>
<name>fileUploadListener</name>
<classname>javax.el.MethodExpression</classname>
<description>
@@ -150,6 +180,30 @@
</description>
</property>
<property>
+ <name>listWidth</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines width of file list
+ </description>
+ <defaultvalue>"400px"</defaultvalue>
+ </property>
+ <property>
+ <name>listHeight</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines height of file list
+ </description>
+ <defaultvalue>"210px"</defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ Disabled attribute
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
<name>onupload</name>
<classname>java.lang.String</classname>
</property>
@@ -164,7 +218,7 @@
<property>
<name>onerror</name>
<classname>java.lang.String</classname>
- </property>
+ </property>
</component>
- &listeners;
-</components>
+ &listeners;
+</components>
Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/css/fileUpload.xcss
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/css/fileUpload.xcss 2008-02-21 15:10:08 UTC (rev 6250)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/css/fileUpload.xcss 2008-02-21 15:20:33 UTC (rev 6251)
@@ -13,9 +13,8 @@
table{width : 100%}
.upload_table_td{border-bottom:1px solid #c0c0c0 /*tableBorderColor*/;white-space : nowrap;}
-.upload_list_width{ width:400px;}
.upload_list_decor{ border:1px solid #c0c0c0 /*tableBorderColor*/; background : #FFFFFF /*tableBackgroundColor*/;}
-.upload_list_overflow{height : 210px; overflow : auto; overflow-x : hidden;}
+.upload_list_overflow{overflow : auto; overflow-x : hidden;}
.upload_name{ width : 100%; height : 50px; padding : 2px 10px 2px 10px;}
.upload_del{ width : 90px; text-align : center; padding-top : 3; padding-bottom : 3;}
.upload_scroll{ width : 10px; text-align : center;}
Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-21 15:10:08 UTC (rev 6250)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-21 15:20:33 UTC (rev 6251)
@@ -2,40 +2,46 @@
FileUploadEntry = Class.create();
FileUploadEntry.clearControlTemplate =
+ [
new E('a',
{
- 'style':'text-decoration: none; color:black',
+ 'style':'',
'onclick': function (context) { return 'var entry = FileUploadEntry.getComponent(this); entry.uploadObject.clear(entry); return false;';},
- 'className':'upload_anc',
+ 'className':function (context) { return 'upload_anc ' + Richfaces.evalMacro("className", context); },
'href':'#'
},
[
new T('Clear')
- ]);
+ ])
+ ];
FileUploadEntry.stopControlTemplate =
+ [
new E('a',
{
- 'style':'text-decoration: none; color:black',
+ 'style':'',
'onclick': function (context) { return 'FileUploadEntry.getComponent(this).uploadObject.stop(); return false;';},
- 'className':'upload_anc',
+ 'className':function (context) { return 'upload_anc ' + Richfaces.evalMacro("className", context); },
'href':'#'
},
[
new T('Stop')
- ]);
+ ])
+ ];
FileUploadEntry.cancelControlTemplate =
+ [
new E('a',
{
- 'style':'text-decoration: none; color:black',
+ 'style':'',
'onclick': function (context) { return 'var entry = FileUploadEntry.getComponent(this); entry.uploadObject.clear(entry); return false;';},
- 'className':'upload_anc',
+ 'className':function (context) { return 'upload_anc ' + Richfaces.evalMacro("className", context); },
'href':'#'
},
[
new T('Cancel')
- ]);
+ ])
+ ];
FileUploadEntry.template =
[
@@ -46,7 +52,7 @@
[
new E('tr',{},
[
- new E('td',{'className':'upload_font upload_name upload_table_td'},
+ new E('td',{'className':function (context) { return 'upload_font upload_name upload_table_td ' + Richfaces.evalMacro("className", context);}},
[
new E('div',{'className':'upload_name_padding'},
[
@@ -189,11 +195,14 @@
Element.insert(this.statusLabel, FileUploadEntry.LABELS[newState]);
if (newState == FileUploadEntry.UPLOAD_IN_PROGRESS) {
- Element.insert(this.controlArea, FileUploadEntry.stopControlTemplate.getContent());
+ //Element.insert(this.controlArea, FileUploadEntry.stopControlTemplate.getContent());
+ Element.update(this.controlArea, FileUploadEntry.stopControlTemplate.invoke('getContent',{'className': this.uploadObject.classes.FILE_ENTRY_CONTROL.ENABLED}).join(''));
} else if (newState == FileUploadEntry.READY) {
- Element.insert(this.controlArea, FileUploadEntry.cancelControlTemplate.getContent());
+ //Element.insert(this.controlArea, FileUploadEntry.cancelControlTemplate.getContent());
+ Element.update(this.controlArea, FileUploadEntry.cancelControlTemplate.invoke('getContent',{'className': this.uploadObject.classes.FILE_ENTRY_CONTROL.ENABLED}).join(''));
} else {
- Element.insert(this.controlArea, FileUploadEntry.clearControlTemplate.getContent());
+ //Element.insert(this.controlArea, FileUploadEntry.clearControlTemplate.getContent());
+ Element.update(this.controlArea, FileUploadEntry.clearControlTemplate.invoke('getContent',{'className': this.uploadObject.classes.FILE_ENTRY_CONTROL.ENABLED}).join(''));
}
if (newState == FileUploadEntry.UPLOAD_SUCCESS) {
@@ -354,16 +363,17 @@
classes: null,
events: null,
-
+
maxFileBatchSize: null,
- initialize: function(id, stopScript, getFileSizeScript, progressBarId, classes, label, maxFiles, events, options) {
+ initialize: function(id, stopScript, getFileSizeScript, progressBarId, classes, label, maxFiles, events, disabled, options) {
this.id = id;
this.element = $(this.id);
this._progressBar = $(progressBarId);
this.progressBar = this._progressBar.component;
this.labelMarkup = label;
+ this.disabled = disabled;
this.element.component = this;
@@ -421,6 +431,7 @@
},
add: function(elt) {
+ if (this.disabled) return;
var newEntry = new FileUploadEntry(elt, this);
this.entries.push(newEntry);
@@ -461,6 +472,7 @@
},
upload: function() {
+ if (this.disabled) return;
this.runUpload = true;
if (!this.activeEntry) {
@@ -474,6 +486,7 @@
},
stop: function() {
+ if (this.disabled) return;
this.runUpload = false;
if (this.activeEntry) {
@@ -482,6 +495,7 @@
},
clear: function(entry) {
+ if (this.disabled) return;
if (entry) {
this.remove(entry);
} else {
@@ -504,9 +518,9 @@
},
processButtons: function () {
- this.disableAddButton(this.maxFileBatchSize && this.entries.length >= this.maxFileBatchSize);
- this.disableCleanButton(this.cleanAllDisabled());
- this.disableUploadButton(this.uploadAllDisabled());
+ this.disableAddButton(this.disabled || this.maxFileBatchSize && this.entries.length >= this.maxFileBatchSize);
+ this.disableCleanButton(this.disabled || this.cleanAllDisabled());
+ this.disableUploadButton(this.disabled || this.uploadAllDisabled());
this.switchUploadButton();
},
@@ -578,6 +592,28 @@
$(this.id + ":upload1").className = (disabled? this.classes.UPDATE.DISABLED : this.classes.UPDATE.ENABLED);
$(this.id + ":upload2").className = (disabled? this.classes.UPDATE_CONTENT.DISABLED : this.classes.UPDATE_CONTENT.ENABLED);
},
+
+ disable: function () {
+ this.disabled = true;
+ this.items.className = "upload_list_overflow " + this.classes.UPLOAD_LIST.DISABLED;
+ for (var i = 0; i < this.entries.length; i++) {
+ var entry = this.entries[i];
+ entry.entryElement.rows[0].cells[0].className = "upload_font upload_name upload_table_td " + this.classes.FILE_ENTRY.DISABLED;
+ entry.controlArea.firstChild.className = "upload_anc " + this.classes.FILE_ENTRY_CONTROL.DISABLED;
+ }
+ this.processButtons();
+ },
+
+ enable: function () {
+ this.disabled = false;
+ this.items.className = "upload_list_overflow " + this.classes.UPLOAD_LIST.ENABLED;
+ for (var i = 0; i < this.entries.length; i++) {
+ var entry = this.entries[i];
+ entry.entryElement.rows[0].cells[0].className = "upload_font upload_name upload_table_td " + this.classes.FILE_ENTRY.ENABLED;
+ entry.controlArea.firstChild.className = "upload_anc " + this.classes.FILE_ENTRY_CONTROL.ENABLED;
+ }
+ this.processButtons();
+ },
_endUpload: function() {
this.activeEntry = null;
Modified: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-21 15:10:08 UTC (rev 6250)
+++ trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-21 15:20:33 UTC (rev 6251)
@@ -22,7 +22,23 @@
<f:clientId var="clientId" />
-<div class="upload_list_width upload_list_decor" id="#{clientId}">
+ <jsp:scriptlet>
+ <![CDATA[
+ boolean disabled = (Boolean)component.getAttributes().get("disabled");
+ String addButtonClass = (disabled) ? "upload_button_dis upload_font " + (String)component.getAttributes().get("addButtonClassDisabled")
+ : "upload_button upload_font " + (String)component.getAttributes().get("addButtonClass");
+ String addButtonClassContent = (disabled) ? "upload_button_content upload_font upload_ico upload_ico_add_dis " + (String)component.getAttributes().get("addButtonClassDisabled")
+ : "upload_button_content upload_font upload_ico upload_ico_add " + (String)component.getAttributes().get("addButtonClass");
+ String uploadListClass = (disabled) ? (String)component.getAttributes().get("uploadListClassDisabled") : (String)component.getAttributes().get("uploadListClass");
+ variables.setVariable("addButtonClass",addButtonClass);
+ variables.setVariable("addButtonClassContent",addButtonClassContent);
+ variables.setVariable("uploadListClass",uploadListClass);
+
+ ]]>
+</jsp:scriptlet>
+
+
+<div class="upload_list_decor" style="width: #{component.attributes['listWidth']}" id="#{clientId}">
<iframe name="#{clientId}" id="#{clientId}_iframe" style="display: none;"/>
@@ -37,10 +53,10 @@
<tr>
<td>
<div class="upload_button_border" style=" float:left;">
- <div class="upload_button upload_font #{component.attributes['addStyle']}" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'" onmouseout="this.className='upload_button upload_font'"
+ <div class="#{addButtonClass}" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'" onmouseout="this.className='upload_button upload_font'"
style="position: relative; overflow: hidden; width:70px"
id="#{clientId}:add1">
- <div class="upload_button_content upload_font upload_ico upload_ico_add #{component.attributes['addStyle']}"
+ <div class="#{addButtonClassContent}"
id="#{clientId}:add2" style="direction: rtl;">Add...</div>
<input type="file" style="cursor: pointer; z-index: 3; right: -10px; top: -10px; font-size: 10em; position: absolute"
class="hidden"
@@ -50,12 +66,12 @@
</div>
</div>
<div class="upload_button_border" style=" float:left;">
- <div class="upload_button upload_font #{component.attributes['uploadStyleDisabled']}" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
+ <div class="upload_button upload_font #{component.attributes['uploadButtonClassDisabled']}" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
onmouseout="this.className='upload_button upload_font'"
id="#{clientId}:upload1"
onclick="return $('#{clientId}').component.upload();">
<a href="#" class="upload_button_selection">
- <div class="upload_button_content upload_font upload_ico upload_ico_start_dis #{component.attributes['uploadStyleDisabled']}"
+ <div class="upload_button_content upload_font upload_ico upload_ico_start_dis #{component.attributes['uploadButtonClassDisabled']}"
id="#{clientId}:upload2">
<b>Upload</b>
</div>
@@ -68,12 +84,12 @@
<!-- -->
<div class="upload_button_border" style=" float:right">
- <div class="upload_button_dis upload_font #{component.attributes['cleanStyleDisabled']}" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
+ <div class="upload_button_dis upload_font #{component.attributes['cleanButtonClassDisabled']}" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
onmouseout="this.className='upload_button upload_font'"
onclick="return $('#{clientId}').component.clear();"
id="#{clientId}:clean1">
<a href="#" class="upload_button_selection">
- <div class="upload_button_content upload_font upload_ico upload_ico_clear_dis #{component.attributes['cleanStyleDisabled']}"
+ <div class="upload_button_content upload_font upload_ico upload_ico_clear_dis #{component.attributes['cleanButtonClassDisabled']}"
id="#{clientId}:clean2">Clean All</div>
</a>
</div>
@@ -82,7 +98,7 @@
</tr>
</table>
- <div class="upload_list_width upload_list_overflow" id="#{clientId}:fileItems">
+ <div class="upload_list_overflow #{uploadListClass}" style="width: #{component.attributes['listWidth']}; height: #{component.attributes['listHeight']}" id="#{clientId}:fileItems">
</div>
@@ -90,38 +106,50 @@
<script type="text/javascript">
FileUpload.CLASSES = {
ADD : {
- ENABLED : 'upload_button upload_font #{component.attributes["addStyle"]}',
- DISABLED : 'upload_button_dis upload_font #{component.attributes["addStyleDisabled"]}'
+ ENABLED : 'upload_button upload_font #{component.attributes["addButtonClass"]}',
+ DISABLED : 'upload_button_dis upload_font #{component.attributes["addButtonClassDisabled"]}'
},
ADD_CONTENT : {
- ENABLED : 'upload_button_content upload_font upload_ico upload_ico_add #{component.attributes["addStyle"]}',
- DISABLED : 'upload_button_content upload_font upload_ico upload_ico_add_dis #{component.attributes["addStyleDisabled"]}'
+ ENABLED : 'upload_button_content upload_font upload_ico upload_ico_add #{component.attributes["addButtonClass"]}',
+ DISABLED : 'upload_button_content upload_font upload_ico upload_ico_add_dis #{component.attributes["addButtonClassDisabled"]}'
},
UPDATE : {
- ENABLED : 'upload_button upload_font #{component.attributes["uploadStyle"]}',
- DISABLED : 'upload_button_dis upload_font #{component.attributes["uploadStyleDisabled"]}'
+ ENABLED : 'upload_button upload_font #{component.attributes["uploadButtonClass"]}',
+ DISABLED : 'upload_button_dis upload_font #{component.attributes["uploadButtonClassDisabled"]}'
},
UPDATE_CONTENT : {
- ENABLED : 'upload_button_content upload_font upload_ico upload_ico_start #{component.attributes["uploadStyle"]}',
- DISABLED : 'upload_button_content upload_font upload_ico upload_ico_start_dis #{component.attributes["uploadStyleDisabled"]}'
+ ENABLED : 'upload_button_content upload_font upload_ico upload_ico_start #{component.attributes["uploadButtonClass"]}',
+ DISABLED : 'upload_button_content upload_font upload_ico upload_ico_start_dis #{component.attributes["uploadButtonClassDisabled"]}'
},
CANCEL : {
- ENABLED : 'upload_button upload_font #{component.attributes["cancelStyle"]}',
- DISABLED : 'upload_button_dis upload_font #{component.attributes["cancelStyleDisabled"]}'
+ ENABLED : 'upload_button upload_font #{component.attributes["cancelButtonClass"]}',
+ DISABLED : 'upload_button_dis upload_font #{component.attributes["cancelButtonClassDisabled"]}'
},
CANCEL_CONTENT : {
- ENABLED : 'upload_button_content upload_font upload_ico upload_ico_stop #{component.attributes["cancelStyle"]}',
- DISABLED : 'upload_button_content upload_font upload_ico upload_ico_stop_dis #{component.attributes["cancelStyleDisabled"]}'
+ ENABLED : 'upload_button_content upload_font upload_ico upload_ico_stop #{component.attributes["cancelButtonClass"]}',
+ DISABLED : 'upload_button_content upload_font upload_ico upload_ico_stop_dis #{component.attributes["cancelButtonClassDisabled"]}'
},
CLEAN : {
- ENABLED : 'upload_button upload_font #{component.attributes["cleanStyle"]}',
- DISABLED : 'upload_button_dis upload_font #{component.attributes["cleanStyleDisabled"]}'
+ ENABLED : 'upload_button upload_font #{component.attributes["cleanButtonClass"]}',
+ DISABLED : 'upload_button_dis upload_font #{component.attributes["cleanButtonClassDisabled"]}'
},
CLEAN_CONTENT : {
- ENABLED : 'upload_button_content upload_font upload_ico upload_ico_clear #{component.attributes["cleanStyle"]}',
- DISABLED : 'upload_button_content upload_font upload_ico upload_ico_clear_dis #{component.attributes["cleanStyleDisabled"]}'
+ ENABLED : 'upload_button_content upload_font upload_ico upload_ico_clear #{component.attributes["cleanButtonClass"]}',
+ DISABLED : 'upload_button_content upload_font upload_ico upload_ico_clear_dis #{component.attributes["cleanButtonClassDisabled"]}'
+ },
+ FILE_ENTRY : {
+ ENABLED : '#{component.attributes["fileEntryClass"]}',
+ DISABLED : '#{component.attributes["fileEntryClassDisabled"]}'
+ },
+ FILE_ENTRY_CONTROL : {
+ ENABLED : '#{component.attributes["fileEntryControlClass"]}',
+ DISABLED : '#{component.attributes["fileEntryControlClassDisabled"]}'
+ },
+ UPLOAD_LIST : {
+ ENABLED : '#{component.attributes["uploadListClass"]}',
+ DISABLED : '#{component.attributes["uploadListClassDisabled"]}'
}
- };
+ };
var events = {
onupload : #{this:getAsEventHandler(context, component, "onupload")},
@@ -130,7 +158,7 @@
onerror : #{this:getAsEventHandler(context, component, "onerror")}
};
- new FileUpload('#{clientId}', #{this:getStopScript(context, component)}, #{this:getFileSizeScript(context, component)} ,'#{this:getProgressBarId(context, component)}', FileUpload.CLASSES, #{this:getLabelMarkup(context, component)}, '#{component.attributes["maxFiles"]}', events);
+ new FileUpload('#{clientId}', #{this:getStopScript(context, component)}, #{this:getFileSizeScript(context, component)} ,'#{this:getProgressBarId(context, component)}', FileUpload.CLASSES, #{this:getLabelMarkup(context, component)}, '#{component.attributes["maxFiles"]}', events, #{component.attributes["disabled"]});
</script>
</span>
16 years, 11 months
JBoss Rich Faces SVN: r6250 - in trunk/sandbox/ui/inplaceSelect/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-21 10:10:08 -0500 (Thu, 21 Feb 2008)
New Revision: 6250
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
component's corrected
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-02-21 15:07:01 UTC (rev 6249)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-02-21 15:10:08 UTC (rev 6250)
@@ -32,5 +32,25 @@
this.iframe.style.top = top + "px";
this.iframe.style.left = 0 + "px";
}
+ },
+
+ show : function($super) {
+ $super();
+ },
+
+ resetState : function() {
+ //var tempList = this.list.cloneNode(false);
+ //this.listParent.childNodes[1].firstChild.replaceChild(tempList, this.list);
+ //this.list = $(tempList.id);
+ this.activeItem = null;
+ this.isList = false;
+ },
+
+ getEventItem : function(event) {
+ var item = Event.findElement(event, "span");
+ if (this.listParent.parentNode.id == item.id) {
+ return;
+ }
+ return item;
}
});
Modified: trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-21 15:07:01 UTC (rev 6249)
+++ trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-21 15:10:08 UTC (rev 6250)
@@ -172,7 +172,7 @@
oneditactivated : #{this:getAsEventHandler(context, component, "oneditactivated")},
onviewactivated : #{this:getAsEventHandler(context, component, "onviewactivated")}};
- var richInplaceList = new Richfaces.InplaceSelectList('list#{clientId}', 'listParent#{clientId}', false,
+ var richInplaceList = new Richfaces.InplaceSelectList('list#{clientId}', 'listParent#{clientId}', true,
Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '100px', '100px', #{this:getItemsTextAsJSArray(context, component)}, null,
'#{clientId}inplaceTmpValue', 'shadow#{clientId}', 0, 0);
var richInplaceSelect = new Richfaces.InplaceSelect(richInplaceList, '#{clientId}', '#{clientId}inplaceTmpValue',
16 years, 11 months
JBoss Rich Faces SVN: r6249 - trunk/ui/dataTable.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-02-21 10:07:01 -0500 (Thu, 21 Feb 2008)
New Revision: 6249
Modified:
trunk/ui/dataTable/pom.xml
Log:
Remove unnecessary dependency from pom.xml
Modified: trunk/ui/dataTable/pom.xml
===================================================================
--- trunk/ui/dataTable/pom.xml 2008-02-21 14:59:24 UTC (rev 6248)
+++ trunk/ui/dataTable/pom.xml 2008-02-21 15:07:01 UTC (rev 6249)
@@ -53,10 +53,5 @@
<artifactId>inplaceInput</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.1</version>
- </dependency>
</dependencies>
</project>
16 years, 11 months
JBoss Rich Faces SVN: r6248 - in trunk: sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-02-21 09:59:24 -0500 (Thu, 21 Feb 2008)
New Revision: 6248
Modified:
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
trunk/ui/dataTable/pom.xml
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx
Log:
Added inplace inputs to headers with filter.
Modified: trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java 2008-02-21 14:56:02 UTC (rev 6247)
+++ trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java 2008-02-21 14:59:24 UTC (rev 6248)
@@ -14,6 +14,13 @@
public abstract class UIInplaceInput extends UIInput {
+ /**
+ * <p>The standard component type for this component.</p>
+ */
+ public static final String COMPONENT_TYPE = "org.richfaces.InplaceInput";
+
+ public static final String VALUE_SUFFIX = "value";
+
public abstract String getDefaultLabel();
public abstract void setDefaultLabel(String label);
Modified: trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-21 14:56:02 UTC (rev 6247)
+++ trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-21 14:59:24 UTC (rev 6248)
@@ -64,7 +64,7 @@
throw new NullPointerException("component " + inplaceInput.getClientId(context) + " client id is NULL" );
}
- clientId = clientId + "value";
+ clientId = clientId + UIInplaceInput.VALUE_SUFFIX;
Map request = context.getExternalContext().getRequestParameterMap();
if (request.containsKey(clientId)) {
String newValue = (String)request.get(clientId);
Modified: trunk/ui/dataTable/pom.xml
===================================================================
--- trunk/ui/dataTable/pom.xml 2008-02-21 14:56:02 UTC (rev 6247)
+++ trunk/ui/dataTable/pom.xml 2008-02-21 14:59:24 UTC (rev 6248)
@@ -48,5 +48,15 @@
<version>3.2.0-SNAPSHOT</version>
</dependency>
-->
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>inplaceInput</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.1</version>
+ </dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-21 14:56:02 UTC (rev 6247)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-21 14:59:24 UTC (rev 6248)
@@ -22,28 +22,27 @@
package org.richfaces.renderkit;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import javax.el.ELContext;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.component.UIDataAdaptor;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.ajax4jsf.resource.InternetResource;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.iterators.FilterIterator;
import org.richfaces.component.Column;
import org.richfaces.component.Row;
import org.richfaces.component.UIDataTable;
+import org.richfaces.component.UIInplaceInput;
import org.richfaces.model.Ordering;
/**
@@ -54,6 +53,8 @@
private static final String SORT_FILTER_PARAMETER = "fsp";
+ private UIInplaceInput filterValueInput = null;
+
/**
* Encode all table structure - colgroups definitions, caption, header,
* footer
@@ -232,12 +233,8 @@
ajaxFunction.addParameter(eventOptions);
StringBuffer buffer = new StringBuffer();
ajaxFunction.appendScript(buffer);
- writer.startElement(HTML.INPUT_ELEM, column);
- writer.writeAttribute(HTML.TYPE_ATTR, "text", null);
- writer.writeAttribute(HTML.NAME_ATTRIBUTE, column.getClientId(context) + SORT_FILTER_PARAMETER, null);
- writer.writeAttribute(HTML.value_ATTRIBUTE, column.getAttributes().get("filterValue"), null);
- writer.writeAttribute(HTML.onchange_ATTRIBUTE, buffer.toString(), null);
- writer.endElement(HTML.INPUT_ELEM);
+
+ encodeInplaceInput(context, column, buffer);
}
}
writer.endElement(element);
@@ -527,7 +524,8 @@
column.setSortOrder(Ordering.UNSORTED);
}
}
- String filterValue = map.get(children.getClientId(context) + SORT_FILTER_PARAMETER);
+ String filterValue = map.get(children.getClientId(context) + SORT_FILTER_PARAMETER +
+ UIInplaceInput.VALUE_SUFFIX);
if (filterValue != null) {
column.setFilterValue(filterValue);
}
@@ -538,4 +536,16 @@
.addComponentToAjaxRender(component);
}
}
+
+ protected void encodeInplaceInput(FacesContext context, UIComponent column, StringBuffer buffer)
+ throws IOException {
+ if (null == filterValueInput) {
+ filterValueInput = (UIInplaceInput) context.getApplication().createComponent(UIInplaceInput.COMPONENT_TYPE);
+ filterValueInput.setId(column.getId() + SORT_FILTER_PARAMETER);
+ column.getParent().getChildren().add(filterValueInput);
+ }
+ filterValueInput.getAttributes().put("onviewactivated", buffer.toString());
+ filterValueInput.setValue(column.getAttributes().get("filterValue"));
+ renderChild(context, filterValueInput);
+ }
}
\ No newline at end of file
Modified: trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx
===================================================================
--- trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx 2008-02-21 14:56:02 UTC (rev 6247)
+++ trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx 2008-02-21 14:59:24 UTC (rev 6248)
@@ -13,7 +13,11 @@
component="org.richfaces.component.UIDataTable"
>
<h:styles>css/table.xcss</h:styles>
- <h:scripts>new org.ajax4jsf.javascript.AjaxScript()</h:scripts>
+ <h:scripts>
+ new org.ajax4jsf.javascript.AjaxScript(),
+ new org.ajax4jsf.javascript.PrototypeScript(),
+ /org/richfaces/renderkit/html/scripts/inplaceinput.js
+ </h:scripts>
<f:clientid var="clientId"/>
<table id="#{clientId}"
class="dr-table rich-table #{component.attributes['styleClass']}" style="#{component.attributes['style']}"
16 years, 11 months