JBoss Rich Faces SVN: r3617 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-30 08:50:43 -0400 (Tue, 30 Oct 2007)
New Revision: 3617
Modified:
trunk/docs/userguide/en/src/main/docbook/included/column.xml
trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
trunk/docs/userguide/en/src/main/docbook/included/subTable.xml
Log:
http://jira.jboss.com/jira/browse/RF-920 - correcting links
Modified: trunk/docs/userguide/en/src/main/docbook/included/column.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/column.xml 2007-10-30 12:13:26 UTC (rev 3616)
+++ trunk/docs/userguide/en/src/main/docbook/included/column.xml 2007-10-30 12:50:43 UTC (rev 3617)
@@ -201,9 +201,9 @@
<para>Skin parameters redefinition for <emphasis role="bold">
<property><rich:column></property>
- </emphasis> are the same as for the <link linkend="SPR"><emphasis role="bold">
+ </emphasis> are the same as for the <emphasis role="bold">
<property><rich:dataTable></property>
- </emphasis></link> component.</para>
+ </emphasis> <link linkend="SPR">component</link>.</para>
</section>
<section>
@@ -211,9 +211,9 @@
<para>Custom style classes for <emphasis role="bold">
<property><rich:column></property>
- </emphasis> are the same as for the <link linkend="DofCCS"><emphasis role="bold">
+ </emphasis> are the same as for the <emphasis role="bold">
<property><rich:dataTable></property>
- </emphasis></link> component.
+ </emphasis> <link linkend="DofCCS">component</link>.
</para>
<para>In order to redefine styles for all <emphasis role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml 2007-10-30 12:13:26 UTC (rev 3616)
+++ trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml 2007-10-30 12:50:43 UTC (rev 3617)
@@ -185,9 +185,9 @@
<title>Skin Parameters Redefinition</title>
<para>Skin parameters redefinition for <emphasis role="bold"><property><rich:columnGroup></property>
- </emphasis> are the same as for the <link linkend="SPR"><emphasis role="bold">
+ </emphasis> are the same as for the <emphasis role="bold">
<property><rich:dataTable></property>
- </emphasis></link> component.</para>
+ </emphasis> <link linkend="SPR">component</link>.</para>
</section>
<section>
@@ -195,9 +195,9 @@
<para>Custom style classes for <emphasis role="bold">
<property><rich:columnGroup></property>
- </emphasis> are the same as for the <link linkend="DofCCS"><emphasis role="bold">
+ </emphasis> are the same as for the <emphasis role="bold">
<property><rich:dataTable></property>
- </emphasis></link> component.
+ </emphasis><link linkend="DofCCS">component</link>.
</para>
<para>In order to redefine styles for all <emphasis role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-10-30 12:13:26 UTC (rev 3616)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataGrid.xml 2007-10-30 12:50:43 UTC (rev 3617)
@@ -121,9 +121,9 @@
<para>Skin parameters redefinition for <emphasis role="bold">
<property><rich:dataGrid></property>
- </emphasis> are the same as for the <link linkend="SPR"><emphasis role="bold">
+ </emphasis> are the same as for the <emphasis role="bold">
<property><rich:dataTable></property>
- </emphasis></link> component.</para>
+ </emphasis> <link linkend="SPR">component</link>.</para>
</section>
<section>
@@ -131,9 +131,9 @@
<para>Custom style classes for <emphasis role="bold">
<property><rich:dataGrid></property>
- </emphasis> are the same as for the <link linkend="DofCCS"><emphasis role="bold">
+ </emphasis> are the same as for the <emphasis role="bold">
<property><rich:dataTable></property>
- </emphasis></link> component.
+ </emphasis> <link linkend="DofCCS">component</link>.
</para>
<para>In order to redefine styles for all <emphasis role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/included/subTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/subTable.xml 2007-10-30 12:13:26 UTC (rev 3616)
+++ trunk/docs/userguide/en/src/main/docbook/included/subTable.xml 2007-10-30 12:50:43 UTC (rev 3617)
@@ -121,9 +121,9 @@
<para>Skin parameters redefinition for <emphasis role="bold">
<property><rich:subTable></property>
- </emphasis> are the same as for the <link linkend="SPR"><emphasis role="bold">
+ </emphasis> are the same as for the <emphasis role="bold">
<property><rich:dataTable></property>
- </emphasis></link> component.</para>
+ </emphasis> <link linkend="SPR">component</link>.</para>
</section>
<section>
17 years, 2 months
JBoss Rich Faces SVN: r3616 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-10-30 08:13:26 -0400 (Tue, 30 Oct 2007)
New Revision: 3616
Modified:
trunk/docs/userguide/en/src/main/docbook/included/panel.xml
trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml
trunk/docs/userguide/en/src/main/docbook/included/panelBarItem.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
Log:
http://jira.jboss.com/jira/browse/RF-920 - checked and added skins fixed errors in description of classes.
Modified: trunk/docs/userguide/en/src/main/docbook/included/panel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panel.xml 2007-10-30 12:10:21 UTC (rev 3615)
+++ trunk/docs/userguide/en/src/main/docbook/included/panel.xml 2007-10-30 12:13:26 UTC (rev 3616)
@@ -172,7 +172,7 @@
<section>
<title>Skin Parameters Redefinition</title>
<table>
- <title>Skin parameters for the panel</title>
+ <title>Skin parameters redefinition for a whole component</title>
<tgroup cols="2">
<thead>
<row>
@@ -193,7 +193,7 @@
</tgroup>
</table>
<table>
- <title>Parameters for a header element</title>
+ <title>Skin parameters redefinition for a header element</title>
<tgroup cols="2">
<thead>
<row>
@@ -230,7 +230,7 @@
</tgroup>
</table>
<table>
- <title>Parameters for a body element</title>
+ <title>Skin parameters redefinition for a body element</title>
<tgroup cols="2">
<thead>
<row>
@@ -257,8 +257,9 @@
</section>
<section>
<title>Definition of Custom Style Classes</title>
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
<figure>
- <title>Style classes of panel</title>
+ <title>Style classes</title>
<mediaobject>
<imageobject>
@@ -266,7 +267,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>On the screenshot, there are classes names that define specified elements.</para>
+
<table>
<title>Classes names that define a component appearance</title>
<tgroup cols="2">
@@ -279,15 +280,15 @@
<tbody>
<row>
<entry>rich-panel</entry>
- <entry>Defines styles for a wrapper <div> element of a panel</entry>
+ <entry>Defines styles for a wrapper <div> element of a component</entry>
</row>
<row>
<entry>rich-panel-header</entry>
- <entry>Defines styles for header element of a panel</entry>
+ <entry>Defines styles for a header element</entry>
</row>
<row>
<entry>rich-panel-body</entry>
- <entry>Defines styles for a panel body</entry>
+ <entry>Defines styles for a body elemnt</entry>
</row>
</tbody>
</tgroup>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml 2007-10-30 12:10:21 UTC (rev 3615)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml 2007-10-30 12:13:26 UTC (rev 3616)
@@ -46,9 +46,9 @@
<title>Creating the Component with a Page Tag</title>
<para>Here is a simple example as it could be used on a page: </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<rich:panelBar>
<!--//... -->
@@ -65,9 +65,9 @@
<section>
<title>Creating the Component Dynamically Using Java</title>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlPanelBar;
...
HtmlPanelBar myBar = new HtmlPanelBar();
@@ -76,9 +76,9 @@
</section>
<section>
<title>Details of Usage</title>
- <para>As it was mentioned <link linkend="panelBar">above</link>, <property>panelBar</property> is used for grouping any
- content on the client, thus its customization deals only with specification of sizes and
- styles for rendering.</para>
+ <para>As it was mentioned <link linkend="panelBar">above</link>,
+ <property>panelBar</property> is used for grouping any content on the client, thus its
+ customization deals only with specification of sizes and styles for rendering.</para>
<para><emphasis>
<property>"width"</property>
</emphasis> and <emphasis>
@@ -106,12 +106,36 @@
it's described for its children).</listitem>
</itemizedlist>
</section>
+
<section>
+ <title>Skin Parameters Redefinition</title>
+ <table>
+ <title>Skin parameter redefinition for a whole component</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameter</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>headerBackgroundColor</entry>
+ <entry>border-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
<title>Definition of Custom Style Classes</title>
- <para>There is one predefined class for the <property>panelBar</property>, which is
- applicable to the whole component, specifying padding, borders, and etc.</para>
+ <para>There is one predefined class for the <emphasis role="bold">
+ <property><rich:panelBar></property>
+ </emphasis>, which is applicable to a whole component, specifying padding, borders, and
+ etc.</para>
<figure>
- <title>Custom style class of panelBar</title>
+ <title>Style class</title>
<mediaobject>
<imageobject>
@@ -120,7 +144,7 @@
</mediaobject>
</figure>
<table>
- <title>Classes names that define a component appearance</title>
+ <title>Class name that define a component appearance</title>
<tgroup cols="2">
<thead>
<row>
@@ -131,15 +155,17 @@
<tbody>
<row>
<entry>rich-panelbar</entry>
- <entry>Defines styles for a wrapper <div> element of a panelbar</entry>
+ <entry>Defines styles for a wrapper <div> element of a
+ component</entry>
</row>
-
</tbody>
</tgroup>
</table>
- <para>Other classes responsible for elements rendering are described for child panelBarItem
- elements and could be found in the components chapters.</para>
-
+ <para>Other classes responsible for elements rendering are described for child <emphasis
+ role="bold">
+ <property><rich:panelBarItem></property>
+ </emphasis> elements and could be found in the components chapters.</para>
+
<table>
<title>Style component classes</title>
<tgroup cols="2">
@@ -152,35 +178,35 @@
<tbody>
<row>
<entry>styleClass</entry>
- <entry>applicable to the whole panel together with headers</entry>
+ <entry>Applicable to a whole component (together with headers)</entry>
</row>
<row>
<entry>headerClass</entry>
- <entry>applicable to headers elements</entry>
+ <entry>Applicable to a header element</entry>
</row>
<row>
<entry>contentClass</entry>
- <entry>applicable to panels</entry>
+ <entry>Applicable to a content </entry>
</row>
</tbody>
</tgroup>
</table>
<para>In order to redefine styles for all <emphasis role="bold">
- <property><rich:panelBar></property>
- </emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define necessary properties in them.</para>
-
+ <property><rich:panelBar></property>
+ </emphasis> components on a page using CSS, it's enough to create classes with
+ the same names and define necessary properties in them.</para>
+
<para>To change styles of particular <emphasis role="bold">
- <property><rich:panelBar></property>
- </emphasis> components, define your own style classes in the corresponding <emphasis
- role="bold">
- <property><rich:panelBar></property>
- </emphasis>attributes.</para>
+ <property><rich:panelBar></property>
+ </emphasis> components, define your own style classes in the corresponding <emphasis
+ role="bold">
+ <property><rich:panelBar></property>
+ </emphasis>attributes.</para>
<para>CSS code piece used on a page:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="HTML"><![CDATA[...
. rich-panelbar{
padding:10px;
@@ -193,9 +219,9 @@
<para>When using headerClass and headerClassActive attributes the declaration of headerClass
should precede the one of headerClassActive:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="HTML"><![CDATA[...
.headerClass{
...
@@ -217,16 +243,20 @@
</rich:panelBar>
...
]]></programlisting>
- <para>Hence, padding for all <property>panelBars</property> is changed on a page as well as
- a font for particular <property>panelBarItems</property> content.</para>
+ <para>Hence, padding for all <emphasis role="bold">
+ <property><rich:panelBar></property>
+ </emphasis> is changed on a page as well as a font for particular
+ <emphasis role="bold">
+ <property><rich:panelBarItem></property>
+ </emphasis> content.</para>
</section>
<section>
<title>Relevant Resources Links</title>
<para>
<ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/panelBar.jsf?c=panelBar"
- >Here</ulink> you can see the example of <emphasis role="bold"
- ><property><rich:panelBar></property></emphasis> usage and sources for the given example.
- </para>
+ >Here</ulink> you can see the example of <emphasis role="bold">
+ <property><rich:panelBar></property>
+ </emphasis> usage and sources for the given example. </para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelBarItem.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelBarItem.xml 2007-10-30 12:10:21 UTC (rev 3615)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelBarItem.xml 2007-10-30 12:13:26 UTC (rev 3616)
@@ -75,8 +75,13 @@
</section>
<section>
<title>Details of Usage</title>
- <para>The <emphasis ><property> "label"</property></emphasis > attribute defines text to be represented. If you can use the
- <emphasis ><property>"label"</property></emphasis > facet, you can even not use the <emphasis ><property>"label"</property></emphasis > attribute.</para>
+ <para>The <emphasis>
+ <property> "label"</property>
+ </emphasis> attribute defines text to be represented. If you can use the <emphasis>
+ <property>"label"</property>
+ </emphasis> facet, you can even not use the <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute.</para>
<emphasis role="bold">Example:</emphasis>
<programlisting role="XML"><![CDATA[...
<rich:panelBarItem...>
@@ -89,10 +94,11 @@
</rich:panelBarItem>
...
]]></programlisting>
- <para>As it was mentioned <link linkend="panelBarItem">above</link>, <property>panelBarItem</property> is used for grouping any
- content inside within one <property>panelBar</property>, thus its customization deals only
- with specification of sizes and styles for rendering.</para>
- <para><property>panelBar</property> could contain any number of child
+ <para>As it was mentioned <link linkend="panelBarItem">above</link>,
+ <property>panelBarItem</property> is used for grouping any content inside within one
+ <property>panelBar</property>, thus its customization deals only with specification of sizes
+ and styles for rendering.</para>
+ <para><property>panelBar</property> could contain any number of child
<property>panelBarItem</property> components inside, which content is uploaded onto the client
and headers are controls to open the corresponding child element.</para>
</section>
@@ -114,32 +120,32 @@
<section>
<title>Skin Parameters Redefinition</title>
<table>
- <title>Skin parameters for the panel content appearance</title>
+ <title>Skin parameters redefinition for a content </title>
<tgroup cols="2">
<thead>
<row>
- <entry>Skin parameters for a hint</entry>
+ <entry>Skin parameters</entry>
<entry>CSS properties</entry>
</row>
</thead>
<tbody>
<row>
- <entry>panelTextColor</entry>
+ <entry>generalTextColor</entry>
<entry>color</entry>
</row>
<row>
- <entry>generalBackgroundColor</entry>
- <entry>background-color</entry>
+ <entry>preferableDataSizeFont</entry>
+ <entry>font-size</entry>
</row>
<row>
- <entry>border</entry>
- <entry>tableBorderColor</entry>
+ <entry>preferableDataFamilyFont</entry>
+ <entry>font-family</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
- <title>Parameters for panel header appearance</title>
+ <title>Skin parameters redefinition for a header element (active or inactive)</title>
<tgroup cols="2">
<thead>
<row>
@@ -149,25 +155,41 @@
</thead>
<tbody>
<row>
+ <entry>headerTextColor</entry>
+ <entry>color</entry>
+ </row>
+ <row>
<entry>headerBackgroundColor</entry>
- <entry>border</entry>
+ <entry>background-color</entry>
</row>
+ <row>
+ <entry>headerSizeFont</entry>
+ <entry>font-size</entry>
+ </row>
+ <row>
+ <entry>headerWeightFont</entry>
+ <entry>font-weight</entry>
+ </row>
+ <row>
+ <entry>headerFamilyFont</entry>
+ <entry>font-family</entry>
+ </row>
</tbody>
</tgroup>
</table>
</section>
<section>
<title>Definition of Custom Style Classes</title>
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
<figure>
- <title>PanelBarItem style classes</title>
+ <title>Style classes</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/panelBar3.gif" scalefit="1"/>
</imageobject>
</mediaobject>
</figure>
- <para>There are three predefined classes for the <property>panelBarItem</property> shown on the
- screenshot and described in the table below</para>
+
<table>
<title>Classes names that define a component appearance</title>
<tgroup cols="2">
@@ -180,22 +202,24 @@
<tbody>
<row>
<entry>rich-panelbar-header</entry>
- <entry>Defines styles for a wrapper <div> element of a panelbar item header</entry>
+ <entry>Defines styles for a wrapper <div> element of a header
+ element</entry>
</row>
-
+
<row>
<entry>rich-panelbar-header-act</entry>
- <entry>Defines styles for a wrapper <div> element of an acting panelbar item header</entry>
+ <entry>Defines styles for a wrapper <div> element of an active header
+ element</entry>
</row>
-
+
<row>
<entry>rich-panelbar-content</entry>
- <entry>Defines styles for a panelbar item content</entry>
+ <entry>Defines styles for a content</entry>
</row>
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Style component classes</title>
<tgroup cols="2">
@@ -208,27 +232,27 @@
<tbody>
<row>
<entry>headerClass</entry>
- <entry>applicable to header elements</entry>
+ <entry>Applicable to a header element</entry>
</row>
<row>
<entry>contentClass</entry>
- <entry>applicable to panel elements</entry>
+ <entry>Applicable to a content</entry>
</row>
</tbody>
</tgroup>
</table>
-
+
<para>In order to redefine styles for all <emphasis role="bold">
- <property><rich:panelBarItem></property>
- </emphasis> components on a page using CSS, it's enough to create classes with the
+ <property><rich:panelBarItem></property>
+ </emphasis> components on a page using CSS, it's enough to create classes with the
same names and define necessary properties in them.</para>
-
+
<para>To change styles of particular <emphasis role="bold">
- <property><rich:panelBarItem></property>
- </emphasis> components, define your own style classes in the corresponding <emphasis
- role="bold">
- <property><rich:panelBarItem></property>
- </emphasis>attributes.</para>
+ <property><rich:panelBarItem></property>
+ </emphasis> components, define your own style classes in the corresponding <emphasis
+ role="bold">
+ <property><rich:panelBarItem></property>
+ </emphasis>attributes.</para>
<para>CSS code piece used on a page:</para>
<para>
@@ -243,7 +267,7 @@
}
...
]]></programlisting>
- <para>The component is defined in the following way:</para>
+ <para>The component is defined in the following way:</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -256,7 +280,11 @@
</rich:panelBar>
...
]]></programlisting>
- <para>Hence, a font size of all <property>panelBarItem</property> headers is changed on a page
- as well as a font for the particular <property>panelBarItem</property> content.</para>
+ <para>Hence, a font size of all <emphasis role="bold">
+ <property><rich:panelBarItem></property>
+ </emphasis> headers is changed on a page as well as a font for the particular <emphasis
+ role="bold">
+ <property><rich:panelBarItem></property>
+ </emphasis> content.</para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-10-30 12:10:21 UTC (rev 3615)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-10-30 12:13:26 UTC (rev 3616)
@@ -234,9 +234,8 @@
</section>
-
<section>
- <title>Look-and-Feel Customization</title>
+ <title>Definition of Custom Style Classes</title>
<para>As this component is just a wrapper for its children its provide the only
"rich-panel-menu" class for wrapper div element. To redefine appearance of
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml 2007-10-30 12:10:21 UTC (rev 3615)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml 2007-10-30 12:13:26 UTC (rev 3616)
@@ -255,12 +255,12 @@
<title> Skin Parameters Redefinition</title>
<table>
- <title>Skin parameters redefinition for table element of the first level group</title>
+ <title>Skin parameters redefinition for a table element of the first level group</title>
<tgroup cols="2">
<thead>
<row>
- <entry>Parameters for table element of the first level group</entry>
+ <entry>Skin parameters</entry>
<entry>CSS properties</entry>
</row>
@@ -301,12 +301,12 @@
</table>
<table>
- <title>Skin parameters redefinition for table element of the second and next levels groups</title>
+ <title>Skin parameters redefinition for a table element of second and next levels groups</title>
<tgroup cols="2">
<thead>
<row>
- <entry>Parameters for table element of the second and next levels groups</entry>
+ <entry>Skin parameters</entry>
<entry>CSS properties</entry>
</row>
@@ -347,12 +347,12 @@
</table>
<table>
- <title>Skin parameter redefinition for wrapped div element of the first level group</title>
+ <title>Skin parameters redefinition for wrapper div element of the first level group</title>
<tgroup cols="2">
<thead>
<row>
- <entry>Parameter for wrapped div element of the first level group</entry>
+ <entry>Skin parameters</entry>
<entry>CSS properties</entry>
</row>
@@ -372,7 +372,7 @@
<section>
<title>Definition of Custom Style Classes</title>
-
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
<figure>
<title>Classes names</title>
@@ -383,10 +383,8 @@
</mediaobject>
</figure>
- <para>On the screenshot, there are classes names defining specified elements.</para>
-
<table>
- <title>Classes names that define an upper level nodes</title>
+ <title>Classes names that define an upper level groups</title>
<tgroup cols="2">
<thead>
@@ -426,7 +424,7 @@
</table>
<table>
- <title>Classes names that define a second and lower level nodes</title>
+ <title>Classes names that define a second and lower level groups</title>
<tgroup cols="2">
<thead>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2007-10-30 12:10:21 UTC (rev 3615)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2007-10-30 12:13:26 UTC (rev 3616)
@@ -263,7 +263,7 @@
<tgroup cols="2">
<thead>
<row>
- <entry>Parameters for table element item of first level</entry>
+ <entry>Skin parameters</entry>
<entry>CSS properties</entry>
</row>
@@ -304,7 +304,7 @@
</table>
<table>
- <title>General skin parameter redefinition for disabled item </title>
+ <title>Skin parameter redefinition for a disabled item </title>
<tgroup cols="2">
<thead>
@@ -330,7 +330,7 @@
<section>
<title>Definition of Custom Style Classes</title>
-
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
<figure>
<title>Classes names</title>
@@ -341,9 +341,7 @@
</mediaobject>
</figure>
- <para>On the screenshot, there are classes names defining specified elements.</para>
-
- <table>
+ <table>
<title>Classes names that define first level items</title>
<tgroup cols="2">
17 years, 2 months
JBoss Rich Faces SVN: r3615 - trunk/ui/message/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-30 08:10:21 -0400 (Tue, 30 Oct 2007)
New Revision: 3615
Modified:
trunk/ui/message/src/main/config/component/message.xml
Log:
remove var from messages component config
Modified: trunk/ui/message/src/main/config/component/message.xml
===================================================================
--- trunk/ui/message/src/main/config/component/message.xml 2007-10-30 12:08:30 UTC (rev 3614)
+++ trunk/ui/message/src/main/config/component/message.xml 2007-10-30 12:10:21 UTC (rev 3615)
@@ -311,14 +311,6 @@
</property>
<property>
- <name>var</name>
- <classname>java.lang.String</classname>
- <description>
- Name of a request-scope attribute under which the list of the messages should be available
- </description>
- </property>
-
- <property>
<name>layout</name>
<classname>java.lang.String</classname>
<defaultvalue>"list"</defaultvalue>
17 years, 2 months
JBoss Rich Faces SVN: r3614 - branches/3.1.x/ui/message/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-30 08:08:30 -0400 (Tue, 30 Oct 2007)
New Revision: 3614
Modified:
branches/3.1.x/ui/message/src/main/config/component/message.xml
Log:
remove var from component config file
Modified: branches/3.1.x/ui/message/src/main/config/component/message.xml
===================================================================
--- branches/3.1.x/ui/message/src/main/config/component/message.xml 2007-10-30 11:11:48 UTC (rev 3613)
+++ branches/3.1.x/ui/message/src/main/config/component/message.xml 2007-10-30 12:08:30 UTC (rev 3614)
@@ -311,14 +311,6 @@
</property>
<property>
- <name>var</name>
- <classname>java.lang.String</classname>
- <description>
- Name of a request-scope attribute under which the list of the messages should be available
- </description>
- </property>
-
- <property>
<name>layout</name>
<classname>java.lang.String</classname>
<defaultvalue>"list"</defaultvalue>
17 years, 2 months
JBoss Rich Faces SVN: r3613 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-30 07:11:48 -0400 (Tue, 30 Oct 2007)
New Revision: 3613
Modified:
trunk/docs/userguide/en/src/main/docbook/included/modalPanel.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
Log:
http://jira.jboss.com/jira/browse/RF-1122 - substitution the screenshot for new one
Modified: trunk/docs/userguide/en/src/main/docbook/included/modalPanel.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/modalPanel.desc.xml 2007-10-30 11:10:57 UTC (rev 3612)
+++ trunk/docs/userguide/en/src/main/docbook/included/modalPanel.desc.xml 2007-10-30 11:11:48 UTC (rev 3613)
@@ -18,7 +18,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/modalpanel1.gif" />
+ <imagedata fileref="images/mp_1.png" />
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-10-30 11:10:57 UTC (rev 3612)
+++ trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-10-30 11:11:48 UTC (rev 3613)
@@ -165,7 +165,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/modalpanel2.gif"/>
+ <imagedata fileref="images/mp_2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -178,23 +178,23 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:modalPanel id="panel">
+ <rich:modalPanel id="mp">
<f:facet name="header"><h:outputText value="Modal Panel"/></f:facet>
<f:facet name="controls">
- <a href="javascript:Richfaces.hideModalPanel('form:panel')">X</a>
+ <h:graphicImage value="/pages/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" />
</f:facet>
<h:graphicImage value="/pages/california_large.gif"/>
</rich:modalPanel>
]]></programlisting>
- <para>The result displays like this:</para>
+ <para>The result is displayed here:</para>
<figure>
<title>ModalPanel with control element</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/modalpanel3.gif"/>
+ <imagedata fileref="images/mp_3.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -464,7 +464,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/modalpanel4.gif"/>
+ <imagedata fileref="images/mp_4.png"/>
</imageobject>
</mediaobject>
</figure>
17 years, 2 months
JBoss Rich Faces SVN: r3612 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-30 07:10:57 -0400 (Tue, 30 Oct 2007)
New Revision: 3612
Added:
trunk/docs/userguide/en/src/main/resources/images/mp_1.png
trunk/docs/userguide/en/src/main/resources/images/mp_2.png
trunk/docs/userguide/en/src/main/resources/images/mp_3.png
trunk/docs/userguide/en/src/main/resources/images/mp_4.png
Log:
http://jira.jboss.com/jira/browse/RF-1122 - substitution the screenshot for new one
Added: trunk/docs/userguide/en/src/main/resources/images/mp_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/mp_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/mp_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/mp_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/mp_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/mp_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/mp_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/mp_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 2 months
JBoss Rich Faces SVN: r3611 - in trunk/sandbox/ui/orderingList/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-10-30 06:54:19 -0400 (Tue, 30 Oct 2007)
New Revision: 3611
Removed:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
Management of the keyboard is added
Modified: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-10-30 01:07:16 UTC (rev 3610)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-10-30 10:54:19 UTC (rev 3611)
@@ -10,37 +10,19 @@
Shuttle = function(containerId, shuttleItems) {
this.container = document.getElementById(containerId);
- this.shuttleTable = document.getElementById(this.container.id + "table");
- this.shuttleTbody = document.getElementById(this.container.id + "tbody");
- this.shuttle = this.shuttleTbody;
-
this.items = null;
this.selectedItems = new Array();
+ this.shuttleItems = shuttleItems;
-
- this.shuttleItems = new Array();
-
- var rows = this.shuttleTable.rows;
- var shuttle = this;
-
- for (var i = 0; i < rows.length; i++) {
- var row = rows[i];
- this.shuttleItems.push(new SelectItem("", i, "", row.id, false, row));
- row.onclick = function(e) {
- e = (window.event || e);
- shuttle.onclickHandler(e);
- }
- }
-
- //this.shuttleItems = shuttleItems;
-
- //this.shuttle = null;
+ this.shuttle = null;
this.sortOrder = Shuttle.ASC;
- //this.shuttleTable = null;
- //this.shuttleTbody = null;
+ this.shuttleTable = null;
+ this.shuttleTbody = null;
this.activeItem = null;
+
+ this.focusKeeper = document.getElementById("focusKeeper");
}
Shuttle.ASC = "acs";
@@ -69,7 +51,7 @@
Shuttle.prototype.sort = function() {
if (this.sortOrder == Shuttle.ASC) {
- this.shuttleItems.sort(this.compare);
+ this.shuttleItems.sort(this.compareByLabel);
this.sortOrder = Shuttle.DESC;
} else {
this.shuttleItems.reverse();
@@ -81,35 +63,38 @@
Shuttle.prototype.moveSelectedItems = function(action) {
var rows = this.shuttleTbody.rows;
var item;
- this.selectedItems.sort(this.compareByRowIndex);
- if ((action == 'up') && this.getExtremeItem("first").previousSibling) {
- for (var i = 0; i < this.selectedItems.length; i++) {
- item = this.selectedItems[i];
- item.parentNode.insertBefore(item, item.previousSibling);
- }
- } else if ((action == 'down') && this.getExtremeItem("last").nextSibling) {
- for (var i = this.selectedItems.length - 1; i > -1; i--) {
- item = this.selectedItems[i];
- item.parentNode.insertBefore(item.nextSibling, item);
- }
- } else if (action == 'first') {
- var incr = this.selectedItems[0].rowIndex;
- for (var i = 0; i < this.selectedItems.length; i++) {
- item = this.selectedItems[i];
- item.parentNode.insertBefore(item, rows[item.rowIndex - incr]);
- }
- } else if (action == 'last') {
- var length = this.shuttleItems.length;
- var incr = length - this.selectedItems[this.selectedItems.length - 1].rowIndex;
- for (var i = this.selectedItems.length - 1; i > -1; i--) {
- item = this.selectedItems[i];
- if (item.rowIndex + incr > length - 1) {
- item.parentNode.insertBefore(item, null);
- } else {
- item.parentNode.insertBefore(item, rows[item.rowIndex + incr]);
+ if (this.selectedItems.length > 0) {
+ this.selectedItems.sort(this.compareByRowIndex);
+
+ if ((action == 'up') && this.getExtremeItem("first").previousSibling) {
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, item.previousSibling);
}
- }
- }
+ } else if ((action == 'down') && this.getExtremeItem("last").nextSibling) {
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item.nextSibling, item);
+ }
+ } else if (action == 'first') {
+ var incr = this.selectedItems[0].rowIndex;
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, rows[item.rowIndex - incr]);
+ }
+ } else if (action == 'last') {
+ var length = this.shuttleItems.length;
+ var incr = length - this.selectedItems[this.selectedItems.length - 1].rowIndex;
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ if (item.rowIndex + incr > length - 1) {
+ item.parentNode.insertBefore(item, null);
+ } else {
+ item.parentNode.insertBefore(item, rows[item.rowIndex + incr]);
+ }
+ }
+ }
+ }
}
Shuttle.prototype.getExtremeItem = function(position) {
@@ -131,12 +116,7 @@
return extremeItem;
}
-Shuttle.prototype.getLastSelectedItem = function() {
-
-}
-
Shuttle.prototype.onclickHandler = function(event) {
- //this.selectItem(event.srcElement);
var activeElem = event.target || event.srcElement;
if (activeElem == null) {
return;
@@ -158,6 +138,14 @@
this.activeItem = activeElem;
}
+Shuttle.prototype.onkeydownHandler = function(event) {
+ switch (event.keyCode) {
+ case 34 : this.moveSelectedItems('last'); break; //page down
+ case 33: this.moveSelectedItems('first'); break; //page up
+ case 38 : this.moveSelectedItems('up'); break; //up arrow
+ case 40 : this.moveSelectedItems('down'); break; //down arrow
+ }
+}
/**
* Click handler
*/
@@ -173,7 +161,6 @@
this.resetMarked();
markedItem._selected = true;
- //markedShuttleItem.className = Shuttle.ACTIVE_ITEM_CLASS;
this.selectedItems[0] = markedShuttleItem;
}
}
@@ -187,12 +174,10 @@
var markedShuttleItem = activeItem;
if (markedItem._selected) {
- //this.activeItem.className = Shuttle.NORMAL_ITEM_CLASS;
this.selectedItems.remove(markedShuttleItem);
markedItem._selected = false;
} else {
markedItem._selected = true;
- //markedShuttleItem.className = Shuttle.SELECTED_ITEM_CLASS;
this.selectedItems.push(markedShuttleItem);
}
this.activeItem.className = Shuttle.SELECTED_ITEM_CLASS;
@@ -246,10 +231,17 @@
}
Shuttle.prototype.init = function() {
+ this.shuttleTable = document.createElement("table");
+ this.shuttleTbody = document.createElement("tbody");
+ this.shuttle = this.shuttleTbody;
this.addList(this.shuttleItems);
- //this.shuttleTable.appendChild(this.shuttle)
- //this.container.appendChild(this.shuttleTable);
+ this.shuttleTable.appendChild(this.shuttle)
+ this.container.appendChild(this.shuttleTable);
+ var obj = this;
+ this.focusKeeper.onkeydown = function(e) {
+ obj.onkeydownHandler(window.event || e);
+ }
}
Shuttle.prototype.rebuild = function() {
@@ -262,12 +254,11 @@
this.shuttleTable.appendChild(this.shuttle);
this.shuttleTbody = this.shuttleTable.tBodies[0];
}
-//--------------------------------
+
Shuttle.prototype.createShuttleItem = function(selectItem, elemContainer) {
var tr = document.createElement("tr");
elemContainer.appendChild(tr);
tr.id = selectItem._id
- //elemContainer.append('<tr id="').append(selectItem._id).append('" ');
var className = null;
if (selectItem._selected) {
className = Shuttle.SELECTED_ITEM_CLASS;
@@ -276,15 +267,13 @@
} else {
className = Shuttle.NORMAL_ITEM_CLASS;
}
- //elemContainer.append('class="').append(className);
tr.className = className;
+
var obj = this;
tr.onclick = function(e) {
- e = (window.event || e);
- obj.onclickHandler(e);
+ obj.onclickHandler(window.event || e);
}
- //elemContainer.append('" onclick="shuttle.onclickHandler(window.event||event);"');
- //elemContainer.append('>').append('<td>');
+
var td = document.createElement("td");
tr.appendChild(td);
if (td.textContent == undefined) {
@@ -293,25 +282,24 @@
td.textContent = selectItem._label;
}
selectItem._node = tr;
- //elemContainer.append(selectItem._label);
- //elemContainer.append('</td><td width="0">');
- //this.createValueKeeper(selectItem, elemContainer);
- //elemContainer.append('</td></tr>');
}
-Shuttle.prototype.compare = function(obj1, obj2) {
+Shuttle.prototype.compareByLabel = function(obj1, obj2) {
obj1 = obj1._label;
obj2 = obj2._label;
- return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
+ return Shuttle.compare(obj1, obj2);
}
Shuttle.prototype.compareByRowIndex = function(obj1, obj2) {
obj1 = obj1.rowIndex;
obj2 = obj2.rowIndex;
- return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
+ return Shuttle.compare(obj1, obj2);
}
-Shuttle.prototype.createValueKeeper = function(selectItem, elemContainer) {
- elemContainer.append('<input type="hidden" value="')
- .append(selectItem._value).append('"/>');
+Shuttle.compare = function(obj1, obj2) {
+ return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
}
+
+Shuttle.setFocus = function(targetObjectId) {
+ document.getElementById(targetObjectId).focus();
+}
Deleted: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js 2007-10-30 01:07:16 UTC (rev 3610)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js 2007-10-30 10:54:19 UTC (rev 3611)
@@ -1,55 +0,0 @@
-/*
-/* sbuilder.js - Helper class to improve strings concatenation perfomance
- * by Denis Morozov <dmorozov(a)exadel.com> distributed under the BSD license.
- *
- * Usage:
- * var sb = new StringBuilder();
- * sb.append("String 1").append("String 2");
- * sb.append("String 3");
- * var str = sb.toString();
- */
-StringBuilder = function() {
-
- this.length = 0;
-
- this._current = 0;
- this._parts = [];
- this._string = null;
-
- this.initialize();
-}
-
-StringBuilder.prototype.initialize = function(str) {
- this._string = null;
- this._current = 0;
- this._parts = [];
- this.length = 0;
-
- if(str != null)
- this.append(str);
-}
-StringBuilder.prototype.append = function(str) {
- // append argument
- //this.length += (this._parts[this._current++] = String(str)).length;
- this._parts.push(String(str));
-
- // reset cache
- this._string = null;
- return this;
-}
-
-StringBuilder.prototype.toString = function () {
- if (this._string != null)
- return this._string;
-
- var s = this._parts.join("");
- this._parts = [];
- this._current = 1;
- this.length = s.length;
-
- return this._string = s;
-}
-
-StringBuilder.prototype.clean = function(str) {
- this.initialize();
-}
Modified: trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-10-30 01:07:16 UTC (rev 3610)
+++ trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-10-30 10:54:19 UTC (rev 3611)
@@ -7,34 +7,31 @@
xmlns:x=" http://ajax4jsf.org/cdk/x"
baseclass="org.richfaces.renderkit.OrderingListRendererBase"
class="org.richfaces.renderkit.html.OrderingListRenderer"
- component="org.richfaces.component.UIOrderingList"
+ component="org.richfaces.component.UIOrderingList"
>
<h:styles>css/orderingList.xcss</h:styles>
<h:scripts>
- scripts/StringBuilder.js,scripts/SelectItem.js,scripts/OrderingList.js
+ scripts/SelectItem.js,scripts/OrderingList.js
</h:scripts>
<f:clientid var="clientId"/>
- <div id="#{clientId}">
- <table id="#{clientId}table">
- <tbody id="#{clientId}tbody">
- <vcp:body>
- <input type="text" value="dsfdsf" name="asdasdas"/>
- <f:call name="renderChildren" />
- </vcp:body>
- </tbody>
- </table>
+ <div id="#{clientId}" onclick="Shuttle.setFocus('focusKeeper')">
+ <input id="focusKeeper" type="button" value="" style="position: absolute; top: -100; left: -100;" name="focusKeeper"/>
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+
+ <a href="#" onclick="shuttle.sort();">Header</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('up');">up</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('down');">down</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('first');">first</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('last');">last</a>
</div>
- <a href="#" onclick="shuttle.sort();">Header</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('up');">up</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('down');">down</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('first');">first</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('last');">last</a>
<script type="text/javascript">
#{this:initJSShuttleObject(context, component)}
document.body.onselectstart = function() {return false;};
document.body.className = "body";
-
+ document.body.onload = Shuttle.setFocus('focusKeeper');
</script>
</f:root>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3610 - in trunk/extensions/portlet/src/main: java/org/ajax4jsf/portlet/application and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-29 21:07:16 -0400 (Mon, 29 Oct 2007)
New Revision: 3610
Added:
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java
Modified:
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java
trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml
Log:
Continue to implement JSR-301 bridge. Finish requrements from PLT 5.
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -76,11 +76,12 @@
throws BridgeException {
initRequest(request, response, Bridge.PortletPhase.ActionPhase);
FacesContext facesContext = getFacesContext(request, response);
+ PortletViewState windowState = PortletStateHolder.getInstance(facesContext).getWindowState(facesContext);
+ request.setAttribute(Bridge.IS_POSTBACK_ATTRIBUTE, Boolean.valueOf(null != windowState.getViewId()));
try {
execute(facesContext);
facesContext.getApplication().getStateManager().saveSerializedView(facesContext);
- // TODO - save request scope variables and Faces Messages.
- PortletViewState windowState = PortletStateHolder.getInstance(facesContext).getWindowState(facesContext);
+ // save request scope variables and Faces Messages.
windowState.saveMessages(facesContext);
windowState.saveBeans(facesContext);
// saveView(facesContext);
@@ -140,6 +141,7 @@
ajaxContext.getCommonAjaxParameters().put(
AbstractExternalContext.PORTLET_NAME_PARAMETER, getPortletConfig().getPortletName());
PortletViewState windowState = PortletStateHolder.getInstance(facesContext).getWindowState(facesContext);
+ request.setAttribute(Bridge.IS_POSTBACK_ATTRIBUTE, Boolean.valueOf(null != windowState.getViewId()));
windowState.restoreMessages(facesContext);
windowState.restoreBeans(facesContext);
if(null == facesContext.getViewRoot()){
@@ -184,6 +186,7 @@
throw new BridgeDefaultViewNotSpecifiedException();
}
request.setAttribute(Bridge.PORTLET_LIFECYCLE_PHASE, actionPhase);
+ request.setAttribute(AbstractExternalContext.PORTLET_CONFIG_ATTRIBUTE, getPortletConfig());
}
/**
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortalStateManager.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -46,4 +46,6 @@
// Client side view saving is not applicable for portal.
return false;
}
+
+
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -10,10 +10,12 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import javax.faces.render.ResponseStateManager;
/**
* @author asmirnov
@@ -21,43 +23,68 @@
*/
public class PortletViewState implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = 5630637804542426709L;
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5630637804542426709L;
- public static final String SAVED_VIEW_ATTRIBUTE = PortletViewState.class
- .getName();
+ public static final String SAVED_VIEW_ATTRIBUTE = PortletViewState.class
+ .getName();
- private Map messages = new HashMap();
+ private static final Class[] excludedClasses = {
+ javax.portlet.PortletConfig.class,
+ javax.portlet.PortletContext.class,
+ javax.portlet.PortletRequest.class,
+ javax.portlet.PortletResponse.class,
+ javax.portlet.PortletSession.class,
+ javax.portlet.PortletPreferences.class,
+ javax.portlet.PortalContext.class,
+ javax.faces.context.FacesContext.class,
+ javax.faces.context.ExternalContext.class,
+ javax.servlet.ServletConfig.class,
+ javax.servlet.ServletContext.class,
+ javax.servlet.ServletRequest.class,
+ javax.servlet.ServletResponse.class,
+ javax.servlet.http.HttpSession.class };
- private Object treeStructure;
+ private static final String[] excludedRequestAttributes = {
+ "javax.servlet.include", ResponseStateManager.VIEW_STATE_PARAM };
- private Object componentsState;
+ public static final String REQUEST_PARAMETERS_ATTRIBUTE = PortletViewState.class
+ .getName()
+ + "REQUEST_PARAMS";
- private UIViewRoot viewRoot;
-
- private String viewId;
-
- private Map requestScopeBeans;
+ private Map<String, List> messages;
+ private Map<String, Object> beans;
- /**
+ private Object treeStructure;
+
+ private Object componentsState;
+
+ private UIViewRoot viewRoot;
+
+ private String viewId;
+
+ private Map requestScopeBeans;
+
+ private Map<String, String[]> _requestParameters;
+
+ /**
* @return the requestScopeBeans
*/
public Map getRequestScopeBeans() {
return requestScopeBeans;
}
-
/**
- * @param requestScopeBeans the requestScopeBeans to set
+ * @param requestScopeBeans
+ * the requestScopeBeans to set
*/
public void setRequestScopeBeans(Map requestScopeBeans) {
this.requestScopeBeans = requestScopeBeans;
}
-
/**
* @return the viewId
*/
@@ -65,138 +92,171 @@
return viewId;
}
-
/**
- * @param viewId the viewId to set
+ * @param viewId
+ * the viewId to set
*/
public void setViewId(String viewId) {
this.viewId = viewId;
}
-
/**
- * @param facesContext
- */
- public void saveMessages(FacesContext facesContext) {
- Iterator idsWithMessages = facesContext.getClientIdsWithMessages();
- while (idsWithMessages.hasNext()) {
- String id = (String) idsWithMessages.next();
- Iterator messages = facesContext.getMessages(id);
- while (messages.hasNext()) {
- FacesMessage message = (FacesMessage) messages.next();
- addMessage(id, message);
- }
+ * @param facesContext
+ */
+ public void saveMessages(FacesContext facesContext) {
+ messages = new HashMap<String, List>();
+ Iterator idsWithMessages = facesContext.getClientIdsWithMessages();
+ while (idsWithMessages.hasNext()) {
+ String id = (String) idsWithMessages.next();
+ Iterator messages = facesContext.getMessages(id);
+ while (messages.hasNext()) {
+ FacesMessage message = (FacesMessage) messages.next();
+ addMessage(id, message);
+ }
+ }
}
- }
+ /**
+ * @param facesContext
+ */
+ public void restoreMessages(FacesContext facesContext) {
+ if (null != messages) {
+ Iterator<String> idsWithMessages = getClientIdsWithMessages();
+ while (idsWithMessages.hasNext()) {
+ String id = idsWithMessages.next();
+ Iterator messages = getMessages(id);
+ while (messages.hasNext()) {
+ FacesMessage message = (FacesMessage) messages.next();
+ facesContext.addMessage(id, message);
+ }
+ }
- /**
- * @param facesContext
- */
- public void restoreMessages(FacesContext facesContext) {
- Iterator idsWithMessages = getClientIdsWithMessages();
- while (idsWithMessages.hasNext()) {
- String id = (String) idsWithMessages.next();
- Iterator messages = getMessages(id);
- while (messages.hasNext()) {
- FacesMessage message = (FacesMessage) messages.next();
- facesContext.addMessage(id, message);
- }
+ }
}
- }
- /**
- * @return the _messages
- */
- public Map getMessages() {
- return messages;
- }
+ /**
+ * @return the _messages
+ */
+ Map<String, List> getMessages() {
+ return messages;
+ }
- /**
- * @param _messages
- * the _messages to set
- */
- public void setMessages(Map _messages) {
- this.messages = _messages;
- }
+ /**
+ * @param _messages
+ * the _messages to set
+ */
+ private void setMessages(Map<String, List> _messages) {
+ this.messages = _messages;
+ }
- /**
- * @return the _viewRoot
- */
- public UIViewRoot getViewRoot() {
- return viewRoot;
- }
+ /**
+ * @return the _viewRoot
+ */
+ public UIViewRoot getViewRoot() {
+ return viewRoot;
+ }
- /**
- * @param root
- * the _viewRoot to set
- */
- public void setViewRoot(UIViewRoot root) {
- viewRoot = root;
- }
+ /**
+ * @param root
+ * the _viewRoot to set
+ */
+ public void setViewRoot(UIViewRoot root) {
+ viewRoot = root;
+ }
- public void addMessage(String clientId, FacesMessage message) {
- List list = (List) messages.get(clientId);
- if (list == null) {
- list = new ArrayList();
- messages.put(clientId, list);
+ private void addMessage(String clientId, FacesMessage message) {
+ List<FacesMessage> list = messages.get(clientId);
+ if (list == null) {
+ list = new ArrayList<FacesMessage>();
+ messages.put(clientId, list);
+ }
+ list.add(message);
}
- list.add(message);
- }
- public Iterator getClientIdsWithMessages() {
- return (messages.keySet().iterator());
- }
+ private Iterator<String> getClientIdsWithMessages() {
+ return (messages.keySet().iterator());
+ }
- public Iterator getMessages(String clientId) {
- List list = (List) messages.get(clientId);
- if (list != null) {
- return (list.iterator());
- } else {
- return (Collections.EMPTY_LIST.iterator());
+ private Iterator getMessages(String clientId) {
+ List list = messages.get(clientId);
+ if (list != null) {
+ return (list.iterator());
+ } else {
+ return (Collections.EMPTY_LIST.iterator());
+ }
}
- }
- /**
- * @return the componentsState
- */
- public Object getComponentsState() {
- return componentsState;
- }
+ /**
+ * @return the componentsState
+ */
+ public Object getComponentsState() {
+ return componentsState;
+ }
- /**
- * @param componentsState
- * the componentsState to set
- */
- public void setComponentsState(Object componentsState) {
- this.componentsState = componentsState;
- }
+ /**
+ * @param componentsState
+ * the componentsState to set
+ */
+ public void setComponentsState(Object componentsState) {
+ this.componentsState = componentsState;
+ }
- /**
- * @return the treeStructure
- */
- public Object getTreeStructure() {
- return treeStructure;
- }
+ /**
+ * @return the treeStructure
+ */
+ public Object getTreeStructure() {
+ return treeStructure;
+ }
- /**
- * @param treeStructure
- * the treeStructure to set
- */
- public void setTreeStructure(Object treeStructure) {
- this.treeStructure = treeStructure;
- }
+ /**
+ * @param treeStructure
+ * the treeStructure to set
+ */
+ public void setTreeStructure(Object treeStructure) {
+ this.treeStructure = treeStructure;
+ }
-
+ /**
+ * Save request-scope beans, as described in the JSR-301 5.1
+ *
+ * @param facesContext
+ */
public void saveBeans(FacesContext facesContext) {
- // TODO Auto-generated method stub
-
+ beans = null;
+ Map<String, Object> requestMap = facesContext.getExternalContext()
+ .getRequestMap();
+ for (Iterator<Entry<String, Object>> iterator = requestMap.entrySet()
+ .iterator(); iterator.hasNext();) {
+ Entry<String, Object> entry = iterator.next();
+ boolean include = true;
+ for (int i = 0; (i < excludedClasses.length) && include; i++) {
+ if (excludedClasses[i].isInstance(entry.getValue())) {
+ include = false;
+ }
+ }
+ for (int i = 0; (i < excludedRequestAttributes.length) && include; i++) {
+ if (entry.getKey().startsWith(excludedRequestAttributes[i])) {
+ include = false;
+ }
+ }
+ if (include) {
+ if (null == beans) {
+ beans = new HashMap<String, Object>();
+ }
+ beans.put(entry.getKey(), entry.getValue());
+ }
+ }
+ _requestParameters = facesContext.getExternalContext()
+ .getRequestParameterValuesMap();
}
-
public void restoreBeans(FacesContext facesContext) {
- // TODO Auto-generated method stub
-
+ Map<String, Object> requestMap = facesContext.getExternalContext()
+ .getRequestMap();
+ if (null != beans) {
+ requestMap.putAll(beans);
+ }
+ requestMap.put(REQUEST_PARAMETERS_ATTRIBUTE, _requestParameters);
}
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -96,6 +96,7 @@
public static final Object PORTLET_NAME_PARAMETER = "org.ajax4jsf.portlet.NAME";
protected static final String[] EMPTY_STRING_ARRAY = new String[0];
+ public static final String PORTLET_CONFIG_ATTRIBUTE = "org.ajax4jsf.portlet.CONFIG";
// TODO - optimization.
private Map applicationMap;
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/ContextMap.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -28,6 +28,7 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
+import java.util.Map.Entry;
/**
*
@@ -114,10 +115,12 @@
throw new UnsupportedOperationException();
}
- // Unsupported by all Maps.
- public void putAll(Map t) {
- throw new UnsupportedOperationException();
- }
+// public void putAll(Map t) {
+// for (Iterator entries = t.entrySet().iterator(); entries.hasNext();) {
+// Map.Entry entry = (Entry) entries.next();
+// put(entry.getKey(),entry.getValue());
+// }
+// }
// Supported by maps if overridden
public Object remove(Object key) {
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -58,9 +58,13 @@
import javax.faces.context.FacesContext;
import javax.faces.context.FacesContextFactory;
import javax.faces.lifecycle.Lifecycle;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
import javax.portlet.PortletContext;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -68,7 +72,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
/**
*
* @author shura Implementation of <code>FacesContextFactory</code> for
@@ -84,71 +87,85 @@
*
*/
public class FacesContextFactoryImpl extends FacesContextFactory {
- /**
- *
- * Hold <code>FacesContextFactory</code> from default implementation.
- *
- */
-// private FacesContextFactory defaultFacesContextFactory;
+ /**
+ *
+ * Hold <code>FacesContextFactory</code> from default implementation.
+ *
+ */
+ // private FacesContextFactory defaultFacesContextFactory;
+ private static final Log _log = LogFactory
+ .getLog(FacesContextFactoryImpl.class);
- private static final Log _log = LogFactory.getLog(FacesContextFactoryImpl.class);
-
- /**
- *
- * Create instance of Faces context factory, based on implementation.
- *
- * @param defaultFactory -
- *
- * Factory from JSF implementation.
- *
- */
- public FacesContextFactoryImpl(/*FacesContextFactory defaultFactory*/) {
- super();
-// if (this.defaultFacesContextFactory == null) {
-// this.defaultFacesContextFactory = defaultFactory;
-// }
- if(_log.isDebugEnabled()){
- _log.debug("Portal - specific FacesContextFactory has initialised");
+ /**
+ *
+ * Create instance of Faces context factory, based on implementation.
+ *
+ * @param defaultFactory -
+ *
+ * Factory from JSF implementation.
+ *
+ */
+ public FacesContextFactoryImpl(/* FacesContextFactory defaultFactory */) {
+ super();
+ // if (this.defaultFacesContextFactory == null) {
+ // this.defaultFacesContextFactory = defaultFactory;
+ // }
+ if (_log.isDebugEnabled()) {
+ _log.debug("Portal - specific FacesContextFactory has initialised");
+ }
}
- }
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see javax.faces.context.FacesContextFactory#getFacesContext(java.lang.Object,
- *
- * java.lang.Object, java.lang.Object, javax.faces.lifecycle.Lifecycle)
- *
- */
- public FacesContext getFacesContext(Object context, Object request,
- Object response, Lifecycle lifecycle) throws FacesException {
- if ((null == context) || (null == request) || (null == response)
- || (null == lifecycle)) {
- throw new NullPointerException(
- "One or more parameters for a faces context instantiation is null");
- }
- ExternalContext externalContext;
- if ((context instanceof PortletContext)
- && (request instanceof PortletRequest)
- && (response instanceof PortletResponse)) {
- externalContext = new PortletContextImpl((PortletContext)context, (PortletRequest)request, (PortletResponse)response);
- if(_log.isDebugEnabled()){
- _log.debug("Portal request - create portal version of the ExternalContext");
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see javax.faces.context.FacesContextFactory#getFacesContext(java.lang.Object,
+ *
+ * java.lang.Object, java.lang.Object, javax.faces.lifecycle.Lifecycle)
+ *
+ */
+ public FacesContext getFacesContext(Object context, Object request,
+ Object response, Lifecycle lifecycle) throws FacesException {
+ if ((null == context) || (null == request) || (null == response)
+ || (null == lifecycle)) {
+ throw new NullPointerException(
+ "One or more parameters for a faces context instantiation is null");
}
- } else if ((context instanceof ServletContext)
- && (request instanceof HttpServletRequest)
- && (response instanceof HttpServletResponse)) {
- externalContext = new ServletContextImpl((ServletContext)context, (HttpServletRequest)request, (HttpServletResponse)response);
- if(_log.isDebugEnabled()){
- _log.debug("Servlet request - create HttpServlet version of the ExternalContext");
+ ExternalContext externalContext;
+ if ((context instanceof PortletContext)
+ && (request instanceof ActionRequest)
+ && (response instanceof ActionResponse)) {
+ externalContext = new PortletContextImpl((PortletContext) context,
+ (PortletRequest) request, (PortletResponse) response);
+ if (_log.isDebugEnabled()) {
+ _log
+ .debug("Portal request - create portal version of the ExternalContext for action request");
+ }
+ } else if ((context instanceof PortletContext)
+ && (request instanceof RenderRequest)
+ && (response instanceof RenderResponse)) {
+ externalContext = new PortletRenderContextImpl((PortletContext) context,
+ (PortletRequest) request, (PortletResponse) response);
+ if (_log.isDebugEnabled()) {
+ _log
+ .debug("Portal request - create portal version of the ExternalContext for render response");
+ }
+ } else if ((context instanceof ServletContext)
+ && (request instanceof HttpServletRequest)
+ && (response instanceof HttpServletResponse)) {
+ externalContext = new ServletContextImpl((ServletContext) context,
+ (HttpServletRequest) request,
+ (HttpServletResponse) response);
+ if (_log.isDebugEnabled()) {
+ _log
+ .debug("Servlet request - create HttpServlet version of the ExternalContext");
+ }
+ } else {
+ throw new FacesException(
+ "Unsupported environment. Only servlet or portlet is allowed");
}
- } else {
- throw new FacesException(
- "Unsupported environment. Only servlet or portlet is allowed");
+ return new FacesContextImpl(externalContext, lifecycle);
}
- return new FacesContextImpl(externalContext, lifecycle);
- }
}
\ No newline at end of file
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -94,15 +94,15 @@
return null;
}
- private PortletContext getPortletContext() {
+ protected PortletContext getPortletContext() {
return (PortletContext) getContext();
}
- private PortletRequest getPortletRequest() {
+ protected PortletRequest getPortletRequest() {
return (PortletRequest) getRequest();
}
- private PortletResponse getPortletResponse() {
+ protected PortletResponse getPortletResponse() {
return (PortletResponse) getResponse();
}
@@ -115,8 +115,12 @@
if (getResponse() instanceof RenderResponse) {
namespace = ((RenderResponse) getResponse()).getNamespace();
} else {
- throw new IllegalStateException(
- "Portlet namespace not availible in processAction phase");
+ namespace = (String) getRequestParameter(
+ AbstractExternalContext.NAMESPACE_PARAMETER);
+ if(null == namespace){
+ throw new IllegalStateException(
+ "Can not determine portlet namespace");
+ }
}
}
return namespace;
Added: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -0,0 +1,87 @@
+/**
+ *
+ */
+package org.ajax4jsf.portlet.context;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.render.ResponseStateManager;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.faces.Bridge;
+
+import org.ajax4jsf.portlet.application.PortletViewState;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortletRenderContextImpl extends PortletContextImpl {
+
+ private Map<String, String[]> _requestParameters;
+
+ public PortletRenderContextImpl(PortletContext context,
+ PortletRequest request, PortletResponse response) {
+ super(context, request, response);
+ }
+
+ protected Object getRequestParameter(String name) {
+ Object[] values = (Object[]) getRequestParameterValues(name);
+ if (null != values) {
+ return values[0];
+ } else {
+ return null;
+ }
+ }
+
+ protected Enumeration enumerateRequestParameterNames() {
+ Map<String, String[]> requestParameters = getSavedRequestParameters();
+ if (null != requestParameters) {
+ return Collections.enumeration(requestParameters.keySet());
+ } else {
+ return Collections.enumeration(Collections.EMPTY_LIST);
+ }
+ }
+
+ /**
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ private Map<String, String[]> getSavedRequestParameters() {
+ if (null == _requestParameters) {
+ // Get parameters ( all or a View state only ) restored as requered in the JSR 301 PLT 5.1
+ Object preserveRequestAttr = Boolean.FALSE;
+ PortletConfig portletConfig = (PortletConfig) getRequestAttribute(PORTLET_CONFIG_ATTRIBUTE);
+ if (null != portletConfig) {
+ String portletPreserveParamName = Bridge.PORTLET_ATTR_PREFIX
+ + portletConfig.getPortletName()
+ + Bridge.PRESERVE_ACTION_PARAM_ATTR_SUFFIX;
+ preserveRequestAttr = getRequestAttribute(portletPreserveParamName);
+ }
+ Map<String, String[]> parameters = (Map<String, String[]>) getRequestAttribute(PortletViewState.REQUEST_PARAMETERS_ATTRIBUTE);
+ if (Boolean.TRUE.equals(preserveRequestAttr)) {
+ _requestParameters = parameters;
+ } else if (null != parameters){
+ _requestParameters = new HashMap<String, String[]>();
+ _requestParameters.put(ResponseStateManager.VIEW_STATE_PARAM, parameters.get(ResponseStateManager.VIEW_STATE_PARAM));
+ }
+ }
+ return _requestParameters;
+ }
+
+ protected Object getRequestParameterValues(String name) {
+ Map<String, String[]> requestParameters = getSavedRequestParameters();
+ if (null != requestParameters) {
+ return requestParameters.get(name);
+ } else {
+ return null;
+ }
+ }
+
+}
Property changes on: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java (rev 0)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java 2007-10-30 01:07:16 UTC (rev 3610)
@@ -0,0 +1,66 @@
+/**
+ *
+ */
+package org.ajax4jsf.portlet.lifecycle;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.portlet.faces.Bridge;
+
+import org.ajax4jsf.portlet.application.PortletStateHolder;
+import org.ajax4jsf.portlet.application.PortletViewState;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PortalPhaseListener implements PhaseListener {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4023885603543145666L;
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
+ */
+ public void afterPhase(PhaseEvent event) {
+ PhaseId phaseId = event.getPhaseId();
+ FacesContext context = event.getFacesContext();
+ if(phaseId.equals(PhaseId.RESTORE_VIEW)){
+ Object portletPhase = context.getExternalContext().getRequestMap().get(Bridge.PORTLET_LIFECYCLE_PHASE);
+ if(Bridge.PortletPhase.RenderPhase.equals(portletPhase)){
+ context.renderResponse();
+ }
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
+ */
+ public void beforePhase(PhaseEvent event) {
+ PhaseId phaseId = event.getPhaseId();
+ FacesContext context = event.getFacesContext();
+ if(phaseId.equals(PhaseId.RENDER_RESPONSE)){
+ Object portletPhase = context.getExternalContext().getRequestMap().get(Bridge.PORTLET_LIFECYCLE_PHASE);
+ if(null == portletPhase){
+ // save request scope variables and Faces Messages.
+ PortletViewState windowState = PortletStateHolder.getInstance(context).getWindowState(context);
+ windowState.saveMessages(context);
+ windowState.saveBeans(context);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.PhaseListener#getPhaseId()
+ */
+ public PhaseId getPhaseId() {
+ // This listener process all phases.
+ return PhaseId.ANY_PHASE;
+ }
+
+}
Property changes on: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml
===================================================================
--- trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml 2007-10-30 00:59:57 UTC (rev 3609)
+++ trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml 2007-10-30 01:07:16 UTC (rev 3610)
@@ -3,29 +3,35 @@
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
- <application>
-
- </application>
- <factory>
- <faces-context-factory>org.ajax4jsf.portlet.context.FacesContextFactoryImpl</faces-context-factory>
- </factory>
+ <application>
- <managed-bean>
- <managed-bean-name>ajaxContext</managed-bean-name>
- <managed-bean-class>org.ajax4jsf.portlet.PortletAjaxContext</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
+ </application>
+ <factory>
+ <faces-context-factory>
+ org.ajax4jsf.portlet.context.FacesContextFactoryImpl
+ </faces-context-factory>
+ </factory>
+<lifecycle>
+ <phase-listener>org.ajax4jsf.portlet.lifecycle.PortalPhaseListener</phase-listener>
+</lifecycle>
+ <managed-bean>
+ <managed-bean-name>ajaxContext</managed-bean-name>
+ <managed-bean-class>
+ org.ajax4jsf.portlet.PortletAjaxContext
+ </managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
- <render-kit>
-
- <renderer>
- <description>
- override the viewroot
- </description>
- <component-family>javax.faces.ViewRoot</component-family>
- <renderer-type>org.ajax4jsf.portlet.ViewRoot</renderer-type>
- <renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
- </renderer>
- </render-kit>
-
+ <render-kit>
+
+ <renderer>
+ <description>override the viewroot</description>
+ <component-family>javax.faces.ViewRoot</component-family>
+ <renderer-type>org.ajax4jsf.portlet.ViewRoot</renderer-type>
+ <renderer-class>
+ org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer
+ </renderer-class>
+ </renderer>
+ </render-kit>
+
</faces-config>
17 years, 2 months
JBoss Rich Faces SVN: r3609 - in trunk/framework/impl: src/main/javascript/jquery and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-29 20:59:57 -0400 (Mon, 29 Oct 2007)
New Revision: 3609
Added:
trunk/framework/impl/src/main/javascript/jquery/identity.js
Modified:
trunk/framework/impl/generatescript.xml
Log:
identity patch for jQuery added
Modified: trunk/framework/impl/generatescript.xml
===================================================================
--- trunk/framework/impl/generatescript.xml 2007-10-29 23:41:12 UTC (rev 3608)
+++ trunk/framework/impl/generatescript.xml 2007-10-30 00:59:57 UTC (rev 3609)
@@ -50,7 +50,7 @@
-->
<filelist id="jquery"
dir="${basedir}/src/main/javascript/jquery"
- files="jquery-1.2.1.js,noConflict.js">
+ files="jquery-1.2.1.js,noConflict.js,identity.js">
</filelist>
Added: trunk/framework/impl/src/main/javascript/jquery/identity.js
===================================================================
--- trunk/framework/impl/src/main/javascript/jquery/identity.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/jquery/identity.js 2007-10-30 00:59:57 UTC (rev 3609)
@@ -0,0 +1,10 @@
+if (jQuery(jQuery) != jQuery) {
+ var oldJQuery = jQuery;
+ jQuery = function() {
+ if (arguments[0] == arguments.callee) {
+ return arguments.callee;
+ } else {
+ return oldJQuery.apply(this, arguments);
+ }
+ };
+};
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3608 - trunk/samples/jQuery-sample/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-29 19:41:12 -0400 (Mon, 29 Oct 2007)
New Revision: 3608
Modified:
trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-1261
Modified: trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml
===================================================================
--- trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml 2007-10-29 23:41:09 UTC (rev 3607)
+++ trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml 2007-10-29 23:41:12 UTC (rev 3608)
@@ -19,11 +19,12 @@
<h:graphicImage value="http://www.archos.com/img/av_700/picto_game.gif" />
</h:panelGrid>
-
+
<rich:jQuery name="makeFat" timing="onJScall" query="stop().animate({width:param.ewidth})" />
<rich:jQuery name="makeThin" timing="onJScall" query="stop().animate({width:'50px'})" />
<rich:jQuery selector="#menu img" timing="onload" query="mouseover(function(){makeFat(this,{ewidth:'120px'});})" />
<rich:jQuery selector="#menu img" timing="onload" query="mouseout(function(){makeThin(this);})" />
+ <rich:jQuery selector="document.body" timing="onload" query="append('Dynamic text')" />
</h:form>
</body>
17 years, 2 months