JBoss Rich Faces SVN: r19485 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-10-06 21:54:46 -0400 (Wed, 06 Oct 2010)
New Revision: 19485
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-Data_definition_list.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-richlist_example.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richlist-Data_definition_list.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richlist-Ordered_list.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richlist-Unordered_list.png
Removed:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richdataDefinitionList_example.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richdataDefinitionList_example.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richdataOrderedList_example.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richdataList-richdataList_example.png
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
Log:
Made minor tech review updates for inplaceInput, tabPanel, inputNumberSpinner, collapsiblePanel, list
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-10-06 23:10:52 UTC (rev 19484)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-10-07 01:54:46 UTC (rev 19485)
@@ -491,12 +491,14 @@
<section id="sect-Component_Reference-richcollapsiblePanel-Basic_usage">
<title>Basic usage</title>
<para>
- Basic usage requires only the <varname>label</varname> attribute to be specified, which provides the title for the header element.
+ Basic usage requires the <varname>header</varname> attribute to be specified, which provides the title for the header element. Additionally the panel requires content to display when it is expanded. Content is added as child elements like a standard panel.
</para>
</section>
-
+
<section id="sect-Component_Reference-richcollapsiblePanel-Expanding_and_collapsing_the_panel">
<title>Expanding and collapsing the panel</title>
+ <!-- TODO not in M3 -->
+ <!--
<para>
If the <sgmltag><rich:collapsiblePanel></sgmltag> component uses <code><varname>expanded</varname>="true"</code>, the panel is open and expanded, otherwise it is closed and collapsed.
</para>
@@ -505,7 +507,7 @@
</para>
<variablelist>
<varlistentry>
- <term><literal>heading</literal></term>
+ <term><literal>header</literal></term>
<listitem>
<para>
This is the default setting. Clicking anywhere on the header of the panel will cause it to expand or collapse.
@@ -529,6 +531,7 @@
</listitem>
</varlistentry>
</variablelist>
+ -->
<para>
The switching mode for performing submissions is determined by the <varname>switchType</varname> attribute, which can have one of the following three values:
</para>
@@ -638,7 +641,7 @@
<section id="sect-Component_Reference-richtab-Basic_usage">
<title>Basic usage</title>
<para>
- Basic usage of the <sgmltag><rich:tab></sgmltag> component requires the <varname>label</varname> attribute, which provides the text on the tab header. The content of the tab is then detailed inside the <sgmltag><rich:tab></sgmltag> tags.
+ Basic usage of the <sgmltag><rich:tab></sgmltag> component requires the <varname>header</varname> attribute, which provides the text on the tab header. The content of the tab is then detailed inside the <sgmltag><rich:tab></sgmltag> tags.
</para>
<para>
Alternatively the <literal>header</literal> facet could be used in place of the <varname>label</varname> attribute. This would allow for additional styles and custom content to be applied to the tab.
@@ -648,12 +651,14 @@
<section id="sect-Component_Reference-richtab-Switching_tabs">
<title>Switching tabs</title>
<para>
- The switching mode for performing submissions can be inherited from the <varname>switchMode</varname> attribute of the parent <sgmltag><rich:tabPanel></sgmltag> component, or set individually for each <sgmltag><rich:tab></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtabPanel" /> for details on the <varname>switchMode</varname> attribute.
+ The switching mode for performing submissions can be inherited from the <varname>switchType</varname> attribute of the parent <sgmltag><rich:tabPanel></sgmltag> component, or set individually for each <sgmltag><rich:tab></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtabPanel" /> for details on the <varname>switchType</varname> attribute.
</para>
<para>
An individual tab can be disabled by setting <code><varname>disabled</varname>="true"</code>. Disabled tabs cannot be activated or switched to.
</para>
</section>
+
+ <!-- FIXME details on header facets -->
<section id="sect-Component_Reference-richtab-richtab_client-side_events">
<title><sgmltag><rich:tab></sgmltag> client-side events</title>
@@ -770,7 +775,11 @@
The <code>activeItem</code> attribute holds the active tab name.
</para>
</section>
-
+
+ <!-- FIXME details on name attribute -->
+
+ <!-- TODO not in M3 -->
+ <!--
<section id="sect-Component_Reference-richtabPanel-Tab_position_and_alignment">
<title>Tab position and alignment</title>
<para>
@@ -856,6 +865,7 @@
</varlistentry>
</variablelist>
</section>
+ -->
<section id="sect-Component_Reference-richtabPanel-richtabPanel_client-side_events">
<title><sgmltag><rich:tabPanel></sgmltag> client-side events</title>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-10-06 23:10:52 UTC (rev 19484)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-10-07 01:54:46 UTC (rev 19485)
@@ -378,7 +378,7 @@
<section id="sect-Component_Reference-Rich_inputs-richinplaceInput">
<title><sgmltag><rich:inplaceInput></sgmltag></title>
<para>
- The <sgmltag><rich:inplaceInput></sgmltag> component allows information to be entered in-line in blocks of text, improving readability of the text. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can input text; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
+ The <sgmltag><rich:inplaceInput></sgmltag> component allows information to be entered in-line in blocks of text, improving readability of the text. Multiple input regions can be navigated with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can input text; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
<section id="sect-Component_Reference-richinplaceInput-Basic_usage">
@@ -399,9 +399,14 @@
By default, the event to switch the component to the "edit" state is a single mouse click. This can be changed using the <varname>editEvent</varname> attribute to specify a different event.
</para>
<para>
- The user can confirm and save their input by pressing the <keycap>Enter</keycap> key or cancel by pressing the <keycap>Esc</keycap> key. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>. These buttons can be positioned using the <varname>controlsHorizontalPosition</varname> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <varname>controlsVerticalPosition</varname> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <varname>saveControlIcon</varname> and <varname>cancelControlIcon</varname>. Further customization is possible through the use of facets.
+ The user can confirm and save their input by pressing the <keycap>Enter</keycap> key or cancel by pressing the <keycap>Esc</keycap> key. Alternatively, buttons for confirming or canceling can be added to the component by setting <code>showControls="true"</code>.
+ <!-- TODO not in M3
+ These buttons can be positioned using the <varname>controlsHorizontalPosition</varname> attribute with settings of <literal>left</literal>, <literal>right</literal>, or <literal>center</literal>, and the <varname>controlsVerticalPosition</varname> attribute with settings <literal>bottom</literal>, <literal>center</literal>, or <literal>top</literal>. The confirmation control icons can be altered using the <varname>saveControlIcon</varname> and <varname>cancelControlIcon</varname>. Further customization is possible through the use of facets.
+ -->
</para>
</section>
+
+ <!-- FIXME default label functionality -->
<!-- TODO not in M3
<section id="sect-Component_Reference-richinplaceInput-richinplaceInput_events">
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-10-06 23:10:52 UTC (rev 19484)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-10-07 01:54:46 UTC (rev 19485)
@@ -965,7 +965,7 @@
<title>Unordered list</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataList-richdataList_example.png" format="PNG" />
+ <imagedata fileref="images/figu-Component_Reference-richlist-Unordered_list.png" format="PNG" />
</imageobject>
<textobject>
<para>
@@ -986,7 +986,7 @@
<title>Ordered list</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-richdataOrderedList_example.png" format="PNG" />
+ <imagedata fileref="images/figu-Component_Reference-richlist-Ordered_list.png" format="PNG" />
</imageobject>
<textobject>
<para>
@@ -998,16 +998,23 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>data</literal></term>
+ <term><literal>definitions</literal></term>
<listitem>
<para>
The list is presented as a series of data definitions. Part of the data model, specified as the term, is listed prominently. The other associated data is listed after each term.
</para>
+ <para>
+ The term is marked using the <literal>term</literal> facet. The facet is required for all definition lists. Use of the facet is shown in <xref linkend="exam-Component_Reference-richlist-Data_definition_list" />.
+ </para>
+ <example id="exam-Component_Reference-richlist-Data_definition_list">
+ <title>Data definition list</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richlist-Data_definition_list.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
<figure id="figu-Component_Reference-richlist-Data_definition_list">
<title>Data definition list</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-richdataDefinitionList_example.png" format="PNG" />
+ <imagedata fileref="images/figu-Component_Reference-richlist-Data_definition_list.png" format="PNG" />
</imageobject>
<textobject>
<para>
@@ -1117,17 +1124,17 @@
<section id="sect-Component_Reference-richlist-Customizing_the_list">
<title>Customizing the list</title>
<para>
- The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <varname>title</varname> attribute is used for a floating tool-tip. <xref linkend="exam-Component_Reference-richlist-richlist_example" /> shows a simple example using the <sgmltag><rich:dataList></sgmltag> component.
+ The <varname>first</varname> attribute specifies which item in the data model to start from, and the <varname>rows</varname> attribute specifies the number of items to list. The <varname>title</varname> attribute is used for a floating tool-tip. <xref linkend="exam-Component_Reference-richlist-richlist_example" /> shows a simple example using the <sgmltag><rich:list></sgmltag> component.
</para>
<example id="exam-Component_Reference-richlist-richlist_example">
<title><sgmltag><rich:list></sgmltag> example</title>
- <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-richlist-richlist_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
<blockquote>
<figure id="figu-Component_Reference-richlist-richlist_example">
<title><sgmltag><rich:list></sgmltag> example</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Component_Reference-richdataList-richdataList_example.png" format="PNG" />
+ <imagedata fileref="images/figu-Component_Reference-richlist-Unordered_list.png" format="PNG" />
</imageobject>
<textobject>
<para>
Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richdataDefinitionList_example.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richdataDefinitionList_example.xml_sample 2010-10-06 23:10:52 UTC (rev 19484)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richdataDefinitionList_example.xml_sample 2010-10-07 01:54:46 UTC (rev 19485)
@@ -1,11 +0,0 @@
-<h:form>
- <rich:dataDefinitionList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" first="4" title="Cars">
- <f:facet name="term">
- <h:outputText value="#{car.make} #{car.model}"></h:outputText>
- </f:facet>
- <h:outputText value="Price:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.price}" /><br/>
- <h:outputText value="Mileage:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.mileage}" /><br/>
- </rich:dataDefinitionList>
-</h:form>
Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample 2010-10-06 23:10:52 UTC (rev 19484)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample 2010-10-07 01:54:46 UTC (rev 19485)
@@ -1,9 +0,0 @@
-<h:form>
- <rich:dataList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="unordered" title="Car Store">
- <h:outputText value="#{car.make} #{car.model}"/><br/>
- <h:outputText value="Price:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.price} "/><br/>
- <h:outputText value="Mileage:" styleClass="label"></h:outputText>
- <h:outputText value="#{car.mileage} "/><br/>
- </rich:dataList>
-</h:form>
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-Data_definition_list.xml_sample (from rev 19482, modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richdataDefinitionList_example.xml_sample)
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-Data_definition_list.xml_sample (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-Data_definition_list.xml_sample 2010-10-07 01:54:46 UTC (rev 19485)
@@ -0,0 +1,11 @@
+<h:form>
+ <rich:list var="car" value="#{dataTableScrollerBean.allCars}" type="definitions" rows="5" title="Cars">
+ <f:facet name="term">
+ <h:outputText value="#{car.make} #{car.model}"></h:outputText>
+ </f:facet>
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.price}" /><br/>
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.mileage}" /><br/>
+ </rich:list>
+</h:form>
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-richlist_example.xml_sample (from rev 19482, modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richdataList-richdataList_example.xml_sample)
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-richlist_example.xml_sample (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richlist-richlist_example.xml_sample 2010-10-07 01:54:46 UTC (rev 19485)
@@ -0,0 +1,9 @@
+<h:form>
+ <rich:list var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="unordered" title="Car Store">
+ <h:outputText value="#{car.make} #{car.model}"/><br/>
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.price} "/><br/>
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car.mileage} "/><br/>
+ </rich:list>
+</h:form>
Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richdataDefinitionList_example.png
===================================================================
(Binary files differ)
Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richdataOrderedList_example.png
===================================================================
(Binary files differ)
Deleted: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richdataList-richdataList_example.png
===================================================================
(Binary files differ)
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richlist-Data_definition_list.png (from rev 19482, modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richdataDefinitionList_example.png)
===================================================================
(Binary files differ)
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richlist-Ordered_list.png (from rev 19482, modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richdataOrderedList_example.png)
===================================================================
(Binary files differ)
Copied: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richlist-Unordered_list.png (from rev 19482, modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-richdataList-richdataList_example.png)
===================================================================
(Binary files differ)
13 years, 11 months
JBoss Rich Faces SVN: r19484 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-10-06 19:10:52 -0400 (Wed, 06 Oct 2010)
New Revision: 19484
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
Log:
Removed delayed components (autocompleteBehavior, inplaceSelect) from Component Reference
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-10-06 23:04:10 UTC (rev 19483)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2010-10-06 23:10:52 UTC (rev 19484)
@@ -14,7 +14,7 @@
This chapter details those components which act as panels and containers to hold groups of other components.
</para>
- <!-- TODO not in M2 -->
+ <!-- TODO not in M3 -->
<!--
<para>
This chapter details rich components for user input and interaction.
@@ -97,7 +97,7 @@
</section>
-->
- <!-- TODO not in M2 -->
+ <!-- TODO not in M3 -->
<!--
<section id="sect-Component_Reference-Rich_inputs-richcolorPicker">
<title><sgmltag><rich:colorPicker></sgmltag></title>
@@ -231,7 +231,9 @@
</section>
</section>
+ <!-- TODO not in M3 -->
<!--<rich:autocompleteBehavior>-->
+ <!--
<section id="sect-Component_Reference-Rich_inputs-richautocompleteBehavior">
<title><sgmltag><rich:autocompleteBehavior></sgmltag></title>
<para>
@@ -278,8 +280,9 @@
</itemizedlist>
</section>
</section>
+ -->
- <!-- TODO not in M2 -->
+ <!-- TODO not in M3 -->
<!--
<section id="sect-Component_Reference-Rich_inputs-richeditor">
<title><sgmltag><rich:editor></sgmltag></title>
@@ -400,7 +403,7 @@
</para>
</section>
- <!-- TODO
+ <!-- TODO not in M3
<section id="sect-Component_Reference-richinplaceInput-richinplaceInput_events">
<title><sgmltag><rich:inplaceInput></sgmltag> events</title>
<para>
@@ -463,7 +466,9 @@
</section>
</section>
+ <!-- TODO not in M3 -->
<!--<rich:inplaceSelect>-->
+ <!--
<section id="sect-Component_Reference-Rich_inputs-richinplaceSelect">
<title><sgmltag><rich:inplaceSelect></sgmltag></title>
<para>
@@ -567,6 +572,7 @@
</itemizedlist>
</section>
</section>
+ -->
<!--<rich:inputNumberSlider>-->
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSlider">
@@ -715,6 +721,7 @@
</section>
</section>
+ <!-- TODO not in M3 -->
<!--<rich:suggestionBox>-->
<!--
<section id="sect-Component_Reference-Rich_inputs-richsuggestionBox">
13 years, 11 months
JBoss Rich Faces SVN: r19483 - in branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces: renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-10-06 19:04:10 -0400 (Wed, 06 Oct 2010)
New Revision: 19483
Added:
branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/FormClientValidatorRenderer.java
Modified:
branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorBehavior.java
branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java
Log:
CODING IN PROGRESS - issue RF-9219: CSV: development tests for server side(junit)
https://jira.jboss.org/browse/RF-9219
Modified: branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorBehavior.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorBehavior.java 2010-10-06 16:50:13 UTC (rev 19482)
+++ branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorBehavior.java 2010-10-06 23:04:10 UTC (rev 19483)
@@ -30,6 +30,11 @@
*/
Converter getConverter(ClientBehaviorContext context) throws ConverterNotFoundException;
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param context
+ * @return
+ */
Collection<ValidatorDescriptor> getValidators(ClientBehaviorContext context);
}
\ No newline at end of file
Modified: branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java 2010-10-06 16:50:13 UTC (rev 19482)
+++ branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java 2010-10-06 23:04:10 UTC (rev 19483)
@@ -26,12 +26,21 @@
import java.util.Collections;
import javax.faces.FacesException;
+import javax.faces.component.ActionSource;
import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIMessage;
import javax.faces.component.behavior.ClientBehaviorBase;
import javax.faces.component.behavior.ClientBehaviorContext;
+import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
+import javax.faces.render.ClientBehaviorRenderer;
+import javax.faces.render.RenderKit;
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
+import org.richfaces.renderkit.html.ClientValidatorRenderer;
+import org.richfaces.renderkit.html.FormClientValidatorRenderer;
+
/**
* <p class="changed_added_4_0">
* </p>
@@ -41,31 +50,82 @@
*/
public class ClientValidatorImpl extends ClientBehaviorBase implements ClientValidatorBehavior {
+ public static final String BEHAVIOR_TYPE = "org.richfaces.behavior.ClientValidator";
+
+ private static final Logger LOG = RichfacesLogger.COMPONENTS.getLogger();
+
@Override
public String getScript(ClientBehaviorContext behaviorContext) {
- if (!(behaviorContext.getComponent() instanceof EditableValueHolder)) {
- //TODO : implement form level validator for ActionSource components in next iteration , probably on M5 - RC1
+ if (behaviorContext.getComponent() instanceof EditableValueHolder) {
+ return super.getScript(behaviorContext);
+ } else if (behaviorContext.getComponent() instanceof ActionSource) {
+ ClientBehaviorRenderer renderer =
+ getRenderer(behaviorContext.getFacesContext(), FormClientValidatorRenderer.RENDERER_TYPE);
+ return renderer.getScript(behaviorContext, this);
+ } else {
throw new FacesException("Invalid target for client-side validator behavior");
}
- return super.getScript(behaviorContext);
}
- /* (non-Javadoc)
- * @see org.richfaces.component.behavior.ClientValidatorBehavior#findMessages(javax.faces.component.behavior.ClientBehaviorContext)
+ @Override
+ public String getRendererType() {
+ return ClientValidatorRenderer.RENDERER_TYPE;
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * Look up for {@link ClientBehaviorRenderer} instence
+ * </p>
+ *
+ * @param context
+ * current JSF context
+ * @param rendererType
+ * desired renderer type
+ * @return renderer instance
+ * @throws {@link FacesException} if renderer can not be found
*/
+ protected ClientBehaviorRenderer getRenderer(FacesContext context, String rendererType) {
+ if (null == context || null == rendererType) {
+ throw new NullPointerException();
+ }
+ ClientBehaviorRenderer renderer = null;
+ RenderKit renderKit = context.getRenderKit();
+ if (null != renderKit) {
+ renderer = renderKit.getClientBehaviorRenderer(rendererType);
+ if (null == renderer) {
+ throw new FacesException("No ClientBehaviorRenderer found for type " + rendererType);
+ }
+ } else {
+ throw new FacesException("No renderkit available");
+ }
+ return renderer;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.component.behavior.ClientValidatorBehavior#findMessages(javax.faces.component.behavior.
+ * ClientBehaviorContext)
+ */
public Collection<UIMessage> findMessages(ClientBehaviorContext context) throws MessageNotFoundException {
return Collections.emptySet();
}
- /* (non-Javadoc)
- * @see org.richfaces.component.behavior.ClientValidatorBehavior#getConverter(javax.faces.component.behavior.ClientBehaviorContext)
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.component.behavior.ClientValidatorBehavior#getConverter(javax.faces.component.behavior.
+ * ClientBehaviorContext)
*/
public Converter getConverter(ClientBehaviorContext context) throws ConverterNotFoundException {
return null;
}
- /* (non-Javadoc)
- * @see org.richfaces.component.behavior.ClientValidatorBehavior#getValidators(javax.faces.component.behavior.ClientBehaviorContext)
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.component.behavior.ClientValidatorBehavior#getValidators(javax.faces.component.behavior.
+ * ClientBehaviorContext)
*/
public Collection<ValidatorDescriptor> getValidators(ClientBehaviorContext context) {
return Collections.emptySet();
Added: branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/FormClientValidatorRenderer.java
===================================================================
--- branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/FormClientValidatorRenderer.java (rev 0)
+++ branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/FormClientValidatorRenderer.java 2010-10-06 23:04:10 UTC (rev 19483)
@@ -0,0 +1,37 @@
+/*
+ * $Id$
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.richfaces.renderkit.html;
+
+import javax.faces.render.ClientBehaviorRenderer;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class FormClientValidatorRenderer extends ClientBehaviorRenderer {
+
+ public static final String RENDERER_TYPE="orf.richfaces.FormValidatorRenderer";
+
+}
Property changes on: branches/RF-8742/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/FormClientValidatorRenderer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 11 months
JBoss Rich Faces SVN: r19482 - in branches/RF-8742: archetypes/rf-gae-sample and 26 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-10-06 12:50:13 -0400 (Wed, 06 Oct 2010)
New Revision: 19482
Added:
branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java
branches/RF-8742/core/api/src/main/java/org/richfaces/renderkit/util/ColorUtils.java
branches/RF-8742/core/api/src/main/java/org/richfaces/resource/Java2DAnimatedUserResource.java
branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DAnimatedUserResourceWrapperImpl.java
branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/
branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/
branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
branches/RF-8742/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java
Removed:
branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/org/
branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TabHeaderGradient.java
branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TopTabHeaderGradient.java
branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/
branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml
branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml
Modified:
branches/RF-8742/
branches/RF-8742/archetypes/rf-gae-sample/pom.xml
branches/RF-8742/archetypes/rf-gae-sample/readme.txt
branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml
branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml
branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt
branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java
branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
branches/RF-8742/core/api/src/main/java/org/richfaces/resource/ImageType.java
branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DUserResourceWrapperImpl.java
branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java
branches/RF-8742/dist/readme-ui.txt
branches/RF-8742/examples/iteration-demo/src/main/webapp/dataGrid.xhtml
branches/RF-8742/examples/richfaces-showcase/pom.xml
branches/RF-8742/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java
branches/RF-8742/ui/dist/richfaces-components-ui/pom.xml
branches/RF-8742/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
branches/RF-8742/ui/output/ui/pom.xml
branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java
branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java
branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java
branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java
branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss
branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
branches/RF-8742/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Log:
Merged revisions 19431,19434-19441,19443-19444,19446,19468,19470,19477 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r19431 | nbelaevski | 2010-10-04 10:04:35 -0700 (Mon, 04 Oct 2010) | 1 line
https://jira.jboss.org/browse/RF-9397
.......
r19434 | nbelaevski | 2010-10-04 10:27:49 -0700 (Mon, 04 Oct 2010) | 1 line
https://jira.jboss.org/browse/RF-9270
.......
r19435 | jbalunas(a)redhat.com | 2010-10-04 12:16:38 -0700 (Mon, 04 Oct 2010) | 1 line
RF-9400, RF-9404 - fixed filtering overrides, and updated version correctly
.......
r19436 | jbalunas(a)redhat.com | 2010-10-04 12:32:49 -0700 (Mon, 04 Oct 2010) | 1 line
RF-9409 fixed simple archetype so that it uses packages
.......
r19437 | nbelaevski | 2010-10-04 12:43:13 -0700 (Mon, 04 Oct 2010) | 2 lines
https://jira.jboss.org/browse/RF-9405
https://jira.jboss.org/browse/RF-8779
.......
r19438 | nbelaevski | 2010-10-04 14:42:02 -0700 (Mon, 04 Oct 2010) | 1 line
https://jira.jboss.org/browse/RF-9406
.......
r19439 | jbalunas(a)redhat.com | 2010-10-04 14:44:13 -0700 (Mon, 04 Oct 2010) | 1 line
RF-9411 Updated archetype, and readme files to describe deploying to GAE SDK developer server
.......
r19440 | nbelaevski | 2010-10-04 16:52:08 -0700 (Mon, 04 Oct 2010) | 1 line
https://jira.jboss.org/browse/RF-9413
.......
r19441 | nbelaevski | 2010-10-04 17:00:43 -0700 (Mon, 04 Oct 2010) | 1 line
ProgressBarBean.java made Serializable
.......
r19443 | jbalunas(a)redhat.com | 2010-10-04 17:52:14 -0700 (Mon, 04 Oct 2010) | 1 line
Prep for M3 respin
.......
r19444 | jbalunas(a)redhat.com | 2010-10-04 18:08:26 -0700 (Mon, 04 Oct 2010) | 1 line
[maven-release-plugin] prepare release 4.0.0.20101004-M3
.......
r19446 | jbalunas(a)redhat.com | 2010-10-04 18:09:24 -0700 (Mon, 04 Oct 2010) | 1 line
[maven-release-plugin] prepare for next development iteration
.......
r19468 | abelevich | 2010-10-06 04:03:20 -0700 (Wed, 06 Oct 2010) | 1 line
fix sample
.......
r19470 | abelevich | 2010-10-06 04:52:43 -0700 (Wed, 06 Oct 2010) | 1 line
https://jira.jboss.org/browse/RF-9422
.......
r19477 | abelevich | 2010-10-06 06:43:08 -0700 (Wed, 06 Oct 2010) | 1 line
.......
Property changes on: branches/RF-8742
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-19430
+ /trunk:1-19481
Modified: branches/RF-8742/archetypes/rf-gae-sample/pom.xml
===================================================================
--- branches/RF-8742/archetypes/rf-gae-sample/pom.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/archetypes/rf-gae-sample/pom.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -17,10 +17,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <!-- Setting this property for resource filtering so that generated project
- uses correct version of richfaces.
- -->
- <archetype.project.version>${project.version}</archetype.project.version>
</properties>
<build>
@@ -39,9 +35,17 @@
</plugin>
</plugins>
<resources>
+ <!-- Selectively trigger filtering on resource directory
+ The second element turns on filtering only for META-INF directory
+ -->
<resource>
- <directory>src/main/resources</directory>
+ <directory>src/main/resources/</directory>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources/META-INF/maven</directory>
<filtering>true</filtering>
+ <targetPath>META-INF/maven</targetPath>
</resource>
</resources>
</build>
Modified: branches/RF-8742/archetypes/rf-gae-sample/readme.txt
===================================================================
--- branches/RF-8742/archetypes/rf-gae-sample/readme.txt 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/archetypes/rf-gae-sample/readme.txt 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,51 +1,46 @@
RichFaces 4 Archetype
-BUILDING THE ARCHETYPE
+GENERATING THE PROJECT
-just execute mvn clean install in the root folder
+This archetype creates a simple RichFaces 4 application with all the settings and custom artifacts you need to perform deploy to GAE cloud.
-APPLICATION CREATION
-
-This archetype creates a simple RichFaces 4 application with all the settings and custom artifacts you need to perform deply to GAE cloud.
-
1) To generate a project from the archetype, run
mvn archetype:generate -DarchetypeGroupId=org.richfaces.archetypes -DarchetypeArtifactId=richfaces-archetype-gae -DarchetypeVersion=<richfaces-version>
-DgroupId=<yourGroupId> -DartifactId=<yourArtifactId> -Dversion=1.0-SNAPSHOT
-2) To build the project for deploy to GAE cloud, run
+2) Navigate into the new project directory and build by running:
mvn clean install
-*BEFORE NEXT STEP - you should setup your GAE account at http://appspot.com and register new application there.
-(read more at http://code.google.com/intl/ru/appengine/docs/python/gettingstarted/uploa...)
+*BEFORE NEXT STEP:
+ -- You should setup your GAE account at http://appspot.com
+ -- Register your new application there. By default the applications name is "rf-${artifactId}"
+ -- Download and install the GAE SDK for deployment and local server tools
-3) Then just execute appcfg from GAE SDK(link) to publish to your account:
+3) Execute appcfg from GAE SDK to publish to your account:
appcfg update <PATH: "generated-application-target-folder/output application folder">
-NOTE:Do not forget to register your own application name and make sure that the demo uses the same name accordingly.
-
-
-4) now visit your application using http://<application-name>.appspot.com
+4) Once uploaded, visit your application using http://<application-name>.appspot.com
4.1) check all the information about deployed application at https://appengine.google.com/dashboard?&app_id=<your-application-id>
+NOTE:
+During build the "org.richfaces.cdk:maven-resource-plugin" executed and generated static resources(web-app\static-resources\) for all skins in order to
+solve the compatibility problem with GAE and java2D API.
-PAY ATTENTION:
-during build with GAE profile - our org.richfaces.cdk:maven-resource-plugin executed and generates static resources(web-app\static-resources\) for all the skins in order to
-solve the compatibility problem with GAE which restricts java2D usage(our dynamic resources works using that dependency)
-
-NOTES about additional artifacts in webapp folder:
+NOTE: about additional artifacts in webapp folder:
1) java-gae-jsf-ri - contains modified WebConfiguration.java class which will be put to Web-inf\classes when building with GAE profile. It solves compatibilities
issues exist in GAE for JSF applications.
-2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. Them will be placed to WEb-inf folder after build with GAE profile. web.xml
-should be different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
+2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. They will be placed in the WEB-INF folder. The web.xml
+is different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
com.sun.faces.enableThreading context parameter as GAE not allows threads.
============================================================================================================
-LOCAL DEPLOYMENT
-you still could deploy your application as usually using
-1) mvn clean install
-2) put to tomcat6\webapps
-3) run server
-4) enjoy going to http:\\localhost:8080\<app-name>
\ No newline at end of file
+LOCAL DEPLOYMENTS
+To test your application on your local machine you can use GAE SDK development server.
+1) Build archetype as above
+2) Navigate GAE SDK /bin
+3) Execute"
+ ./dev_appserver.sh <PATH: "generated-application-target-folder/output application folder">
+4) Once loaded, access your application at http:\\localhost:8080\
\ No newline at end of file
Modified: branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/META-INF/maven/archetype-metadata.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -2,6 +2,11 @@
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript... http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="gae-sample"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descript..."
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <requiredProperties>
+ <requiredProperty key="richfaces-version">
+ <defaultValue>${project.version}</defaultValue>
+ </requiredProperty>
+ </requiredProperties>
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
Modified: branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml
===================================================================
--- branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -26,10 +26,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <!-- Setting this property for resource filtering so that generated project
- uses correct version of richfaces.
+ <!-- Setting this property using archetype-metadata.xml requiredPorperty
+ so that generated project uses correct version of richfaces.
-->
- <org.richfaces.bom.version>${archetype.project.version}</org.richfaces.bom.version>
+ <org.richfaces.bom.version>${richfaces-version}</org.richfaces.bom.version>
</properties>
<build>
@@ -127,78 +127,9 @@
</execution>
</executions>
</plugin>
-
</plugins>
</build>
- <profiles>
- <profile>
- <id>jee6</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>release</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <executions>
- <execution>
- <id>jee6</id>
- <phase>package</phase>
- <goals>
- <goal>war</goal>
- </goals>
- <configuration>
- <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
- <classifier>jee6</classifier>
- <packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/slf4j-*</packagingExcludes>
- <warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/slf4j-*</warSourceExcludes>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <webResources>
- <resource>
- <directory>${basedir}/src/main/java</directory>
- <targetPath>/WEB-INF/src</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
<dependencyManagement>
<dependencies>
<dependency>
@@ -239,33 +170,12 @@
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
+
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
-
- <dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
-
- <!--
- simple logger binding: only messages of level INFO and
- higher are printed
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.5.8</version>
- </dependency>
-
- <!-- Log4J dependency used in examples -->
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
-
+
<!-- Tests -->
<dependency>
<groupId>org.testng</groupId>
@@ -274,8 +184,8 @@
<classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
+
<!-- GAE PROFILE DEPENDENCIES -->
-
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
@@ -310,6 +220,5 @@
<version>2.9.1</version>
<scope>runtime</scope>
</dependency>
-
</dependencies>
</project>
Modified: branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt
===================================================================
--- branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/readme.txt 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,38 +1,37 @@
-Project generated with richfaces-archetype-gae
+RichFaces 4 Archetype
-1) To build the project for deploy to GAE cloud, run
+1) Build by running:
mvn clean install
-*BEFORE NEXT STEP - you should setup your GAE account at http://appspot.com and register new application there.
-(read more at http://code.google.com/intl/ru/appengine/docs/python/gettingstarted/uploa...)
+*BEFORE NEXT STEP:
+ -- You should setup your GAE account at http://appspot.com
+ -- Register your new application there. By default the applications name is "rf-${artifactId}"
+ -- Download and install the GAE SDK for deployment and local server tools
-2) Then just execute appcfg from GAE SDK(link) to publish to your account:
- appcfg update <PATH: "generated-application-target-folder/output application folder">
+3) Execute appcfg from GAE SDK to publish to your account:
+ appcfg update <PATH: "generated-application-target-folder/output application folder">
-NOTE:Do not forget to register your own application name and make sure that the demo uses the same name accordingly.
+4) Once uploaded, visit your application using http://<application-name>.appspot.com
+4.1) check all the information about deployed application at https://appengine.google.com/dashboard?&app_id=<your-application-id>
+NOTE:
+During build the "org.richfaces.cdk:maven-resource-plugin" executed and generated static resources(web-app\static-resources\) for all skins in order to
+solve the compatibility problem with GAE and java2D API.
-3) now visit your application using http://<application-name>.appspot.com
-3.1) check all the information about deployed application at https://appengine.google.com/dashboard?&app_id=<your-application-id>
-
-
-PAY ATTENTION:
-during build with GAE profile(default one) - our org.richfaces.cdk:maven-resource-plugin executed and generates static resources(web-app\static-resources\) for all the skins in order to
-solve the compatibility problem with GAE which restricts java2D usage(our dynamic resources works using that dependency)
-
-NOTES about additional artifacts in webapp folder:
+NOTE: about additional artifacts in webapp folder:
1) java-gae-jsf-ri - contains modified WebConfiguration.java class which will be put to Web-inf\classes when building with GAE profile. It solves compatibilities
issues exist in GAE for JSF applications.
-2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. Them will be placed to WEb-inf folder after build with GAE profile. web.xml
-should be different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
+2) Webapp-gae folder contains GAE descriptor(appengine-web.xml) and modified application web.xml. They will be placed in the WEB-INF folder. The web.xml
+is different in order to use static resources generated by plugin instead of dynamic resources. And also restricts threading with
com.sun.faces.enableThreading context parameter as GAE not allows threads.
============================================================================================================
-LOCAL DEPLOYMENT
-you still could deploy your application as usually using
-1) mvn clean install -Prelease
-2) put to tomcat6 or jboss (war's for both application servers will be created)
-3) run choosen server
-4) enjoy going to http:\\localhost:8080\<app-name>
\ No newline at end of file
+LOCAL DEPLOYMENTS
+To test your application on your local machine you can use GAE SDK development server.
+1) Build archetype as above
+2) Navigate GAE SDK /bin
+3) Execute"
+ ./dev_appserver.sh <PATH: "generated-application-target-folder/output application folder">
+4) Once loaded, access your application at http:\\localhost:8080\
\ No newline at end of file
Modified: branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java
===================================================================
--- branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/archetypes/rf-gae-sample/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -3,20 +3,15 @@
#set( $symbol_escape = '\' )
package ${package};
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-
import java.io.Serializable;
public class RichBean implements Serializable {
private static final long serialVersionUID = -2403138958014741653L;
- private Logger logger;
private String name;
public RichBean() {
- logger = LoggerFactory.getLogger(RichBean.class);
- logger.info("post construct: initialize");
+ System.out.println("post construct: initialize");
name = "John";
}
Copied: branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java (from rev 19477, trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java)
===================================================================
--- branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java (rev 0)
+++ branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,25 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package};
+
+import java.io.Serializable;
+
+public class RichBean implements Serializable {
+
+ private static final long serialVersionUID = -2403138958014741653L;
+ private String name;
+
+ public RichBean() {
+ System.out.println("post construct: initialize");
+ name = "John";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Modified: branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,3 +1,6 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
<?xml version="1.0"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
@@ -4,7 +7,7 @@
<managed-bean>
<managed-bean-name>richBean</managed-bean-name>
- <managed-bean-class>org.richfaces.RichBean</managed-bean-class>
+ <managed-bean-class>${package}.RichBean</managed-bean-class>
<managed-bean-scope>view</managed-bean-scope>
</managed-bean>
</faces-config>
Copied: branches/RF-8742/core/api/src/main/java/org/richfaces/renderkit/util/ColorUtils.java (from rev 19477, trunk/core/api/src/main/java/org/richfaces/renderkit/util/ColorUtils.java)
===================================================================
--- branches/RF-8742/core/api/src/main/java/org/richfaces/renderkit/util/ColorUtils.java (rev 0)
+++ branches/RF-8742/core/api/src/main/java/org/richfaces/renderkit/util/ColorUtils.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,235 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.renderkit.util;
+
+import java.awt.Color;
+
+/**
+ * Utility methods that are useful for color processing.
+ *
+ * @author carcasser
+ */
+public final class ColorUtils {
+
+ private ColorUtils() {
+ }
+
+ /**
+ * Converts the components of a color, as specified by the default RGB
+ * model, to an equivalent set of values for hue, saturation, and lightness
+ * that are the three components of the HSL model.
+ *
+ * @param r
+ * the red component of the color
+ * @param g
+ * the green component of the color
+ * @param b
+ * the blue component of the color
+ * @return an array of three elements containing the hue, saturation, and
+ * lightness (in that order), of the color with the indicated red,
+ * green, and blue components.
+ */
+ public static float[] convertRGBtoHSL(int r, int g, int b) {
+ float varR = (r / 255f);
+ float varG = (g / 255f);
+ float varB = (b / 255f);
+
+ float varMin = Math.min(varR, Math.min(varG, varB)); // Min value of RGB
+ float varMax = Math.max(varR, Math.max(varG, varB)); // Max value of RGB
+ float delMax = varMax - varMin; // Delta RGB value
+
+ float h = 0;
+ float s = 0;
+ float l = (varMax + varMin) / 2;
+
+ if (delMax == 0 || l == 0) {
+ s = 0;
+ } else if (l == 1) {
+ s = 1;
+ } else if (l <= 0.5) {
+ s = delMax / (2 * (1 - l));
+ } else if (l > 0.5) {
+ s = delMax / (2 * l);
+ }
+
+ if (delMax == 0) {
+ h = 0;
+ } else if (varMax == varR && g >= b) {
+ h = 60 * (varG - varB) / delMax + 0;
+ } else if (varMax == varR && varG < b) {
+ h = 60 * (varG - varB) / delMax + 360;
+ } else if (varMax == varG) {
+ h = 60 * (varB - varR) / delMax + 120;
+ } else if (varMax == varB) {
+ h = 60 * (varR - varG) / delMax + 240;
+ }
+
+ return new float[] { h, s, l };
+ }
+
+ /**
+ * Converts the components of a color, as specified by the HSL model, to an
+ * equivalent set of values for the default RGB model.
+ * <p>
+ * The <code>saturation</code> and <code>lightness</code> components
+ * should be floating-point values between zero and one (numbers in the
+ * range 0.0-1.0). The <code>hue</code> component can be any
+ * floating-point number. The floor of this number is subtracted from it to
+ * create a fraction between 0 and 1. This fractional number is then
+ * multiplied by 360 to produce the hue angle in the HSB color model.
+ *
+ * @param h
+ * the hue component of the color
+ * @param s
+ * the saturation of the color
+ * @param l
+ * the lightness of the color
+ * @return the RGB value of the color with the indicated hue, saturation,
+ * and lightness
+ */
+ public static Color convertHSLtoRGB(float h, float s, float l) {
+ float q;
+ if (l < 0.5) {
+ q = l * (1 + s);
+ } else {
+ q = l + s - (l * s);
+ }
+
+ float p = 2 * l - q;
+ float hNorm = h / 360;
+
+ float tR = hNorm + 1f / 3f;
+ float tG = hNorm;
+ float tB = hNorm - 1f / 3f;
+
+ float r = tC2C(tR, p, q);
+ float g = tC2C(tG, p, q);
+ float b = tC2C(tB, p, q);
+
+ return new Color(r, g, b);
+ }
+
+ private static float tC2C(float tC, float p, float q) {
+ float retVal;
+
+ if (tC < 0) {
+ tC += 1;
+ }
+
+ if (tC > 1) {
+ tC -= 1;
+ }
+
+ if ((6 * tC) < 1) {
+ retVal = (p + (q - p) * 6 * tC);
+ } else if ((2 * tC) < 1) {
+ retVal = q;
+ } else if ((3 * tC) < 2) {
+ retVal = (p + (q - p) * 6 * (2f / 3f - tC));
+ } else {
+ retVal = p;
+ }
+
+ return retVal;
+ }
+
+ /**
+ * Increases/decreases brightness of the given color by the specified
+ * <code>difference</code>.
+ * <p>
+ * The <code>difference</code> values in the range (-1.0, 1.0): 1.0 - the
+ * brightest value; -1.0 - the dimmest value.
+ *
+ * @param c
+ * color to adjust
+ * @param difference
+ * value to be added to the current brightness
+ *
+ * @return a new <code>Color</code> instance with increased/decreased
+ * brightness by specified <code>difference</code>
+ * @throws IllegalArgumentException
+ * if difference is outside of the range -1.0 to 1.0, inclusive
+ */
+ public static Color adjustBrightness(Color c, float difference) {
+ if (difference < -1.0 || difference > 1.0) {
+ throw new IllegalArgumentException("Difference parameter outside of expected range: "
+ + "Difference parameter should be floating-point values between -1 and 1");
+ }
+
+ Color retVal = null;
+ if (c != null) {
+ float[] hsb = Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), null);
+ float brightness = Math.min(1.0f, Math.max(0.0f, hsb[2] + difference));
+ retVal = new Color(Color.HSBtoRGB(hsb[0], hsb[1], brightness));
+ }
+
+ return retVal;
+ }
+
+ /**
+ * Increases/decreases lightness of the given color by the specified
+ * <code>difference</code>.
+ * <p>
+ * The <code>difference</code> values in the range (-1.0, 1.0): 1.0 - the
+ * lightest value; -1.0 - on the contrary.
+ *
+ * @param c
+ * color to adjust
+ * @param difference
+ * value to be added to the current lightness
+ *
+ * @return a new <code>Color</code> instance with increased/decreased
+ * lightness by specified <code>difference</code>
+ * @throws IllegalArgumentException
+ * if difference is outside of the range -1.0 to 1.0, inclusive
+ */
+ public static Color adjustLightness(Color c, float difference) {
+ if (difference < -1.0 || difference > 1.0) {
+ throw new IllegalArgumentException("Difference parameter outside of expected range: "
+ + "Difference parameter should be floating-point values between -1 and 1");
+ }
+
+ Color retVal = null;
+ if (c != null) {
+ float[] hsl = convertRGBtoHSL(c.getRed(), c.getGreen(), c.getBlue());
+ float lightness = Math.min(1.0f, Math.max(0.0f, hsl[2] + difference));
+ retVal = convertHSLtoRGB(hsl[0], hsl[1], lightness);
+ }
+
+ return retVal;
+ }
+
+ /**
+ * Overwrites alpha value for given color.
+ *
+ * @param c color to overwrite
+ * @param alpha a new value of alpha
+ * @return a new <code>Color</code> object with a new specified alpha value
+ */
+ public static Color overwriteAlpha(Color c, float alpha) {
+ Color retVal = c;
+ if (c != null) {
+ retVal = new Color(c.getRed(), c.getGreen(), c.getBlue(), (int) (alpha * 255 + 0.5));
+ }
+ return retVal;
+ }
+
+}
Modified: branches/RF-8742/core/api/src/main/java/org/richfaces/resource/ImageType.java
===================================================================
--- branches/RF-8742/core/api/src/main/java/org/richfaces/resource/ImageType.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/core/api/src/main/java/org/richfaces/resource/ImageType.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -21,6 +21,7 @@
*/
package org.richfaces.resource;
+import java.awt.Dimension;
import java.awt.Transparency;
import java.awt.color.ColorSpace;
import java.awt.image.BufferedImage;
@@ -115,6 +116,10 @@
public abstract BufferedImage createImage(int width, int height);
+ public BufferedImage createImage(Dimension dimension) {
+ return createImage(dimension.width, dimension.height);
+ }
+
public String getFormatName() {
return formatName;
}
Copied: branches/RF-8742/core/api/src/main/java/org/richfaces/resource/Java2DAnimatedUserResource.java (from rev 19477, trunk/core/api/src/main/java/org/richfaces/resource/Java2DAnimatedUserResource.java)
===================================================================
--- branches/RF-8742/core/api/src/main/java/org/richfaces/resource/Java2DAnimatedUserResource.java (rev 0)
+++ branches/RF-8742/core/api/src/main/java/org/richfaces/resource/Java2DAnimatedUserResource.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.resource;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public interface Java2DAnimatedUserResource extends Java2DUserResource {
+
+ public boolean isLooped();
+
+ public int getFrameDelay();
+
+ public void startFramesSequence();
+
+ public boolean hasNextFrame();
+
+ public void paint(Graphics2D graphics2d, Dimension dimension);
+
+}
Deleted: branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TabHeaderGradient.java
===================================================================
--- branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TabHeaderGradient.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TabHeaderGradient.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.images;
-
-import org.richfaces.renderkit.html.BaseGradient;
-import org.richfaces.skin.Skin;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author akolonitsky
- * @since Sep 30, 2010
- */
-public class TabHeaderGradient extends BaseGradient {
-
- @Override
- protected void initializeProperties(FacesContext context, Skin skin) {
- super.initializeProperties(context, skin);
- setBaseColorParam(Skin.GENERAL_BACKGROUND_COLOR);
- setGradientColorParam(Skin.TAB_BACKGROUND_COLOR);
- }
-}
Deleted: branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TopTabHeaderGradient.java
===================================================================
--- branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TopTabHeaderGradient.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/core/impl/src/main/java/org/richfaces/renderkit/html/images/TopTabHeaderGradient.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.images;
-
-import org.richfaces.renderkit.html.BaseGradient;
-import org.richfaces.skin.Skin;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author akolonitsky
- * @since Sep 30, 2010
- */
-public class TopTabHeaderGradient extends BaseGradient {
-
- @Override
- protected void initializeProperties(FacesContext context, Skin skin) {
- super.initializeProperties(context, skin);
- setBaseColorParam(Skin.TAB_BACKGROUND_COLOR);
- setGradientColorParam(Skin.GENERAL_BACKGROUND_COLOR);
- }
-}
Copied: branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DAnimatedUserResourceWrapperImpl.java (from rev 19477, trunk/core/impl/src/main/java/org/richfaces/resource/Java2DAnimatedUserResourceWrapperImpl.java)
===================================================================
--- branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DAnimatedUserResourceWrapperImpl.java (rev 0)
+++ branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DAnimatedUserResourceWrapperImpl.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,161 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.resource;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.Iterator;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.metadata.IIOMetadataNode;
+import javax.imageio.stream.ImageOutputStream;
+
+import org.w3c.dom.Node;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class Java2DAnimatedUserResourceWrapperImpl extends Java2DUserResourceWrapperImpl {
+
+ public Java2DAnimatedUserResourceWrapperImpl(Java2DAnimatedUserResource resourceObject) {
+ super(resourceObject);
+ }
+
+ private static ImageWriter getSequenceCapableImageWriter(ImageType imageType) {
+ Iterator<ImageWriter> imageWriters = ImageIO.getImageWritersByFormatName(imageType.getFormatName());
+
+ while (imageWriters.hasNext()) {
+ ImageWriter imageWriter = imageWriters.next();
+
+ if (imageWriter.canWriteSequence()) {
+ return imageWriter;
+ }
+ }
+
+ throw new IllegalArgumentException(MessageFormat.format("Cannot find sequence-capable image writer for {0} format",
+ imageType.getFormatName()));
+ }
+
+ private static Node getOrCreateChild(Node root, String name) {
+ Node result = null;
+
+ for (Node node = root.getFirstChild(); (node != null) && (result == null); node = node.getNextSibling()) {
+ if (name.equals(node.getNodeName())) {
+ result = node;
+ }
+ }
+
+ if (result == null) {
+ result = new IIOMetadataNode(name);
+ root.appendChild(result);
+ }
+
+ return result;
+ }
+
+ private static void checkSupportedFormat(ImageType imageType) {
+ if (imageType != ImageType.GIF) {
+ throw new IllegalArgumentException(MessageFormat.format("Image format {0} is not supported", imageType.getFormatName()));
+ }
+ }
+
+ @Override
+ public String getRequestPath() {
+ //detect unsupported types early
+ checkSupportedFormat(getWrapped().getImageType());
+ return super.getRequestPath();
+ }
+
+ @Override
+ protected void paintAndWrite(ImageOutputStream outputStream) throws IOException {
+ Java2DAnimatedUserResource userResource = (Java2DAnimatedUserResource) getWrapped();
+
+ ImageType imageType = userResource.getImageType();
+ checkSupportedFormat(imageType);
+ ImageWriter imageWriter = getSequenceCapableImageWriter(imageType);
+ Dimension dimension = userResource.getDimension();
+ BufferedImage image = imageType.createImage(dimension);
+
+ try {
+ imageWriter.setOutput(outputStream);
+
+ ImageWriteParam defaultImageWriteParam = imageWriter.getDefaultWriteParam();
+ IIOMetadata imageMetaData = imageWriter.getDefaultImageMetadata(ImageTypeSpecifier.createFromBufferedImageType(
+ BufferedImage.TYPE_INT_RGB),
+ defaultImageWriteParam);
+ String metaFormatName = imageMetaData.getNativeMetadataFormatName();
+ Node root = imageMetaData.getAsTree(metaFormatName);
+ IIOMetadataNode graphicsControlExtensionNode = (IIOMetadataNode) getOrCreateChild(root, "GraphicControlExtension");
+
+ // http://java.sun.com/javase/6/docs/api/javax/imageio/metadata/doc-files/gi...
+ graphicsControlExtensionNode.setAttribute("disposalMethod", "none");
+ graphicsControlExtensionNode.setAttribute("userInputFlag", "FALSE");
+ graphicsControlExtensionNode.setAttribute("transparentColorFlag", "FALSE");
+ graphicsControlExtensionNode.setAttribute("delayTime", Integer.toString(userResource.getFrameDelay() / 100));
+ graphicsControlExtensionNode.setAttribute("transparentColorIndex", "0");
+
+ Node applicationExtensionsNode = getOrCreateChild(root, "ApplicationExtensions");
+ IIOMetadataNode netscapeExtension = new IIOMetadataNode("ApplicationExtension");
+
+ netscapeExtension.setAttribute("applicationID", "NETSCAPE");
+ netscapeExtension.setAttribute("authenticationCode", "2.0");
+
+ byte numLoops = (byte) (userResource.isLooped() ? 0x0 : 0x1);
+
+ netscapeExtension.setUserObject(new byte[]{0x1, numLoops, 0x0});
+ applicationExtensionsNode.appendChild(netscapeExtension);
+ imageMetaData.setFromTree(metaFormatName, root);
+
+ imageWriter.prepareWriteSequence(null);
+
+ userResource.startFramesSequence();
+
+ while (userResource.hasNextFrame()) {
+ Graphics2D g2d = null;
+ try {
+ g2d = createGraphics(image);
+ userResource.paint(g2d, dimension);
+ imageWriter.writeToSequence(new IIOImage(image, null, imageMetaData),
+ defaultImageWriteParam);
+ } finally {
+ if (g2d != null) {
+ g2d.dispose();
+ }
+ }
+ }
+
+ imageWriter.endWriteSequence();
+ } finally {
+ imageWriter.dispose();
+ }
+ }
+
+}
Modified: branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DUserResourceWrapperImpl.java
===================================================================
--- branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DUserResourceWrapperImpl.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/Java2DUserResourceWrapperImpl.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -34,6 +34,7 @@
import javax.faces.context.FacesContext;
import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageOutputStream;
import org.ajax4jsf.util.HtmlColor;
import org.richfaces.renderkit.util.HtmlDimensions;
@@ -52,54 +53,33 @@
}
public InputStream getInputStream() throws IOException {
- Java2DUserResource j2DUserResource = getWrapped();
- Dimension dimension = j2DUserResource.getDimension();
- int width = dimension.width;
- int height = dimension.height;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- ImageType imageType = j2DUserResource.getImageType();
-
- if ((width > 0) && (height > 0)) {
- BufferedImage image = imageType.createImage(width, height);
- Graphics2D g2d = image.createGraphics();
-
- try {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
-
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
- RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- j2DUserResource.paint(g2d, dimension);
- } finally {
- g2d.dispose();
- }
-
- try {
- ImageIO.write(image, imageType.getFormatName(), baos);
- } finally {
+ ImageOutputStream imageOutputStream = ImageIO.createImageOutputStream(baos);
+ try {
+ paintAndWrite(imageOutputStream);
+ } finally {
+ if (imageOutputStream != null) {
try {
- baos.close();
+ imageOutputStream.close();
} catch (IOException e) {
-
- // TODO Auto-generated catch block
+ // TODO: handle exception
e.printStackTrace();
}
}
}
-
return new ByteArrayInputStream(baos.toByteArray());
}
+ protected void write(BufferedImage image, String formatName, ImageOutputStream imageOutputStream) throws IOException {
+ ImageIO.write(image, formatName, imageOutputStream);
+ }
+
public String getContentType() {
return getWrapped().getImageType().getMimeType();
}
protected String getValueParameter(FacesContext context, String name) {
- SkinFactory skinFactory = SkinFactory.getInstance();
+ SkinFactory skinFactory = SkinFactory.getInstance(context);
Skin skin = skinFactory.getSkin(context);
String value = (String) skin.getParameter(context, name);
@@ -115,16 +95,16 @@
protected Integer getColorValueParameter(FacesContext context, String name, boolean useDefault) {
Skin skin;
if (useDefault) {
- skin = SkinFactory.getInstance().getDefaultSkin(context);
+ skin = SkinFactory.getInstance(context).getDefaultSkin(context);
} else {
- skin = SkinFactory.getInstance().getSkin(context);
+ skin = SkinFactory.getInstance(context).getSkin(context);
}
return decodeColor((String) skin.getParameter(context, name));
}
protected Integer getHeight(FacesContext context, String heightParamName) {
- SkinFactory skinFactory = SkinFactory.getInstance();
+ SkinFactory skinFactory = SkinFactory.getInstance(context);
Skin skin = skinFactory.getSkin(context);
String height = (String) skin.getParameter(context, heightParamName);
@@ -157,4 +137,33 @@
protected Date getLastModified(FacesContext context) {
return getWrapped().getLastModified();
}
+
+ protected void paintAndWrite(ImageOutputStream outputStream) throws IOException {
+ Java2DUserResource resource = getWrapped();
+ ImageType imageType = resource.getImageType();
+
+ BufferedImage image = imageType.createImage(resource.getDimension());
+ Graphics2D g2d = null;
+ try {
+ g2d = createGraphics(image);
+ resource.paint(g2d, new Dimension(image.getWidth(), image.getHeight()));
+ ImageIO.write(image, imageType.getFormatName(), outputStream);
+ } finally {
+ if (g2d != null) {
+ g2d.dispose();
+ }
+ }
+ }
+
+ protected Graphics2D createGraphics(BufferedImage image) {
+ Graphics2D g2d = image.createGraphics();
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
+ RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+ return g2d;
+ }
}
Modified: branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java
===================================================================
--- branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -260,7 +260,11 @@
if (legitimateResource) {
Object wrappedResource;
- if (Java2DUserResource.class.isAssignableFrom(loadedClass)) {
+ if (Java2DAnimatedUserResource.class.isAssignableFrom(loadedClass)) {
+ Java2DAnimatedUserResource java2DAnimatedUserResource = (Java2DAnimatedUserResource) loadedClass.newInstance();
+ wrappedResource = java2DAnimatedUserResource;
+ resource = new Java2DAnimatedUserResourceWrapperImpl(java2DAnimatedUserResource);
+ } else if (Java2DUserResource.class.isAssignableFrom(loadedClass)) {
Java2DUserResource java2DUserResource = (Java2DUserResource) loadedClass.newInstance();
wrappedResource = java2DUserResource;
resource = new Java2DUserResourceWrapperImpl(java2DUserResource);
Modified: branches/RF-8742/dist/readme-ui.txt
===================================================================
--- branches/RF-8742/dist/readme-ui.txt 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/dist/readme-ui.txt 2010-10-06 16:50:13 UTC (rev 19482)
@@ -8,10 +8,10 @@
-------------------------------
1) Put RichFaces libraries and its dependencies in your application libraries folder:
- 1.1) richfaces-core-api-4.0.0.20101001-M3.jar
- 1.2) richfaces-core-impl-4.0.0.20101001-M3.jar
- 1.3) richfaces-components-api-4.0.0.20101001-M3.jar
- 1.4) richfaces-components-ui-4.0.0.20101001-M3.jar
+ 1.1) richfaces-core-api-4.0.0.20101004-M3.jar
+ 1.2) richfaces-core-impl-4.0.0.20101004-M3.jar
+ 1.3) richfaces-components-api-4.0.0.20101004-M3.jar
+ 1.4) richfaces-components-ui-4.0.0.20101004-M3.jar
1.5) sac-1.3, cssparser-0.9.5 - required for components CSS work
1.6) google-guava-r06 - core runtime dependency.
1.7) annotations.jar from org.richfaces.cdk
Modified: branches/RF-8742/examples/iteration-demo/src/main/webapp/dataGrid.xhtml
===================================================================
--- branches/RF-8742/examples/iteration-demo/src/main/webapp/dataGrid.xhtml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/examples/iteration-demo/src/main/webapp/dataGrid.xhtml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -39,15 +39,11 @@
<h:body>
<h:form id="form1">
- <it:dataGrid columns="3" var="record" elements="8" value="#{dataBean.employeeList}">
+ <it:dataGrid id="dataGrid" columns="3" var="record" elements="8" value="#{dataBean.employeeList}">
<f:facet name="header">
<h:outputText value="header"/>
</f:facet>
- <f:facet name="footer">
- <h:outputText value="footer"/>
- </f:facet>
-
<f:facet name="caption">
<h:outputText value="caption"/>
</f:facet>
Modified: branches/RF-8742/examples/richfaces-showcase/pom.xml
===================================================================
--- branches/RF-8742/examples/richfaces-showcase/pom.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/examples/richfaces-showcase/pom.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -145,6 +145,14 @@
</dependency>
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>src/main/resources-gae</directory>
+ </resource>
+ </resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Modified: branches/RF-8742/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java
===================================================================
--- branches/RF-8742/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/examples/richfaces-showcase/src/main/java/org/richfaces/demo/progressBar/ProgressBarBean.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -3,6 +3,7 @@
*/
package org.richfaces.demo.progressBar;
+import java.io.Serializable;
import java.util.Date;
import javax.faces.bean.ManagedBean;
@@ -14,8 +15,10 @@
*/
@ManagedBean
@ViewScoped
-public class ProgressBarBean {
+public class ProgressBarBean implements Serializable {
+ private static final long serialVersionUID = -314414475508376585L;
+
private boolean buttonRendered = true;
private boolean enabled=false;
private Long startTime;
Deleted: branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml
===================================================================
--- branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/jdoconfig.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
- <persistence-manager-factory name="transactions-optional">
- <property name="javax.jdo.PersistenceManagerFactoryClass"
- value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
- <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
- <property name="javax.jdo.option.NontransactionalRead" value="true"/>
- <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
- <property name="javax.jdo.option.RetainValues" value="true"/>
- <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
- </persistence-manager-factory>
-</jdoconfig>
Deleted: branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- <persistence-unit name="transactions-optional">
- <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
- <properties>
- <property name="datanucleus.NontransactionalRead" value="true"/>
- <property name="datanucleus.NontransactionalWrite" value="true"/>
- <property name="datanucleus.ConnectionURL" value="appengine"/>
- </properties>
- </persistence-unit>
-
-</persistence>
\ No newline at end of file
Copied: branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae (from rev 19477, trunk/examples/richfaces-showcase/src/main/resources-gae)
Copied: branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF (from rev 19477, trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF)
Deleted: branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2010-10-06 13:43:08 UTC (rev 19477)
+++ branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
- <persistence-manager-factory name="transactions-optional">
- <property name="javax.jdo.PersistenceManagerFactoryClass"
- value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
- <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
- <property name="javax.jdo.option.NontransactionalRead" value="true"/>
- <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
- <property name="javax.jdo.option.RetainValues" value="true"/>
- <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
- </persistence-manager-factory>
-</jdoconfig>
Copied: branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml (from rev 19477, trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml)
===================================================================
--- branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml (rev 0)
+++ branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
+
+ <persistence-manager-factory name="transactions-optional">
+ <property name="javax.jdo.PersistenceManagerFactoryClass"
+ value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
+ <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
+ <property name="javax.jdo.option.NontransactionalRead" value="true"/>
+ <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
+ <property name="javax.jdo.option.RetainValues" value="true"/>
+ <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
+ </persistence-manager-factory>
+</jdoconfig>
Deleted: branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2010-10-06 13:43:08 UTC (rev 19477)
+++ branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- <persistence-unit name="transactions-optional">
- <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
- <properties>
- <property name="datanucleus.NontransactionalRead" value="true"/>
- <property name="datanucleus.NontransactionalWrite" value="true"/>
- <property name="datanucleus.ConnectionURL" value="appengine"/>
- </properties>
- </persistence-unit>
-
-</persistence>
\ No newline at end of file
Copied: branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml (from rev 19477, trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml)
===================================================================
--- branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml (rev 0)
+++ branches/RF-8742/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="transactions-optional">
+ <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
+ <properties>
+ <property name="datanucleus.NontransactionalRead" value="true"/>
+ <property name="datanucleus.NontransactionalWrite" value="true"/>
+ <property name="datanucleus.ConnectionURL" value="appengine"/>
+ </properties>
+ </persistence-unit>
+
+</persistence>
\ No newline at end of file
Modified: branches/RF-8742/ui/dist/richfaces-components-ui/pom.xml
===================================================================
--- branches/RF-8742/ui/dist/richfaces-components-ui/pom.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/dist/richfaces-components-ui/pom.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -137,6 +137,9 @@
</taglibs>
</transformer>
<transformer implementation="org.richfaces.build.shade.resource.FacesConfigXmlResourceTransformer" />
+ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+ <resource>META-INF/richfaces/resource-mappings.properties</resource>
+ </transformer>
</transformers>
</configuration>
</execution>
Copied: branches/RF-8742/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js (from rev 19477, trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js)
===================================================================
--- branches/RF-8742/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js (rev 0)
+++ branches/RF-8742/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,90 @@
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ var INTERFACE = {
+ SelectListener : {
+ processItem: function(event, element){}
+ }
+ };
+
+ rf.ui.Select = function(id, listener, options) {
+ this.id = id;
+ this.select = $(document.getElementById(id));
+ this.itemsCord = $(document.getElementById(options.itemsCord));
+ this.selectItemCss = options.selectItemCss;
+ this.itemCss = options.itemCss;
+ this.selectListener = listener;
+
+ this.select.bind("blur", $.proxy(this.__blurHandler, this));
+ this.itemsCord.bind("mouseover", $.proxy(this.__mouseHandler, this));
+ this.itemsCord.bind("click", $.proxy(this.__mouseHandler, this));
+ };
+
+ rf.BaseComponent.extend(rf.ui.Select);
+ var $super = rf.ui.Select.$super;
+
+ $.extend(rf.ui.Select.prototype, ( function () {
+
+ var processed = null;
+
+ var isSelectListener = function(obj) {
+ for (var method in INTERFACE.SelectListener) {
+ if ( (typeof obj[method] != typeof INTERFACE.SelectListener[method]) ) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ return{
+ name : "select",
+
+ show: function() {
+ this.select.css("display", "");
+ },
+
+ hide: function() {
+ this.select.css("display", "none");
+ },
+
+ processItem: function(event, element) {
+ if(isSelectListener(this.selectListener)) {
+ this.selectListener.processItem(event, element);
+ }
+ },
+
+ __getCurrentElement: function() {
+ return processed;
+ },
+
+ __blurHandler: function(e) {
+ processItem(e, processed);
+ return false;
+ },
+
+ __mouseHandler: function(event) {
+ var element = $(event.target).closest("."+this.itemCss, event.currentTarget);
+ if (event&& element) {
+ if(event.type == 'mouseover') {
+ if(processed) {
+ processed.removeClass(this.selectItemCss);
+ }
+ element.addClass(this.selectItemCss);
+ processed = element;
+ }
+
+ if(event.type == 'click') {
+ this.processItem(event, element);
+ }
+ }
+ return false;
+ },
+
+ __getId: function() {
+ return this.id;
+ }
+ }
+ })());
+
+})(jQuery, window.RichFaces);
Modified: branches/RF-8742/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
===================================================================
--- branches/RF-8742/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -54,16 +54,13 @@
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
throws IOException {
- AbstractDataGrid dataGrid = (AbstractDataGrid)component;
- String clientId = dataGrid.getClientId(context) + ":h";
+ String clientId = component.getClientId(context) + ":h";
boolean partial = (Boolean)(Boolean)params[0];
if(partial) {
context.getPartialViewContext().getPartialResponseWriter().startUpdate(clientId);
}
- int columns = dataGrid.getColumns();
-
writer.startElement(HtmlConstants.THEAD_ELEMENT, component);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, clientId , null);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-thead", null);
@@ -71,7 +68,11 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-h", null);
writer.startElement(HtmlConstants.TH_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-h-c", null);
- writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
+
+ int columns = (Integer)component.getAttributes().get("columns");
+ if(columns != Integer.MIN_VALUE) {
+ writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
+ }
}
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
@@ -92,10 +93,8 @@
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
throws IOException {
- AbstractDataGrid dataGrid = (AbstractDataGrid)component;
- String clientId = dataGrid.getClientId(context) + ":f";
-
- int columns = dataGrid.getColumns();
+ String clientId = component.getClientId(context) + ":f";
+
boolean partial = (Boolean)(Boolean)params[0];
if(partial) {
context.getPartialViewContext().getPartialResponseWriter().startUpdate(clientId);
@@ -108,7 +107,11 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-f", null);
writer.startElement(HtmlConstants.TD_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-f-c", null);
- writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
+
+ int columns = (Integer)component.getAttributes().get("columns");
+ if(columns != Integer.MIN_VALUE) {
+ writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
+ }
}
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
@@ -144,6 +147,11 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-nd", null);
writer.startElement(HtmlConstants.TD_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-nd-c", null);
+
+ int columns = (Integer)component.getAttributes().get("columns");
+ if(columns != Integer.MIN_VALUE) {
+ writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
+ }
}
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
@@ -165,10 +173,10 @@
if (processCell != 0) {
writer.endElement(HtmlConstants.TR_ELEMENT);
rowHolder.resetProcessCell();
- rowHolder.nextRow();
}
writer.startElement(HtmlConstants.TR_ELEMENT, dataGrid);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-r", null);
+ rowHolder.nextRow();
}
writer.startElement(HtmlConstants.TD_ELEM, dataGrid);
@@ -283,10 +291,8 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-c", null);
writer.endElement(HtmlConstants.TD_ELEM);
}
+ writer.endElement(HtmlConstants.TR_ELEMENT);
}
-
- writer.endElement(HtmlConstants.TR_ELEMENT);
-
}
public DataVisitResult process(FacesContext facesContext, Object rowKey, Object argument) {
Modified: branches/RF-8742/ui/output/ui/pom.xml
===================================================================
--- branches/RF-8742/ui/output/ui/pom.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/pom.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -55,10 +55,6 @@
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-impl</artifactId>
- </dependency>
<dependency>
<groupId>org.richfaces.ui.common</groupId>
<artifactId>richfaces-ui-common-ui</artifactId>
Modified: branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -22,22 +22,22 @@
package org.richfaces.component.html;
-import org.richfaces.component.UITogglePanelTitledItem;
-import org.richfaces.component.behavior.ToggleControl;
-
-import javax.faces.component.behavior.ClientBehaviorHolder;
-
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import org.richfaces.component.UITogglePanelTitledItem;
+import org.richfaces.component.behavior.ToggleControl;
+
/**
* @author akolonitsky
* @since 2010-08-13
*/
public class HtmlAccordionItem extends UITogglePanelTitledItem implements ClientBehaviorHolder {
- public static final String COMPONENT_TYPE = "org.richfaces.TogglePanelTitledItem";
+ public static final String COMPONENT_TYPE = "org.richfaces.AccordionItem";
public static final String COMPONENT_FAMILY = "org.richfaces.TogglePanelTitledItem";
Modified: branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -22,20 +22,21 @@
package org.richfaces.component.html;
-import org.richfaces.component.UITogglePanelTitledItem;
-
-import javax.faces.component.behavior.ClientBehaviorHolder;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import org.richfaces.component.UITogglePanelTitledItem;
+
/**
* @author akolonitsky
* @since 2010-08-27
*/
public class HtmlTab extends UITogglePanelTitledItem implements ClientBehaviorHolder {
- public static final String COMPONENT_TYPE = "org.richfaces.TogglePanelTitledItem";
+ public static final String COMPONENT_TYPE = "org.richfaces.TabPanelItem";
public static final String COMPONENT_FAMILY = "org.richfaces.TogglePanelTitledItem";
Modified: branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTogglePanelTitledItem.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -22,17 +22,19 @@
package org.richfaces.component.html;
-import org.richfaces.component.UITogglePanelTitledItem;
-import javax.faces.component.behavior.ClientBehaviorHolder;
-
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
+import org.richfaces.component.UITogglePanelTitledItem;
+
/**
* @author akolonitsky
* @since 2010-08-13
*/
+//TODO alex - what's the purpose of this class?
public class HtmlTogglePanelTitledItem extends UITogglePanelTitledItem implements ClientBehaviorHolder {
public static final String COMPONENT_TYPE = "org.richfaces.TogglePanelTitledItem";
Copied: branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java (from rev 19477, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java)
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java (rev 0)
+++ branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -0,0 +1,168 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.renderkit.html;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.GradientPaint;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Date;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.renderkit.util.ColorUtils;
+import org.richfaces.resource.CacheableResource;
+import org.richfaces.resource.DynamicResource;
+import org.richfaces.resource.ImageType;
+import org.richfaces.resource.Java2DAnimatedUserResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+//TODO - add version
+@DynamicResource
+public class ProgressBarAnimatedBackgroundImage implements Java2DAnimatedUserResource, StateHolderResource, CacheableResource {
+
+ private static final int NUMBER_OF_FRAMES = 12;
+
+ private static final Dimension DIMENSION = new Dimension(24, 48);
+
+ private int frameNumber = 0;
+
+ private Color basicColor;
+
+ public Map<String, String> getResponseHeaders() {
+ return null;
+ }
+
+ public Date getLastModified() {
+ return null;
+ }
+
+ public ImageType getImageType() {
+ return ImageType.GIF;
+ }
+
+ public Dimension getDimension() {
+ return DIMENSION;
+ }
+
+ public boolean isLooped() {
+ return true;
+ }
+
+ public int getFrameDelay() {
+ return 1000;
+ }
+
+ public void startFramesSequence() {
+ frameNumber = 0;
+ }
+
+ public boolean hasNextFrame() {
+ return frameNumber < NUMBER_OF_FRAMES;
+ }
+
+ /**
+ * Creates a main stage for progress bar background.
+ *
+ * @param context
+ * resource context
+ * @return a <code>BufferedImage</code> object
+ */
+ private BufferedImage createMainStage() {
+ Color progressbarBackgroundColor = basicColor;
+ Color progressbarSpiralColor = ColorUtils.adjustLightness(basicColor, 0.2f);
+
+ Dimension dimension = getDimension();
+ BufferedImage retVal = getImageType().createImage(dimension.width, dimension.height * 2);
+ Graphics g = retVal.getGraphics();
+ try {
+ g.setColor(progressbarBackgroundColor);
+ g.fillRect(0, 0, dimension.width, dimension.height * 2);
+ g.setColor(progressbarSpiralColor);
+ for (int k : new int[] { -24, 0, 24, 48, 72 }) {
+ g.fillPolygon(new int[] { 0, 24, 24, 0 }, new int[] { 24 + k, k, 12 + k, 36 + k }, 4);
+ }
+ } finally {
+ if (g != null) {
+ g.dispose();
+ }
+ }
+
+ return retVal;
+ }
+
+ public void paint(Graphics2D g2d, Dimension dimension) {
+ frameNumber++;
+
+ BufferedImage mainStage = createMainStage();
+ BufferedImage frame = mainStage.getSubimage(0, 48 - frameNumber * 2, dimension.width, dimension.height);
+ g2d.drawImage(frame, null, null);
+ Color progressbarShadowStartColor = ColorUtils.overwriteAlpha(ColorUtils.adjustLightness(basicColor, 0.7f), 0.6f);
+ Color progressbarShadowEndColor = ColorUtils.overwriteAlpha(ColorUtils.adjustLightness(basicColor, 0.3f), 0.6f);
+ // paint a shadow in the form of semi-transparent gradient
+ g2d.setPaint(new GradientPaint(0, 0, progressbarShadowStartColor, 0, 7, progressbarShadowEndColor));
+ g2d.fillRect(0, 0, dimension.width, 7);
+ }
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
+ // TODO Auto-generated method stub
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Integer color = skin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
+ dataOutput.writeInt(color.intValue());
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException {
+ basicColor = new Color(dataInput.readInt());
+ }
+
+ public boolean isCacheable(FacesContext context) {
+ return true;
+ }
+
+ public Date getExpires(FacesContext context) {
+ return null;
+ }
+
+ public int getTimeToLive(FacesContext context) {
+ return 0;
+ }
+
+ public String getEntityTag(FacesContext context) {
+ return null;
+ }
+}
Modified: branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToggleControlRenderer.java 2010-10-06 16:50:13 UTC (rev 19482)
@@ -22,23 +22,18 @@
package org.richfaces.renderkit.html;
-import org.richfaces.component.behavior.ToggleControl;
-
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.behavior.ClientBehavior;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.render.ClientBehaviorRenderer;
-import javax.faces.render.FacesBehaviorRenderer;
-import javax.faces.render.RenderKitFactory;
+import org.richfaces.component.behavior.ToggleControl;
+
/**
* @author akolonitsky
*
*/
-@FacesBehaviorRenderer(
- rendererType = "org.richfaces.component.behavior.ToggleControl",
- renderKitId = RenderKitFactory.HTML_BASIC_RENDER_KIT)
@ResourceDependencies({
@ResourceDependency(name = "jquery.js"),
@ResourceDependency(name = "richfaces.js") })
Modified: branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -491,7 +491,7 @@
</component>
<component>
- <component-type>org.richfaces.TogglePanelTitledItem</component-type>
+ <component-type>org.richfaces.AccordionItem</component-type>
<component-class>org.richfaces.component.html.HtmlAccordionItem</component-class>
<property>
<description></description>
@@ -659,7 +659,7 @@
<component-class>org.richfaces.component.html.HtmlTabPanel</component-class>
</component>
<component>
- <component-type>org.richfaces.TogglePanelTitledItem</component-type>
+ <component-type>org.richfaces.TabPanelItem</component-type>
<component-class>org.richfaces.component.html.HtmlTab</component-class>
</component>
@@ -726,6 +726,11 @@
<cdk:renders-children>false</cdk:renders-children>
</renderer-extension>
</renderer>
+
+ <client-behavior-renderer>
+ <client-behavior-renderer-type>org.richfaces.component.behavior.ToggleControl</client-behavior-renderer-type>
+ <client-behavior-renderer-class>org.richfaces.renderkit.html.ToggleControlRenderer</client-behavior-renderer-class>
+ </client-behavior-renderer>
</render-kit>
<faces-config-extension>
Modified: branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-10-06 16:50:13 UTC (rev 19482)
@@ -45,7 +45,7 @@
<tag>
<tag-name>tab</tag-name>
<component>
- <component-type>org.richfaces.TogglePanelTitledItem</component-type>
+ <component-type>org.richfaces.TabPanelItem</component-type>
<renderer-type>org.richfaces.Tab</renderer-type>
</component>
</tag>
@@ -741,9 +741,8 @@
<tag>
<tag-name>accordionItem</tag-name>
<component>
- <component-type>org.richfaces.TogglePanelTitledItem</component-type>
+ <component-type>org.richfaces.AccordionItem</component-type>
<renderer-type>org.richfaces.AccordionItem</renderer-type>
-
</component>
<attribute>
<description></description>
Modified: branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.ecss 2010-10-06 16:50:13 UTC (rev 19482)
@@ -5,7 +5,7 @@
}
.rf-pb-upl{
background-repeat : repeat-x;
-background-image : "url(#{resource['org.richfaces.renderkit.html.images.ProgressBarAnimatedBg']})";
+background-image : "url(#{resource['org.richfaces.images:pbAniBg.gif']})";
background-color : '#{richSkin.selectControlColor}';
height : 13px;
}
@@ -40,5 +40,5 @@
height : 13px;
width : 200px;
padding: 0px;
-background-image : "url(#{resource['org.richfaces.renderkit.html.images.ProgressBarAnimatedBg']})";
+background-image : "url(#{resource['org.richfaces.images:pbAniBg.gif']})";
}
Modified: branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tabPanel.ecss 2010-10-06 16:50:13 UTC (rev 19482)
@@ -4,7 +4,7 @@
cursor : pointer;
padding : 0px 5px 3px 5px;
vertical-align : top;
- background-image: "url(#{resource['org.richfaces.renderkit.html.images.TabHeaderGradient']})";
+ background-image: "url(#{resource['org.richfaces.images:tabBg.png']})";
background-position: top;
background-repeat: repeat-x;
background-color: "#{richSkin.tabBackgroundColor}";
@@ -16,7 +16,7 @@
border-bottom: 0px;
font-weight: bold;
vertical-align: top;
- background-image: "url(#{resource['org.richfaces.renderkit.html.images.TopTabHeaderGradient']})";
+ background-image: "url(#{resource['org.richfaces.images:actTabBg.png']})";
background-position: top;
background-repeat: repeat-x;
background-color: "#{richSkin.additionalBackgroundColor}";
@@ -32,10 +32,15 @@
}
.rf-tb-hdr-tabline-vis {
- background:url("tabline_bg.gif") repeat-x scroll center top #EEF4FB;
- border-color:#A6A6A6 #A6A6A6 -moz-use-text-color;
- border-style:solid solid none;
- border-width:1px 1px 0;
+ background:url("tabline_bg.gif") repeat-x scroll center top;
+ background-color: "#{richSkin.additionalBackgroundColor}";
+
+ border-color: "#{richSkin.panelBorderColor}";
+ border-style: solid;
+ border-width: 1px;
+
+ border-bottom-width: 0px;
+
padding-top: 2px;
overflow: hidden;
height: 25px;
@@ -68,7 +73,7 @@
}
.rf-tb-hdr-scrl_l {
- background: "url(#{resource['org.richfaces.renderkit.html.images.TopTabHeaderGradient']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) top repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
top: 1px;
left: 1px;
@@ -83,7 +88,7 @@
}
.rf-tb-hdr-scrl_r {
- background: "url(#{resource['org.richfaces.renderkit.html.images.TopTabHeaderGradient']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) top repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
top: 1px;
right: 17px;
@@ -98,7 +103,7 @@
}
.rf-tb-hdr-tablst {
- background: "url(#{resource['org.richfaces.renderkit.html.images.TopTabHeaderGradient']}) top repeat-x #{richSkin.additionalBackgroundColor}";
+ background: "url(#{resource['org.richfaces.images:actTabBg.png']}) top repeat-x #{richSkin.additionalBackgroundColor}";
position: absolute;
top: 1px;
right: 1px;
Modified: branches/RF-8742/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- branches/RF-8742/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-10-06 15:19:12 UTC (rev 19481)
+++ branches/RF-8742/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-10-06 16:50:13 UTC (rev 19482)
@@ -12,3 +12,5 @@
org.richfaces.images\:actRightTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=26, height=5, baseColorParam=generalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
+
+org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r19481 - branches/RF-7817/push-redesign/src/main/java/org/richfaces/application/impl.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-10-06 11:19:12 -0400 (Wed, 06 Oct 2010)
New Revision: 19481
Added:
branches/RF-7817/push-redesign/src/main/java/org/richfaces/application/impl/ExpiringMap.java
Log:
Added ExpiringMap.java
Added: branches/RF-7817/push-redesign/src/main/java/org/richfaces/application/impl/ExpiringMap.java
===================================================================
--- branches/RF-7817/push-redesign/src/main/java/org/richfaces/application/impl/ExpiringMap.java (rev 0)
+++ branches/RF-7817/push-redesign/src/main/java/org/richfaces/application/impl/ExpiringMap.java 2010-10-06 15:19:12 UTC (rev 19481)
@@ -0,0 +1,275 @@
+package org.richfaces.application.impl;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.DelayQueue;
+import java.util.concurrent.Delayed;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: nick
+ * Date: 16.09.2010
+ * Time: 12:17:11
+ * To change this template use File | Settings | File Templates.
+ */
+public class ExpiringMap<K, V> implements Map<K, V> {
+
+ public interface Entry<V> {
+
+ public Object getKey();
+
+ public V getValue();
+
+ public void acquire();
+
+ public void release();
+ }
+
+ private final class EntryImpl implements Entry<V> {
+
+ private final AtomicInteger usageCounter = new AtomicInteger();
+
+ private final K key;
+
+ private volatile V value;
+
+ public EntryImpl(K key) {
+ super();
+ this.key = key;
+ }
+
+ public V getValue() {
+ return value;
+ }
+
+ public void setValue(V value) {
+ if (usageCounter.get() == 0) {
+ addToExpiryQueue(key, this);
+ }
+ this.value = value;
+ }
+
+ public void acquire() {
+ if (usageCounter.getAndIncrement() == 0) {
+ removeFromExpiryQueue(key);
+ }
+ }
+
+ public void release() {
+ if (usageCounter.decrementAndGet() == 0) {
+ addToExpiryQueue(key, this);
+ }
+ }
+
+ public K getKey() {
+ return key;
+ }
+ }
+
+ private final class DelayedQueueEntry implements Delayed {
+
+ private final long expirationTime;
+
+ private final Object entryKey;
+
+ private final Object entryValue;
+
+ public DelayedQueueEntry(Object entryKey) {
+ this(entryKey, null);
+ }
+
+ public DelayedQueueEntry(Object entryKey, Object entryValue) {
+ this(entryKey, entryValue, -1);
+ }
+
+ public DelayedQueueEntry(Object entryKey, Object entryValue, long expirationTime) {
+ super();
+ this.entryKey = entryKey;
+ this.entryValue = entryValue;
+ this.expirationTime = expirationTime;
+ }
+
+ public long getDelay(TimeUnit unit) {
+ return unit.convert(System.currentTimeMillis() - expirationTime, TimeUnit.MILLISECONDS);
+ }
+
+ public int compareTo(Delayed o) {
+ return Long.valueOf(expirationTime).compareTo(o.getDelay(TimeUnit.MILLISECONDS));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((entryKey == null) ? 0 : entryKey.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ @SuppressWarnings("unchecked") DelayedQueueEntry other = (DelayedQueueEntry) obj;
+ if (entryKey == null) {
+ if (other.entryKey != null) {
+ return false;
+ }
+ } else if (!entryKey.equals(other.entryKey)) {
+ return false;
+ }
+ return true;
+ }
+
+ public Object getEntryKey() {
+ return entryKey;
+ }
+
+ public Object getEntryValue() {
+ return entryValue;
+ }
+ }
+
+ private ConcurrentMap<K, EntryImpl> backingMap;
+
+ private long defaultTTL;
+
+ private Queue<DelayedQueueEntry> expiryQueue = new DelayQueue<DelayedQueueEntry>();
+
+ private ScheduledExecutorService expiryQueuePurgeExecutorService;
+
+ public ExpiringMap(long defaultTTL, ScheduledExecutorService expiryQueuePurgeExecutorService) {
+ this.defaultTTL = defaultTTL;
+ this.backingMap = new ConcurrentHashMap<K, EntryImpl>();
+
+ this.expiryQueuePurgeExecutorService = expiryQueuePurgeExecutorService;
+ startPurge();
+ }
+
+ private void startPurge() {
+ expiryQueuePurgeExecutorService.scheduleAtFixedRate(new Runnable() {
+
+ public void run() {
+ DelayedQueueEntry entry;
+
+ while (true) {
+ entry = expiryQueue.poll();
+
+ if (entry == null) {
+ break;
+ }
+
+ backingMap.remove(entry.getEntryKey(), entry.getEntryValue());
+ }
+ }
+ }, 0, 5, TimeUnit.SECONDS);
+ }
+
+ protected void addToExpiryQueue(Object key, Object value) {
+ expiryQueue.add(new DelayedQueueEntry(key, value, getExpirationTimeForCurrentTime()));
+ }
+
+ protected void removeFromExpiryQueue(K key) {
+ expiryQueue.remove(new DelayedQueueEntry(key));
+ }
+
+ public void clear() {
+ backingMap.clear();
+ expiryQueue.clear();
+ }
+
+ public boolean containsKey(Object key) {
+ return backingMap.containsKey(key);
+ }
+
+ public boolean containsValue(Object value) {
+ return backingMap.containsValue(value);
+ }
+
+ private long getExpirationTimeForCurrentTime() {
+ return System.currentTimeMillis() + defaultTTL;
+ }
+
+ private EntryImpl getOrCreateEntry(K key) {
+ EntryImpl entry = backingMap.get(key);
+
+ if (entry == null) {
+ EntryImpl existingEntry = backingMap.putIfAbsent(key, new EntryImpl(key));
+ if (existingEntry != null) {
+ entry = existingEntry;
+ }
+ }
+
+ return entry;
+ }
+
+ public V get(Object key) {
+ Entry<V> entry = backingMap.get(key);
+
+ if (entry != null) {
+ return entry.getValue();
+ }
+
+ return null;
+ }
+
+ public V put(K key, V value) {
+ EntryImpl entry = getOrCreateEntry(key);
+ V oldValue = entry.getValue();
+ entry.setValue(value);
+ return oldValue;
+ }
+
+ public Entry<V> getEntry(Object key) {
+ return backingMap.get(key);
+ }
+
+ public boolean isEmpty() {
+ return backingMap.isEmpty();
+ }
+
+ public V remove(Object key) {
+ expiryQueue.remove(new DelayedQueueEntry(key));
+ Entry<V> removed = backingMap.remove(key);
+ if (removed != null) {
+ return removed.getValue();
+ }
+ return null;
+ }
+
+ public void putAll(Map<? extends K, ? extends V> m) {
+ for (java.util.Map.Entry<? extends K, ? extends V> entry: m.entrySet()) {
+ put(entry.getKey(), entry.getValue());
+ }
+ }
+
+ public Set<java.util.Map.Entry<K, V>> entrySet() {
+ throw new UnsupportedOperationException();
+ }
+
+ public Set<K> keySet() {
+ throw new UnsupportedOperationException();
+ }
+
+ public Collection<V> values() {
+ throw new UnsupportedOperationException();
+ }
+
+ public int size() {
+ return backingMap.size();
+ }
+
+}
13 years, 11 months
JBoss Rich Faces SVN: r19480 - branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-10-06 10:32:26 -0400 (Wed, 06 Oct 2010)
New Revision: 19480
Modified:
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
Log:
move flags defenition to the constructor
Modified: branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
===================================================================
--- branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-10-06 14:01:49 UTC (rev 19479)
+++ branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-10-06 14:32:26 UTC (rev 19480)
@@ -39,6 +39,9 @@
this.editContainer = $(document.getElementById(options.editContainer));
this.element.bind(this.editEvent, $.proxy(this.__editHandler, this));
+
+ this.isSaved = false;
+ this.useDefaultLabel = false;
if(this.showControls) {
this.okbtn = $(document.getElementById(options.okbtn));
@@ -52,9 +55,7 @@
var $super = rf.ui.InplaceBase.$super;
$.extend(rf.ui.InplaceBase.prototype, ( function () {
- var isSaved = false;
- var useDefaultLabel = false;
-
+
return {
getName: function() {
},
@@ -89,10 +90,10 @@
this.setLabel(value);
} else {
this.setLabel(this.defaultLabel);
- useDefaultLabel = true;
+ this.useDefaultLabel = true;
}
- isSaved = true;
+ this.isSaved = true;
this.__applyChangedStyles();
this.__hide();
@@ -108,16 +109,16 @@
cancel: function(){
var text = "";
- if(!useDefaultLabel) {
+ if(!this.useDefaultLabel) {
text = this.getLabel()
}
this.setValue(text);
- isSaved = true;
+ this.isSaved = true;
this.__hide();
},
isValueSaved: function() {
- return isSaved;
+ return this.isSaved;
},
__saveValue: function(value) {
@@ -139,7 +140,7 @@
},
__editHandler: function(e) {
- isSaved = false;
+ this.isSaved = false;
this.editContainer.removeClass(this.noneCss);
this.__show();
},
Modified: branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
--- branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-10-06 14:01:49 UTC (rev 19479)
+++ branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-10-06 14:32:26 UTC (rev 19480)
@@ -7,6 +7,8 @@
this.select = new rf.ui.Select(options.listCord, this, options);
this.selectItems = options.selectItems;
this.selValueInput = $(document.getElementById(options.selValueInput));
+ this.openPopup = false;
+
}
rf.ui.InplaceInput.extend(rf.ui.InplaceSelect);
@@ -15,8 +17,6 @@
var $super = rf.ui.InplaceSelect.$super;
$.extend(rf.ui.InplaceSelect.prototype, ( function () {
- var openPopup = false;
-
return{
name : "inplaceSelect",
@@ -29,12 +29,12 @@
},
onshow: function() {
- if(openPopup) {
+ if(this.openPopup) {
this.select.show();
}
- if(!openPopup) {
- openPopup = true;
+ if(!this.openPopup) {
+ this.openPopup = true;
}
$super.onshow.call(this);
@@ -42,7 +42,7 @@
onhide: function() {
this.select.hide();
- openPopup = false;
+ this.openPopup = false;
},
processItem: function(event, element) {
@@ -79,7 +79,7 @@
}
}
},
-
+
__blurHandler: function(e) {
var target = $(e.originalEvent.explicitOriginalTarget);
if(!this.__isPopupList(target)) {
13 years, 11 months
JBoss Rich Faces SVN: r19479 - in modules/tests/metamer/trunk/application/src/main/webapp/components: richDataGrid and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-10-06 10:01:49 -0400 (Wed, 06 Oct 2010)
New Revision: 19479
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/matrix.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
Log:
* removed IDs from a4j:ajax because of https://jira.jboss.org/browse/RF-9388
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/matrix.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/matrix.xhtml 2010-10-06 13:46:12 UTC (rev 19478)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jRepeat/matrix.xhtml 2010-10-06 14:01:49 UTC (rev 19479)
@@ -52,8 +52,8 @@
<td><h:panelGroup layout="block"
styleClass="cell #{rowStatus.even ? 'row-even' : 'row-odd'} #{cellStatus.even ? 'cell-even' : 'cell-odd'}">
<h:inputText id="valueInput" value="#{cell.value}" size="3">
- <f:convertNumber id="valueConvertNumber" />
- <a4j:ajax id="valueInputAjax" render="form:outputRows:#{rowStatus.index}:outputColumns:#{cellStatus.index}:output" />
+ <f:convertNumber />
+ <a4j:ajax render="form:outputRows:#{rowStatus.index}:outputColumns:#{cellStatus.index}:output" />
</h:inputText>
<h:commandLink id="clearLink" action="#{cell.clearValueAction}" value="C">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml 2010-10-06 13:46:12 UTC (rev 19478)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/hSelectBooleanCheckbox.xhtml 2010-10-06 14:01:49 UTC (rev 19479)
@@ -87,7 +87,7 @@
<br/>
smoker:
<h:selectBooleanCheckbox value="#{record.smoker}">
- <a4j:ajax id="smokerCheckboxAjax" event="change" execute="@this"/>
+ <a4j:ajax event="change" execute="@this"/>
</h:selectBooleanCheckbox>
<f:facet name="footer">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-10-06 13:46:12 UTC (rev 19478)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-10-06 14:01:49 UTC (rev 19479)
@@ -106,7 +106,7 @@
</f:facet>
<rich:inplaceInput id="nameInput" value="#{record.name}" defaultLabel="Click here to edit">
- <a4j:ajax id="inplaceInputAjax" event="change"/>
+ <a4j:ajax event="change"/>
</rich:inplaceInput>
<f:facet name="footer">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml 2010-10-06 13:46:12 UTC (rev 19478)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml 2010-10-06 14:01:49 UTC (rev 19479)
@@ -88,7 +88,7 @@
<f:selectItem itemValue="ALL" itemLabel="all"/>
<f:selectItem itemValue="FEMALE" itemLabel="female"/>
<f:selectItem itemValue="MALE" itemLabel="male"/>
- <a4j:ajax id="columnHeaderSexAjax" render="commonGrid" execute="@this" event="change"/>
+ <a4j:ajax render="commonGrid" execute="@this" event="change"/>
</h:selectOneMenu>
</h:panelGroup>
</f:facet>
@@ -108,7 +108,7 @@
<h:outputText id="columnHeaderNameType" value="(expression contains ignore case)" />
<br/>
<h:inputText id="columnHeaderNameInput" value="#{richDataTableBean.nameFilter}">
- <a4j:ajax id="columnHeaderNameAjax" render="commonGrid" execute="@this" event="change"/>
+ <a4j:ajax render="commonGrid" execute="@this" event="change"/>
</h:inputText>
</f:facet>
@@ -125,7 +125,7 @@
<h:outputText id="columnHeaderTitleType" value="(expression equals)" />
<br/>
<h:inputText id="columnHeaderTitleInput" value="#{richDataTableBean.titleFilter}">
- <a4j:ajax id="columnHeaderTitleAjax" render="commonGrid" execute="@this" event="change"/>
+ <a4j:ajax render="commonGrid" execute="@this" event="change"/>
</h:inputText>
</f:facet>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-10-06 13:46:12 UTC (rev 19478)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-10-06 14:01:49 UTC (rev 19479)
@@ -106,7 +106,7 @@
</f:facet>
<rich:inplaceInput id="nameInput" value="#{record.name}" defaultLabel="Click here to edit">
- <a4j:ajax id="inplaceInputAjax" event="change"/>
+ <a4j:ajax event="change"/>
</rich:inplaceInput>
<f:facet name="footer">
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-10-06 13:46:12 UTC (rev 19478)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-10-06 14:01:49 UTC (rev 19479)
@@ -120,7 +120,7 @@
</rich:column>
<rich:column>
<rich:inplaceInput id="nameInput" value="#{item.name}" defaultLabel="Click here to edit">
- <a4j:ajax id="inplaceInputAjax" event="change"/>
+ <a4j:ajax event="change"/>
</rich:inplaceInput>
</rich:column>
<rich:column>
13 years, 11 months
JBoss Rich Faces SVN: r19478 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-10-06 09:46:12 -0400 (Wed, 06 Oct 2010)
New Revision: 19478
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
Log:
https://jira.jboss.org/browse/RFPL-757
* attribute validator removed from list
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2010-10-06 13:43:08 UTC (rev 19477)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2010-10-06 13:46:12 UTC (rev 19478)
@@ -61,6 +61,8 @@
attributes.setAttribute("rendered", true);
attributes.setAttribute("value", "RichFaces 4");
+ // TODO has to be tested in another way
+ attributes.remove("validator");
}
public Attributes getAttributes() {
13 years, 11 months
JBoss Rich Faces SVN: r19477 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-10-06 09:43:08 -0400 (Wed, 06 Oct 2010)
New Revision: 19477
Added:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
Log:
Added: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js (rev 0)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2010-10-06 13:43:08 UTC (rev 19477)
@@ -0,0 +1,90 @@
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ var INTERFACE = {
+ SelectListener : {
+ processItem: function(event, element){}
+ }
+ };
+
+ rf.ui.Select = function(id, listener, options) {
+ this.id = id;
+ this.select = $(document.getElementById(id));
+ this.itemsCord = $(document.getElementById(options.itemsCord));
+ this.selectItemCss = options.selectItemCss;
+ this.itemCss = options.itemCss;
+ this.selectListener = listener;
+
+ this.select.bind("blur", $.proxy(this.__blurHandler, this));
+ this.itemsCord.bind("mouseover", $.proxy(this.__mouseHandler, this));
+ this.itemsCord.bind("click", $.proxy(this.__mouseHandler, this));
+ };
+
+ rf.BaseComponent.extend(rf.ui.Select);
+ var $super = rf.ui.Select.$super;
+
+ $.extend(rf.ui.Select.prototype, ( function () {
+
+ var processed = null;
+
+ var isSelectListener = function(obj) {
+ for (var method in INTERFACE.SelectListener) {
+ if ( (typeof obj[method] != typeof INTERFACE.SelectListener[method]) ) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ return{
+ name : "select",
+
+ show: function() {
+ this.select.css("display", "");
+ },
+
+ hide: function() {
+ this.select.css("display", "none");
+ },
+
+ processItem: function(event, element) {
+ if(isSelectListener(this.selectListener)) {
+ this.selectListener.processItem(event, element);
+ }
+ },
+
+ __getCurrentElement: function() {
+ return processed;
+ },
+
+ __blurHandler: function(e) {
+ processItem(e, processed);
+ return false;
+ },
+
+ __mouseHandler: function(event) {
+ var element = $(event.target).closest("."+this.itemCss, event.currentTarget);
+ if (event&& element) {
+ if(event.type == 'mouseover') {
+ if(processed) {
+ processed.removeClass(this.selectItemCss);
+ }
+ element.addClass(this.selectItemCss);
+ processed = element;
+ }
+
+ if(event.type == 'click') {
+ this.processItem(event, element);
+ }
+ }
+ return false;
+ },
+
+ __getId: function() {
+ return this.id;
+ }
+ }
+ })());
+
+})(jQuery, window.RichFaces);
13 years, 11 months
JBoss Rich Faces SVN: r19476 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-10-06 09:01:14 -0400 (Wed, 06 Oct 2010)
New Revision: 19476
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml
Log:
fixed and described samples for a4j:attachQueue which did not work due to RF-9351 (RFPL-734)
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml 2010-10-06 11:56:27 UTC (rev 19475)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml 2010-10-06 13:01:14 UTC (rev 19476)
@@ -41,11 +41,9 @@
}
function updateDifferenceTime() {
- var eventTime1 = parseInt(jQuery(#{rich:element('eventTime1:outputTime')}).attr('title'));
- var eventTime2 = parseInt(jQuery(#{rich:element('eventTime2:outputTime')}).attr('title'));
+ var eventTime = parseInt(jQuery(#{rich:element('eventTime:outputTime')}).attr('title'));
var beginTime = parseInt(jQuery(#{rich:element('beginTime:outputTime')}).attr('title'));
- var eventTime = Math.max(eventTime1, eventTime2);
jQuery(#{rich:element('differenceTime')}).text(beginTime - eventTime);
}
</script>
@@ -67,23 +65,31 @@
requestDelay="#{a4jQueueBean.attributes['requestDelay'].value}" status="status1"
timeout="#{a4jQueueBean.attributes['timeout'].value}" />
- <a4j:ajax event="keyup" render="output1, output2" execute="@form" onbegin="add(#{rich:element('requests')}); "
- oncomplete="refresh(#{rich:element('completeTime:outputTime')}); updateDifferenceTime();" onbeforedomupdate="add(#{rich:element('updates')});">
- <a4j:attachQueue id="a4jAttachQueue"
- ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
- name="#{a4jAttachQueueBean.attributes['name'].value}"
- onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
- onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
- queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
- rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
- requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
- requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
- timeout="#{a4jAttachQueueBean.attributes['timeout'].value}"/>
+ <fieldset>
+ <legend><a4j:ajax event="keyup" ></legend>
+
+ <a4j:ajax event="keyup" render="output1, output2" execute="@form" onbegin="add(#{rich:element('requests')}); refresh(#{rich:element('beginTime:outputTime')}); "
+ oncomplete="refresh(#{rich:element('completeTime:outputTime')}); updateDifferenceTime();" onbeforedomupdate="add(#{rich:element('updates')});">
+
+ <div><a4j:attachQueue /></div>
+
+ <a4j:attachQueue id="a4jAttachQueue"
+ ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
+ name="#{a4jAttachQueueBean.attributes['name'].value}"
+ onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
+ onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
+ queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
+ rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
+ requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
+ requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
+ timeout="#{a4jAttachQueueBean.attributes['timeout'].value}"/>
+
+ <h:inputText id="input1" value="#{a4jAttachQueueBean.text1}" onkeyup="add(#{rich:element('events')}); refresh(#{rich:element('eventTime:outputTime')});"/>
+ <h:inputText id="input2" value="#{a4jAttachQueueBean.text2}" onkeyup="add(#{rich:element('events')}); refresh(#{rich:element('eventTime:outputTime')});"/>
+ </a4j:ajax>
+
+ </fieldset>
- <h:inputText id="input1" value="#{a4jAttachQueueBean.text1}" onkeyup="add(#{rich:element('events')});"/>
- <h:inputText id="input2" value="#{a4jAttachQueueBean.text2}" onkeyup="add(#{rich:element('events')});"/>
- </a4j:ajax>
-
<h:panelGrid columns="2">
Output 1:
<h:outputText id="output1" value="#{a4jAttachQueueBean.text1}" style="font-weight:bold;"/>
@@ -98,8 +104,16 @@
Difference time:
<h:outputText value="" id="differenceTime" />
</h:panelGrid>
-
+
+ <h:panelGrid columns="1">
+ <metamer:clientTime id="eventTime" label="Event Time:" />
+ <metamer:clientTime id="beginTime" label="Begin Time:" />
+ <metamer:clientTime id="completeTime" label="Complete Time:" />
+ </h:panelGrid>
+
</ui:define>
+
+
<ui:define name="outOfTemplateAfter">
Attributes for wrapping attach queue
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml 2010-10-06 11:56:27 UTC (rev 19475)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml 2010-10-06 13:01:14 UTC (rev 19476)
@@ -38,15 +38,12 @@
</metamer:testPageLink>
<metamer:testPageLink id="extending" outcome="extending" value="Extending">
- <font color="red" style="font-weigth: bold">Doesn't work currently due to RF-9351.</font>
- <br />
Two <b>h:inputText</b>s are wrapped in <b>a4j:ajax</b>, which is extended by <b>a4j:attachQueue</b>.
<br />
Contains also one named <b>a4j:queue</b> to try queue naming and attaching.
</metamer:testPageLink>
<metamer:testPageLink id="nestedExtension" outcome="nestedExtension" value="Nested Extension">
- <div><font color="red" style="font-weigth: bold">Doesn't work currently due to RF-9351.</font></div>
<div>Two nested a4j:ajaxs, each extended by own a4j:attachQueue.</div>
<div>First a4j:ajax controls clicks to h:inputText and a4j:commandButton.</div>
<div>Second a4j:ajax controls valueChanges of h:inputText.</div>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml 2010-10-06 11:56:27 UTC (rev 19475)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml 2010-10-06 13:01:14 UTC (rev 19476)
@@ -67,53 +67,70 @@
requestDelay="#{a4jQueueBean.attributes['requestDelay'].value}" status="status1"
timeout="#{a4jQueueBean.attributes['timeout'].value}" />
- <a4j:ajax event="click" execute="@form"
- onbegin="add(#{rich:element('requests')}); refresh(#{rich:element('beginTime:outputTime')}); "
- onbeforedomupdate="add(#{rich:element('updates')});"
- oncomplete="refresh(#{rich:element('completeTime:outputTime')}); updateDifferenceTime(); ">
+ <fieldset>
+ <legend><a4j:ajax event='click' ... ></legend>
+
+ <a4j:ajax event="click" execute="@form"
+ onbegin="add(#{rich:element('requests')}); refresh(#{rich:element('beginTime:outputTime')}); "
+ onbeforedomupdate="add(#{rich:element('updates')});"
+ oncomplete="refresh(#{rich:element('completeTime:outputTime')}); updateDifferenceTime(); ">
+
+ <div><a4j:attachQueue id="..1" /></div>
+
+ <a4j:attachQueue id="a4jAttachQueue1"
+ ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
+ name="#{a4jAttachQueueBean.attributes['name'].value}"
+ onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
+ onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
+ queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
+ rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
+ requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
+ requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
+ timeout="#{a4jAttachQueueBean.attributes['timeout'].value}" />
+
+ <h:inputText id="input1" value="#{a4jAttachQueueBean.text1}"
+ onclick="add(#{rich:element('events1')}); refresh(#{rich:element('eventTime1:outputTime')}); " />
+ <a4j:commandButton
+ onclick="add(#{rich:element('events1')}); refresh(#{rich:element('eventTime1:outputTime')}); "
+ id="a4jCommandButton1" value="First button" />
+
+ <fieldset>
+ <legend><a4j:ajax event='valueChange' ... ></legend>
+
+ <a4j:ajax event="valueChange" render="output2" execute="@form"
+ onbegin="add(#{rich:element('requests')}); refresh(#{rich:element('beginTime:outputTime')}); "
+ onbeforedomupdate="add(#{rich:element('updates')});"
+ oncomplete="refresh(#{rich:element('completeTime:outputTime')}); updateDifferenceTime();">
+
+ <h:inputText id="input2" value="#{a4jAttachQueueBean.text2}"
+ onclick="add(#{rich:element('events1')}); refresh(#{rich:element('eventTime1:outputTime')}); "
+ onchange="add(#{rich:element('events2')}); refresh(#{rich:element('eventTime2:outputTime')}); " />
+ <a4j:commandButton
+ id="a4jCommandButton2" value="First button"
+ onclick="add(#{rich:element('events1')}); refresh(#{rich:element('eventTime1:outputTime')}); " />
+
+ <div><a4j:attachQueue id="..2" /></div>
+
+ <a4j:attachQueue id="a4jAttachQueue2"
+ ignoreDupResponses="#{a4jAttachQueueBean.attributes2['ignoreDupResponses'].value}"
+ name="#{a4jAttachQueueBean.attributes2['name'].value}"
+ onrequestdequeue="#{a4jAttachQueueBean.attributes2['onrequestdequeue'].value}"
+ onrequestqueue="#{a4jAttachQueueBean.attributes2['onrequestqueue'].value}"
+ queueId="#{a4jAttachQueueBean.attributes2['queueId'].value}"
+ rendered="#{a4jAttachQueueBean.attributes2['rendered'].value}"
+ requestDelay="#{a4jAttachQueueBean.attributes2['requestDelay'].value}"
+ requestGroupingId="#{a4jAttachQueueBean.attributes2['requestGroupingId'].value}"
+ timeout="#{a4jAttachQueueBean.attributes2['timeout'].value}" />
+
+
+ </a4j:ajax>
+
+ </fieldset>
+
+ </a4j:ajax>
+
+ </fieldset>
- <a4j:attachQueue id="a4jAttachQueue1"
- ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
- name="#{a4jAttachQueueBean.attributes['name'].value}"
- onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
- onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
- queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
- rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
- requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
- requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
- timeout="#{a4jAttachQueueBean.attributes['timeout'].value}" />
-
- <h:inputText id="input1" value="#{a4jAttachQueueBean.text1}"
- onclick="add(#{rich:element('events1')}); refresh(#{rich:element('eventTime1:outputTime')}); " />
- <a4j:commandButton
- onclick="add(#{rich:element('events1')}); refresh(#{rich:element('eventTime1:outputTime')}); "
- id="a4jCommandButton1" value="First button" />
-
- <a4j:ajax event="valueChange" render="output2" execute="@form"
- onbegin="add(#{rich:element('requests')}); refresh(#{rich:element('beginTime:outputTime')}); "
- onbeforedomupdate="add(#{rich:element('updates')});"
- oncomplete="refresh(#{rich:element('completeTime:outputTime')}); updateDifferenceTime();">
-
- <h:inputText id="input2" value="#{a4jAttachQueueBean.text2}"
- onkeyup="add(#{rich:element('events2')}); refresh(#{rich:element('eventTime2:outputTime')}); " />
- <a4j:commandButton id="a4jCommandButton2" value="First button" />
-
- <a4j:attachQueue id="a4jAttachQueue2"
- ignoreDupResponses="#{a4jAttachQueueBean.attributes2['ignoreDupResponses'].value}"
- name="#{a4jAttachQueueBean.attributes2['name'].value}"
- onrequestdequeue="#{a4jAttachQueueBean.attributes2['onrequestdequeue'].value}"
- onrequestqueue="#{a4jAttachQueueBean.attributes2['onrequestqueue'].value}"
- queueId="#{a4jAttachQueueBean.attributes2['queueId'].value}"
- rendered="#{a4jAttachQueueBean.attributes2['rendered'].value}"
- requestDelay="#{a4jAttachQueueBean.attributes2['requestDelay'].value}"
- requestGroupingId="#{a4jAttachQueueBean.attributes2['requestGroupingId'].value}"
- timeout="#{a4jAttachQueueBean.attributes2['timeout'].value}" />
-
-
- </a4j:ajax>
-
- </a4j:ajax>
-
<h:panelGrid columns="2">
Output 1:
<h:outputText id="output1" value="#{a4jAttachQueueBean.text1}" style="font-weight:bold;" />
13 years, 11 months