JBoss Rich Faces SVN: r3326 - trunk/ui/dataTable/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-11 08:35:21 -0400 (Thu, 11 Oct 2007)
New Revision: 3326
Modified:
trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1091
Modified: trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx
===================================================================
--- trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx 2007-10-11 10:20:30 UTC (rev 3325)
+++ trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx 2007-10-11 12:35:21 UTC (rev 3326)
@@ -13,7 +13,8 @@
component="org.richfaces.component.UIColumn"
>
<f:clientid var="clientId"/>
- <td class="#{this:styleClass(context,component)}"
+ <td id="#{clientId}"
+ class="#{this:styleClass(context,component)}"
x:passThruWithExclusions="value,name,type,id,class"
>
<vcp:body/>
17 years, 2 months
JBoss Rich Faces SVN: r3325 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-11 06:20:30 -0400 (Thu, 11 Oct 2007)
New Revision: 3325
Modified:
trunk/docs/userguide/en/src/main/docbook/included/message.xml
trunk/docs/userguide/en/src/main/docbook/included/messages.xml
trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
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/panelMenuGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml
trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml
trunk/docs/userguide/en/src/main/docbook/included/tab.xml
trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml
trunk/docs/userguide/en/src/main/docbook/included/toolBarGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
trunk/docs/userguide/en/src/main/docbook/included/virtualEarth.xml
Log:
http://jira.jboss.com/jira/browse/RF-771?watch=false - Correcting Definition custom styles classes
Modified: trunk/docs/userguide/en/src/main/docbook/included/message.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/message.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/message.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -183,14 +183,14 @@
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:message></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:message></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:message></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/messages.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/messages.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/messages.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -178,14 +178,14 @@
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:messages></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:messages></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:messages></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -505,14 +505,14 @@
</tbody>
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:modalPanel></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:modalPanel></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:modalPanel></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panel.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/panel.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -297,18 +297,17 @@
</tbody>
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:panel></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:panel></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:panel></property>
- </emphasis>attributes.</para>
-
+ </emphasis>attribute.</para>
<para>CSS code piece used on a page:</para>
<para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -164,14 +164,14 @@
</tbody>
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <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 the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:panelBar></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:panelBar></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelBarItem.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelBarItem.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelBarItem.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -212,18 +212,17 @@
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <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
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:panelBarItem></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </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>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -386,7 +386,7 @@
<para>On the screenshot, there are classes names defining specified elements.</para>
<table>
- <title>Component skin class</title>
+ <title>Classes names that define an upper level nodes</title>
<tgroup cols="2">
<thead>
@@ -425,25 +425,56 @@
</tbody>
</tgroup>
</table>
+
+ <table>
+ <title>Classes names that define a second level nodes</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-pmenu-group-div</entry>
+
+ <entry>Defines panel menu group common styleClass. It's used in the outside
+ <div> element</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-group</entry>
+
+ <entry>Defines panel menu group wrapper table element</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-group-self-icon</entry>
+
+ <entry>Defines panel menu group icon element</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-group-self-label</entry>
+
+ <entry>Defines panel menu group label element</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <para>This classes set is related to upper level of nodes. For all nodes starting with the
- second level there are similar classes:</para>
-
- <itemizedlist>
- <listitem>rich-pmenu-group-div</listitem>
- <listitem>rich-pmenu-group</listitem>
- <listitem>rich-pmenu-group-self-icon</listitem>
- <listitem>rich-pmenu-group-self-label</listitem>
- </itemizedlist>
-
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:panelMenuGroup></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:panelMenuGroup></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:panelMenuGroup></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -344,7 +344,7 @@
<para>On the screenshot, there are classes names defining specified elements.</para>
<table>
- <title>Component skin class</title>
+ <title>Classes names that define first level items</title>
<tgroup cols="2">
<thead>
@@ -357,44 +357,70 @@
<tbody>
<row>
- <entry>rich-pmenu-item</entry>
+ <entry>rich-pmenu-top-item</entry>
- <entry>Defines panel menu item common styleClass</entry>
+ <entry>Defines top panel menu item common styleClass</entry>
</row>
<row>
- <entry>rich-pmenu-item-icon</entry>
+ <entry>rich-pmenu-top-item-icon</entry>
- <entry>Defines panel menu item icon</entry>
+ <entry>Defines top panel menu item icon</entry>
</row>
<row>
- <entry>rich-pmenu-item-label</entry>
+ <entry>rich-pmenu-top-item-label</entry>
- <entry>Defines panel menu item label element</entry>
+ <entry>Defines top panel menu item label element</entry>
</row>
</tbody>
</tgroup>
</table>
- <para>This classes set is related to the second and all other lower levels of items. For all
- items starting from the first level there are similar classes:</para>
+ <table>
+ <title>Classes names that define second and lower levels items</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-pmenu-item</entry>
+
+ <entry>Defines panel menu item common styleClass</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-item-icon</entry>
+
+ <entry>Defines panel menu item icon</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-item-label</entry>
+
+ <entry>Defines panel menu item label element</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
- <itemizedlist>
- <listitem>rich-pmenu-top-item</listitem>
- <listitem>rich-pmenu-top-item-icon</listitem>
- <listitem>rich-pmenu-top-item-label</listitem>
- </itemizedlist>
-
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:panelMenuItem></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:panelMenuItem></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:panelMenuItem></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -449,14 +449,14 @@
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:scrollableDataTable></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:scrollableDataTable></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:scrollableDataTable></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -259,18 +259,8 @@
</tbody>
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
- <property><rich:simpleTogglePanel></property>
- </emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+
- <para>To change the style of particular <emphasis role="bold">
- <property><rich:simpleTogglePanel></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
- role="bold">
- <property><rich:simpleTogglePanel></property>
- </emphasis>attributes.</para>
-
<table>
<title>Style component classes</title>
<tgroup cols="2">
@@ -299,6 +289,18 @@
</tbody>
</tgroup>
</table>
+
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:simpleTogglePanel></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:simpleTogglePanel></property>
+ </emphasis> components, define your own style classes in the corresponding <emphasis
+ role="bold">
+ <property><rich:simpleTogglePanel></property>
+ </emphasis>attributes.</para>
</section>
<section>
<title>Relevant Resources Links</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -460,14 +460,14 @@
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:suggestionBox></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:suggestionBox></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:suggestionBox></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/tab.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tab.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/tab.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -175,16 +175,16 @@
<section>
<title>Definition of Custom Style Classes</title>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:tab></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:tab></property>
</emphasis> components define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:tab></property>
- </emphasis>attributes.</para>
+ </emphasis>attribute.</para>
</section>
</section>
\ No newline at end of file
Modified: trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -241,14 +241,14 @@
</tbody>
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:tabPanel></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:tabPanel></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style classes in the corresponding <emphasis
role="bold">
<property><rich:tabPanel></property>
</emphasis>attributes.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -140,15 +140,32 @@
</section>
<section>
<title>Definition of Custom Style Classes</title>
+ <table>
+ <title>Classes names that define a toolBar</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-toolbar-exterior</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
<para>On generating, the component substitutes the default class rich-toolbar-exterior into <emphasis>
<property>style class</property>
</emphasis> of a generated component.</para>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:toolBar></property>
</emphasis> components on a page using CSS, it's enough to create class with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:toolBar></property>
</emphasis> components define your own style classes in the corresponding <emphasis
role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/included/toolBarGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/toolBarGroup.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/toolBarGroup.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -163,15 +163,32 @@
</section>
<section>
<title>Definition of Custom Style Classes</title>
+ <table>
+ <title>Classes names that define a toolBar</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-toolbar-interior</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
<para>On generating, the component substitutes the default class rich-toolbar-interior into
<emphasis
><property>style class</property></emphasis> of a generated component.</para>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:toolBarGroup></property>
</emphasis> components on a page using CSS, it's enough to create class with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:toolBarGroup></property>
</emphasis> components define your own style classes in the corresponding <emphasis
role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -238,21 +238,38 @@
<section>
<title>Definition of Custom Style Classes</title>
- <para>
- The<emphasis role="bold"><property><rich:tooltip></property></emphasis> provides one class "rich-tool-tip" which applies to a wrapper element <emphasis><property>"span"</property></emphasis> or <emphasis><property>"div"</property></emphasis>
- dependently to <emphasis role="bold"><property><rich:tooltip></property></emphasis> layout.
- </para>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <table>
+ <title>Classes names that define a tooltip</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-tool-tip</entry>
+ <entry>Defines styles for a wrapper "span" or <div> element of a tooltip</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ It depends on <emphasis role="bold"><property><rich:tooltip></property></emphasis> layout what a wrapper element <emphasis><property>"span"</property></emphasis> or <emphasis><property>"div"</property></emphasis>to choose.
+ </para>
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:tooltip></property>
</emphasis> components on a page using CSS, it's enough to create class with the
- same names and define the necessary properties in them.</para>
+ same name and define necessary properties in it.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:tooltip></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components define your own style class in the corresponding <emphasis
role="bold">
<property><rich:tooltip></property>
- </emphasis>attributes.</para>
+ </emphasis>attributes</para>
</section>
<section>
<title>Relevant Resources Links</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -290,24 +290,35 @@
</section>
<section>
<title>Definition of Custom Style Classes</title>
- <para>The <emphasis
- role="bold">
+ <table>
+ <title>Classes names that define a tree</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-tree</entry>
+ <entry>Defines styles for a wrapper "span" or <div> element of a tree</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:tree></property>
- </emphasis> also has only one predefined Style Class responsible for
- displaying a wrapper element of the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis>component.</para>
- <para>In order to redefine the style for all <emphasis role="bold">
- <property><rich:tree></property>
</emphasis> components on a page using CSS, it's enough to create class with the
- same names and define the necessary properties in them.</para>
+ same names and define necessary properties in them.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:tree></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components define your own style class in the corresponding <emphasis
role="bold">
<property><rich:tree></property>
- </emphasis>attributes.</para>
+ </emphasis>attribute.</para>
</section>
<section>
<title>Relevant Resources Links</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/virtualEarth.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/virtualEarth.xml 2007-10-11 09:04:24 UTC (rev 3324)
+++ trunk/docs/userguide/en/src/main/docbook/included/virtualEarth.xml 2007-10-11 10:20:30 UTC (rev 3325)
@@ -156,14 +156,14 @@
</tgroup>
</table>
- <para>In order to redefine the style for all <emphasis role="bold">
+ <para>In order to redefine styles for all <emphasis role="bold">
<property><rich:virtualEarth></property>
</emphasis> components on a page using CSS, it's enough to create class with the
- same name and define the necessary properties in it.</para>
+ same name and define necessary properties in it.</para>
- <para>To change the style of particular <emphasis role="bold">
+ <para>To change styles of particular <emphasis role="bold">
<property><rich:virtualEarth></property>
- </emphasis> components define your own style classes in the corresponding <emphasis
+ </emphasis> components, define your own style class in the corresponding <emphasis
role="bold">
<property><rich:virtualEarth></property>
</emphasis>attribute.</para>
17 years, 2 months
JBoss Rich Faces SVN: r3324 - trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-10-11 05:04:24 -0400 (Thu, 11 Oct 2007)
New Revision: 3324
Modified:
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java
Log:
Fixed build
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java 2007-10-11 00:32:56 UTC (rev 3323)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java 2007-10-11 09:04:24 UTC (rev 3324)
@@ -90,8 +90,8 @@
if(null != binding){
binding.setValue(elContext, component);
}
- for (Iterator<UIComponent> iterator = component.getFacetsAndChildren(); iterator.hasNext();) {
- UIComponent child = iterator.next();
+ for (Iterator iterator = component.getFacetsAndChildren(); iterator.hasNext();) {
+ UIComponent child = (UIComponent) iterator.next();
processBindings(elContext, child);
}
}
17 years, 2 months
JBoss Rich Faces SVN: r3323 - in trunk: extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-10 20:32:56 -0400 (Wed, 10 Oct 2007)
New Revision: 3323
Modified:
trunk/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java
Log:
fix http://jira.jboss.org/jira/browse/RF-1095
Continue to work on portal support
Modified: trunk/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml
===================================================================
--- trunk/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml 2007-10-10 21:34:49 UTC (rev 3322)
+++ trunk/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml 2007-10-11 00:32:56 UTC (rev 3323)
@@ -1,33 +1,47 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>${groupId}</groupId>
- <artifactId>${artifactId}</artifactId>
- <name>${artifactId}</name>
- <version>${version}</version>
- <build>
- <plugins>
- <plugin>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-cdk-plugin</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <configuration>
- <library>
- <prefix>${groupId}</prefix>
- <taglib>
- <shortName>${artifactId}</shortName>
- </taglib>
- </library>
- </configuration>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <name>${artifactId}</name>
+ <version>${version}</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ <configuration>
+ <library>
+ <prefix>${groupId}</prefix>
+ <taglib>
+ <shortName>${artifactId}</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java 2007-10-10 21:34:49 UTC (rev 3322)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java 2007-10-11 00:32:56 UTC (rev 3323)
@@ -3,16 +3,29 @@
*/
package org.ajax4jsf.portlet.lifecycle;
+import java.util.Iterator;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
import javax.faces.lifecycle.Lifecycle;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
* @author asmirnov
*
*/
public class RestoreViewPhase extends LifecyclePhase {
+ private static final Log _log = LogFactory.getLog(RestoreViewPhase.class);
+
private final LifecyclePhase nextPhase;
/**
@@ -34,10 +47,55 @@
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executePhase(javax.faces.context.FacesContext)
*/
protected void executePhase(FacesContext context) {
+ // Check pre-created ViewRoot.
+ UIViewRoot viewRoot = context.getViewRoot();
+ ELContext elContext = context.getELContext();
+ if(null != viewRoot){
+ if(_log.isDebugEnabled()){
+ _log.debug("Found created UIViewRoot in facesContext");
+ }
+ viewRoot.setLocale(context.getExternalContext().getRequestLocale());
+ processBindings(elContext,viewRoot);
+ } else {
+ // Restore or Create new view.
+ String viewId = calculateViewId(context);
+ ViewHandler viewHandler = context.getApplication().getViewHandler();
+ if(isFacesRequest(context)){
+ viewRoot = viewHandler.restoreView(context, viewId);
+ if(null != viewRoot){
+ processBindings(elContext, viewRoot);
+ }
+ } else {
+ viewRoot = viewHandler.createView(context, viewId);
+ }
+ context.setViewRoot(viewRoot);
+ }
+ }
+
+ private boolean isFacesRequest(FacesContext context) {
// TODO Auto-generated method stub
+ return false;
+ }
+ private String calculateViewId(FacesContext context) {
+ String viewId = context.getExternalContext().getRequestPathInfo();
+ if(null == viewId){
+ viewId = context.getExternalContext().getRequestServletPath();
+ }
+ return viewId;
}
+ private void processBindings(ELContext elContext, UIComponent component) {
+ ValueExpression binding = component.getValueExpression("binding");
+ if(null != binding){
+ binding.setValue(elContext, component);
+ }
+ for (Iterator<UIComponent> iterator = component.getFacetsAndChildren(); iterator.hasNext();) {
+ UIComponent child = iterator.next();
+ processBindings(elContext, child);
+ }
+ }
+
/* (non-Javadoc)
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#getPhaseId()
*/
17 years, 2 months
JBoss Rich Faces SVN: r3322 - trunk/ui.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-10-10 17:34:49 -0400 (Wed, 10 Oct 2007)
New Revision: 3322
Modified:
trunk/ui/pom.xml
Log:
jQuery has been included into build
Modified: trunk/ui/pom.xml
===================================================================
--- trunk/ui/pom.xml 2007-10-10 18:16:22 UTC (rev 3321)
+++ trunk/ui/pom.xml 2007-10-10 21:34:49 UTC (rev 3322)
@@ -64,6 +64,7 @@
<module>panelbar</module>
<module>dataFilterSlider</module>
<module>gmap</module>
+ <module>jQuery</module>
<module>virtualEarth</module>
<module>separator</module>
<module>spacer</module>
17 years, 2 months
JBoss Rich Faces SVN: r3321 - in trunk/docs: highlight and 13 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-10-10 14:16:22 -0400 (Wed, 10 Oct 2007)
New Revision: 3321
Added:
trunk/docs/highlight/
trunk/docs/highlight/pom.xml
trunk/docs/highlight/src/
trunk/docs/highlight/src/main/
trunk/docs/highlight/src/main/java/
trunk/docs/highlight/src/main/java/org/
trunk/docs/highlight/src/main/java/org/richfaces/
trunk/docs/highlight/src/main/java/org/richfaces/highlight/
trunk/docs/highlight/src/main/java/org/richfaces/highlight/CssXhtmlRenderer.java
trunk/docs/highlight/src/main/java/org/richfaces/highlight/IStyleConstantsCSS.java
trunk/docs/highlight/src/main/java/org/richfaces/highlight/XhtmlRendererFactory.java
trunk/docs/highlight/src/main/resources/
trunk/docs/highlight/src/main/resources/org/
trunk/docs/highlight/src/main/resources/org/richfaces/
trunk/docs/highlight/src/main/resources/org/richfaces/highlight/
trunk/docs/highlight/src/main/resources/org/richfaces/highlight/renderers.properties
Modified:
trunk/docs/pom.xml
trunk/docs/userguide/en/src/main/resources/css/html.css
trunk/docs/xslt/en/pom.xml
trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl
Log:
http://jira.jboss.com/jira/browse/RF-747
Property changes on: trunk/docs/highlight
___________________________________________________________________
Name: svn:ignore
+ target
.classpath
.project
.settings
Added: trunk/docs/highlight/pom.xml
===================================================================
--- trunk/docs/highlight/pom.xml (rev 0)
+++ trunk/docs/highlight/pom.xml 2007-10-10 18:16:22 UTC (rev 3321)
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>docs</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.docs</groupId>
+ <artifactId>highlight</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ <name>RichFaces Code Highlighting</name>
+
+
+ <dependencies>
+<!-- <dependency>
+ <groupId>org.apache</groupId>
+ <artifactId>xerces</artifactId>
+ <version>2.8.0-v200702082200</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>bundle</artifactId>
+ <groupId>system</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency> -->
+ <dependency>
+ <groupId>org.eclipse.wst.sse</groupId>
+ <artifactId>core</artifactId>
+ <version>1.1.201-v200703241528</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>xerces</artifactId>
+ <groupId>org.apache</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>bundle</artifactId>
+ <groupId>system</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>core</artifactId>
+ <groupId>org.eclipse.wst.xml</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>runtime</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>resources</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>filebuffers</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>text</artifactId>
+ <groupId>org.eclipse</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>commands</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>common</artifactId>
+ <groupId>org.eclipse.emf</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>icu</artifactId>
+ <groupId>com.ibm</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.wst.css</groupId>
+ <artifactId>core</artifactId>
+ <version>1.1.101-v200704012321</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>xerces</artifactId>
+ <groupId>org.apache</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>bundle</artifactId>
+ <groupId>system</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>core</artifactId>
+ <groupId>org.eclipse.wst.xml</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>runtime</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>resources</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>filebuffers</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>text</artifactId>
+ <groupId>org.eclipse</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>commands</artifactId>
+ <groupId>org.eclipse.core</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>common</artifactId>
+ <groupId>org.eclipse.emf</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>icu</artifactId>
+ <groupId>com.ibm</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.uwyn</groupId>
+ <artifactId>jhighlight</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
+
Added: trunk/docs/highlight/src/main/java/org/richfaces/highlight/CssXhtmlRenderer.java
===================================================================
--- trunk/docs/highlight/src/main/java/org/richfaces/highlight/CssXhtmlRenderer.java (rev 0)
+++ trunk/docs/highlight/src/main/java/org/richfaces/highlight/CssXhtmlRenderer.java 2007-10-10 18:16:22 UTC (rev 3321)
@@ -0,0 +1,372 @@
+package org.richfaces.highlight;
+import java.awt.Color;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringReader;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Formattable;
+import java.util.Formatter;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.wst.css.core.internal.parser.CSSTokenizer;
+import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
+
+import com.uwyn.jhighlight.highlighter.ExplicitStateHighlighter;
+import com.uwyn.jhighlight.renderer.XhtmlRenderer;
+import com.uwyn.jhighlight.tools.StringUtils;
+
+
+public class CssXhtmlRenderer extends XhtmlRenderer {
+
+ static class WrapperBean<T> {
+ private T wrapped;
+
+ public WrapperBean(T wrapped) {
+ this.wrapped = wrapped;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return ((WrapperBean<?>)obj).get() == wrapped;
+ }
+
+ public T get() {
+ return wrapped;
+ }
+
+ @Override
+ public int hashCode() {
+ return wrapped.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return super.toString();
+ }
+ }
+
+ class FormattableToken implements Formattable {
+ private String token;
+
+ public FormattableToken(String token) {
+ this.token = token;
+ }
+
+ public void formatTo(Formatter formatter, int flags, int width,
+ int precision) {
+ try {
+ formatter.out().append(getClassForToken(token));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ class XHTMLString implements Formattable {
+ private String text;
+
+ public XHTMLString(String text) {
+ this.text = text;
+ }
+
+ public void formatTo(Formatter formatter, int flags, int width,
+ int precision) {
+ String s =
+ StringUtils.replace(StringUtils.encodeHtml(text), " ", " ")
+ .replaceAll("\\r?\\n", "<br />\n");
+ try {
+ formatter.out().append(s);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ class FormattableColor implements Formattable {
+ private Color color;
+
+ public FormattableColor(Color color) {
+ this.color = color;
+ }
+
+ public void formatTo(Formatter formatter, int flags, int width,
+ int precision) {
+ try {
+ formatter.out().append("#").append(
+ Integer.toHexString(color.getRGB()).substring(2)
+ .toUpperCase());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private static final Map<String, Color> fContextToStyleMap = new HashMap<String, Color>();
+
+ private static final String classTemplate = ".css_%s";
+ private static final String colorTemplate = "color:%s;";
+ private static final String tokenTemplate = "<span class=\"css_%s\">%s</span>";
+
+ private static final Map<String, String> tokenClasses = new HashMap<String, String>();
+
+ private Map<String, String> defaultCss = null;
+
+ static {
+ //eclipse source code copied
+ fContextToStyleMap.put(CSSRegionContexts.CSS_COMMENT, IStyleConstantsCSS.COMMENT);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_CDO, IStyleConstantsCSS.COMMENT);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_CDC, IStyleConstantsCSS.COMMENT);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_S, IStyleConstantsCSS.NORMAL);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_LBRACE, IStyleConstantsCSS.CURLY_BRACE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_RBRACE, IStyleConstantsCSS.CURLY_BRACE);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_IMPORT, IStyleConstantsCSS.ATMARK_RULE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_PAGE, IStyleConstantsCSS.ATMARK_RULE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_MEDIA, IStyleConstantsCSS.ATMARK_RULE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_FONT_FACE, IStyleConstantsCSS.ATMARK_RULE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_CHARSET, IStyleConstantsCSS.ATMARK_RULE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_ATKEYWORD, IStyleConstantsCSS.ATMARK_RULE);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_STRING, IStyleConstantsCSS.STRING);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_URI, IStyleConstantsCSS.URI);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_MEDIUM, IStyleConstantsCSS.MEDIA);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_MEDIA_SEPARATOR, IStyleConstantsCSS.MEDIA);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_CHARSET_NAME, IStyleConstantsCSS.STRING);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_PAGE_SELECTOR, IStyleConstantsCSS.MEDIA);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_UNIVERSAL, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_PSEUDO, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_CLASS, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ID, IStyleConstantsCSS.SELECTOR);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_COMBINATOR, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_SEPARATOR, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE, IStyleConstantsCSS.SELECTOR);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR, IStyleConstantsCSS.SELECTOR);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_PROPERTY, IStyleConstantsCSS.PROPERTY_NAME);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_STRING, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_URI, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_HASH, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_S, IStyleConstantsCSS.PROPERTY_VALUE);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_SEPARATOR, IStyleConstantsCSS.COLON);
+ fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
+
+ fContextToStyleMap.put(CSSRegionContexts.CSS_UNKNOWN, IStyleConstantsCSS.ERROR);
+ }
+
+ public static void main(String[] args) throws Exception {
+ //new CssXhtmlRenderer().generateCSSTemplate(new File("D:\\eclipse\\rf\\rf3\\docs\\userguide\\en\\src\\main\\resources\\css\\css.css"));
+ //new CssXhtmlRenderer().generateClassesForTokens();
+
+ //System.exit(0);
+
+ String path = "D:\\eclipse\\rf\\rf3\\samples\\richfaces-demo\\src\\main\\webapp\\css\\common.css";
+
+ if (args.length > 0) {
+ path = args[0];
+ }
+
+ FileReader fileReader = new FileReader(path);
+
+
+ try {
+
+ new CssXhtmlRenderer().highlight("aaaa", new FileInputStream(path), new FileOutputStream("css.html"), null, false);
+
+ } finally {
+ fileReader.close();
+ }
+ }
+
+
+ private void generateClassesForTokens() {
+ Map<WrapperBean<Color>, String> fieldMap = new HashMap<WrapperBean<Color>, String>();
+
+ try {
+ Field[] fields = IStyleConstantsCSS.class.getFields();
+ for (int i = 0; i < fields.length; i++) {
+ Field field = fields[i];
+ int modifiers = field.getModifiers();
+
+ if (Modifier.isFinal(modifiers) && Modifier.isStatic(modifiers)) {
+ String name = field.getName().toLowerCase();
+ Object object = field.get(null);
+ if (object instanceof Color) {
+ fieldMap.put(new WrapperBean<Color>((Color) object), name);
+ }
+
+
+ }
+ }
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ Iterator<Entry<String, Color>> iterator = fContextToStyleMap.entrySet().iterator();
+ while(iterator.hasNext()) {
+ Entry<String, Color> entry = iterator.next();
+ String token = entry.getKey();
+ Color color = entry.getValue();
+ WrapperBean<Color> bean = new WrapperBean<Color>(color);
+
+ String string = fieldMap.get(bean);
+ tokenClasses.put(token, string);
+
+ }
+
+
+ }
+
+ public Map<String, String> generateCSSTemplate() {
+ Map<String, String> m = new HashMap<String, String>();
+ Field[] fields = IStyleConstantsCSS.class.getFields();
+ for (int i = 0; i < fields.length; i++) {
+ Field field = fields[i];
+ int modifiers = field.getModifiers();
+
+ if (Modifier.isFinal(modifiers) && Modifier.isStatic(modifiers)) {
+ String name = field.getName().toLowerCase();
+ try {
+ Object object = field.get(null);
+ if (object instanceof Color) {
+ FormattableColor color = new FormattableColor((Color) object);
+ m.put(String.format(classTemplate, name), String.format(colorTemplate, color));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return m;
+ }
+
+
+
+ public String getClassForToken(String token) {
+ synchronized (tokenClasses) {
+ if (tokenClasses.isEmpty()) {
+ generateClassesForTokens();
+ }
+ }
+
+ return tokenClasses.get(token);
+ }
+
+ protected String getCssClass(int arg0) {
+ return null;
+ }
+
+ @Override
+ protected synchronized Map<String,String> getDefaultCssStyles() {
+
+ if (defaultCss == null) {
+ defaultCss = generateCSSTemplate();
+ }
+ return defaultCss;
+ }
+
+ protected ExplicitStateHighlighter getHighlighter() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see com.uwyn.jhighlight.renderer.XhtmlRenderer#highlight(java.lang.String, java.io.InputStream, java.io.OutputStream, java.lang.String, boolean)
+ */
+ public void highlight(String name, InputStream in, OutputStream out,
+ String encoding, boolean fragment) throws IOException {
+
+ InputStreamReader reader = encoding == null ?
+ new InputStreamReader(in) :
+ new InputStreamReader(in, encoding);
+
+ StringBuffer b = new StringBuffer();
+ char [] buffer = new char[1024];
+ int read;
+
+ while((read = reader.read(buffer)) != -1) {
+ b.append(buffer, 0, read);
+ }
+
+ highlight(name, b.toString(), out, encoding, fragment);
+ }
+
+ private void highlight(String name, String in, OutputStream output,
+ String encoding, boolean fragment) throws IOException{
+
+ String string = StringUtils.convertTabsToSpaces(in, 4);
+ PrintWriter out = new PrintWriter(output);
+
+ if (fragment)
+ {
+ out.write(getXhtmlHeaderFragment(name));
+ }
+ else
+ {
+ out.write(getXhtmlHeader(name));
+ }
+
+ CSSTokenizer tokenizer = new CSSTokenizer(new StringReader(string));
+ while (!tokenizer.isEOF()) {
+ String token = tokenizer.primGetNextToken();
+ if (token != null) {
+ String text = tokenizer.yytext();
+ out.printf(tokenTemplate, new FormattableToken(token), new XHTMLString(text));
+ } else {
+ if (tokenizer.yylength() > 0) {
+ throw new IllegalStateException();
+ }
+ }
+ }
+ if (!fragment) {
+ out.write(getXhtmlFooter());
+ }
+
+ out.flush();
+ out.close();
+ }
+
+ public String highlight(String name, String in, String encoding,
+ boolean fragment) throws IOException {
+
+ ByteArrayOutputStream s = new ByteArrayOutputStream();
+ highlight(name, in, s, encoding, fragment);
+
+ s.flush();
+ s.close();
+
+ return (encoding == null) ? s.toString() : s.toString(encoding);
+ }
+
+}
+
Added: trunk/docs/highlight/src/main/java/org/richfaces/highlight/IStyleConstantsCSS.java
===================================================================
--- trunk/docs/highlight/src/main/java/org/richfaces/highlight/IStyleConstantsCSS.java (rev 0)
+++ trunk/docs/highlight/src/main/java/org/richfaces/highlight/IStyleConstantsCSS.java 2007-10-10 18:16:22 UTC (rev 3321)
@@ -0,0 +1,22 @@
+package org.richfaces.highlight;
+import java.awt.Color;
+
+
+//eclipse source code copied
+public interface IStyleConstantsCSS {
+
+ Color COMMENT = new Color(63, 95, 191);
+ Color NORMAL = new Color(0);
+ Color SEMI_COLON = new Color(0);;
+ Color CURLY_BRACE = new Color(0);;
+ Color ATMARK_RULE = new Color(63, 127, 127);
+ Color SELECTOR = new Color(63, 127, 127);
+ Color MEDIA = new Color(42, 0, 255);
+ Color STRING = new Color(42, 0, 255);
+ Color URI = new Color(42, 0, 255);
+ Color PROPERTY_VALUE = new Color(42, 0, 255);
+ Color COLON = new Color(0);;
+ Color ERROR = new Color(191, 63, 63);
+ Color PROPERTY_NAME = new Color(127, 0, 127);
+
+}
Added: trunk/docs/highlight/src/main/java/org/richfaces/highlight/XhtmlRendererFactory.java
===================================================================
--- trunk/docs/highlight/src/main/java/org/richfaces/highlight/XhtmlRendererFactory.java (rev 0)
+++ trunk/docs/highlight/src/main/java/org/richfaces/highlight/XhtmlRendererFactory.java 2007-10-10 18:16:22 UTC (rev 3321)
@@ -0,0 +1,118 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.highlight;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import com.uwyn.jhighlight.renderer.Renderer;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class XhtmlRendererFactory {
+
+ private static XhtmlRendererFactory instance;
+ public static final String fileName = "renderers.properties";
+ private Map<Object, Object> classNames = new HashMap<Object, Object>();
+
+ public static final XhtmlRendererFactory instance() {
+ synchronized(XhtmlRendererFactory.class) {
+ if (instance == null) {
+ instance = new XhtmlRendererFactory();
+ }
+ }
+
+ return instance;
+ }
+
+ public XhtmlRendererFactory() {
+ InputStream resourceAsStream =
+ getClass().getResourceAsStream(fileName);
+ try {
+ Properties props = new Properties();
+ props.load(resourceAsStream);
+ classNames.putAll(props);
+ resourceAsStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public Renderer getRenderer(String type) {
+
+ Renderer renderer =
+ com.uwyn.jhighlight.renderer.XhtmlRendererFactory.getRenderer(type);
+ if (renderer == null) {
+ Object object = classNames.get(type.toLowerCase());
+ if (object != null) {
+ String className = object.toString();
+
+ try {
+ Class<?> class1 = Class.forName(className);
+ Object newInstance = class1.newInstance();
+ if (newInstance instanceof Renderer) {
+ return (Renderer) newInstance;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return renderer;
+ }
+
+ public static void main(String[] args) {
+ Renderer renderer =
+ XhtmlRendererFactory.instance().getRenderer("css");
+ String path = "D:\\eclipse\\rf\\rf3\\samples\\richfaces-demo\\src\\main\\webapp\\css\\common.css";
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ try {
+ renderer.highlight("css", new FileInputStream(path),bos, null, true);
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ renderer = XhtmlRendererFactory.instance().getRenderer("xhtml");
+ try {
+ renderer.highlight("bbb", new ByteArrayInputStream(bos.toByteArray()), System.out, null, false);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+}
Added: trunk/docs/highlight/src/main/resources/org/richfaces/highlight/renderers.properties
===================================================================
--- trunk/docs/highlight/src/main/resources/org/richfaces/highlight/renderers.properties (rev 0)
+++ trunk/docs/highlight/src/main/resources/org/richfaces/highlight/renderers.properties 2007-10-10 18:16:22 UTC (rev 3321)
@@ -0,0 +1 @@
+css=org.richfaces.highlight.CssXhtmlRenderer
Modified: trunk/docs/pom.xml
===================================================================
--- trunk/docs/pom.xml 2007-10-10 16:28:00 UTC (rev 3320)
+++ trunk/docs/pom.xml 2007-10-10 18:16:22 UTC (rev 3321)
@@ -39,6 +39,10 @@
<url>http://maven.exadel.com/</url>
<layout>default</layout>
</repository>
+ <repository>
+ <id>eclipse</id>
+ <url>http://repo1.maven.org/eclipse/</url>
+ </repository>
</repositories>
<pluginRepositories>
<pluginRepository>
@@ -77,6 +81,7 @@
<modules>
+ <module>highlight</module>
<module>xslt</module>
<!--
<module>docbook</module>
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2007-10-10 16:28:00 UTC (rev 3320)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2007-10-10 18:16:22 UTC (rev 3321)
@@ -347,3 +347,42 @@
cursor: pointer;
}
+.css_comment {
+color:#3F5FBF;
+}
+.css_normal {
+color:#000000;
+}
+.css_semi_colon {
+color:#000000;
+}
+.css_curly_brace {
+color:#000000;
+}
+.css_atmark_rule {
+color:#3F7F7F;
+}
+.css_selector {
+color:#3F7F7F;
+}
+.css_media {
+color:#2A00FF;
+}
+.css_string {
+color:#2A00FF;
+}
+.css_uri {
+color:#2A00FF;
+}
+.css_property_value {
+color:#2A00FF;
+}
+.css_colon {
+color:#000000;
+}
+.css_error {
+color:#BF3F3F;
+}
+.css_property_name {
+color:#7F007F;
+}
Modified: trunk/docs/xslt/en/pom.xml
===================================================================
--- trunk/docs/xslt/en/pom.xml 2007-10-10 16:28:00 UTC (rev 3320)
+++ trunk/docs/xslt/en/pom.xml 2007-10-10 18:16:22 UTC (rev 3321)
@@ -12,7 +12,14 @@
<name>Documentation stylesheets (English translation)</name>
<description>
Docbook documentation stylesheets for En-Us translation
- </description>
+ </description>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.docs</groupId>
+ <artifactId>highlight</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
<build>
<resources>
<resource>
Modified: trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl 2007-10-10 16:28:00 UTC (rev 3320)
+++ trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl 2007-10-10 18:16:22 UTC (rev 3321)
@@ -8,9 +8,10 @@
version="1.0"
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default"
+ xmlns:rf="java:org.richfaces.highlight.XhtmlRendererFactory"
>
- <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']">
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']|programlisting[@role='CSS']">
<xsl:variable name="role">
<xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
@@ -18,8 +19,8 @@
<xsl:variable name="child.content">
<xsl:apply-templates/>
</xsl:variable>
-
- <xsl:variable name="hiliter" select="jhl:getRenderer(string($role))" xmlns:jhl="java:com.uwyn.jhighlight.renderer.XhtmlRendererFactory"/>
+ <xsl:variable name="factory" select="rf:instance()"/>
+ <xsl:variable name="hiliter" select="rf:getRenderer($factory, string($role))"/>
<pre class="{$role}">
<xsl:choose>
<xsl:when test="$hiliter">
17 years, 2 months
JBoss Rich Faces SVN: r3320 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-10-10 12:28:00 -0400 (Wed, 10 Oct 2007)
New Revision: 3320
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
http://jira.jboss.com/jira/browse/RF-968 - improved description.
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-10-10 16:17:57 UTC (rev 3319)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-10-10 16:28:00 UTC (rev 3320)
@@ -98,28 +98,26 @@
</mediaobject>
</figure>
<para>Usage <emphasis>
- <property>"currentDate"</property>
- </emphasis> attribute isn't available in the popup
- mode.</para>
+ <property>"currentDate"</property>
+ </emphasis> attribute isn't available in the popup mode.</para>
<para>The <emphasis role="bold">
<property><rich:calendar></property>
- </emphasis> component ables to render pages of days in two modes. Switching mode
- could be defined with the <emphasis>
+ </emphasis> component ables to render pages of days in two modes. Switching mode could be
+ defined with the <emphasis>
<property>"mode"</property>
- </emphasis> attribute with two possible parameters: Ajax and Client. Default value is set to
- "Client".</para>
+ </emphasis> attribute with two possible parameters: ajax and client. Default value is set to
+ the "client".</para>
<itemizedlist>
<listitem>
<para>Ajax</para>
</listitem>
</itemizedlist>
- <para>Calendar requests portions of data from Data Model for a page rendering. If
- <emphasis>
+ <para>Calendar requests portions of data from Data Model for a page rendering. If <emphasis>
<property>"dataModel"</property>
- </emphasis> attribute has <property>"null"</property> value, data requests are
- not sent. In this case the "Ajax" mode is equal to the
- "Client" mode. </para>
+ </emphasis> attribute has <property>"null"</property> value, data requests
+ are not sent. In this case the "ajax" mode is equal to the
+ "client". </para>
<itemizedlist>
<listitem>
@@ -127,9 +125,18 @@
</listitem>
</itemizedlist>
- <para>Calendar loads an initial portion of data in a specified range and use this data to
- render months. Additional data requests are not sent.</para>
+ <para>Calendar loads an initial portion of data in a specified range and use this data to render
+ months. Additional data requests are not sent.</para>
+ <note>
+ <title>Note:</title><emphasis>
+ <property>"preloadDateRangeBegin"</property>
+ </emphasis> and
+ <emphasis>
+ <property>"preloadDateRangeEnd"</property>
+ </emphasis> attributes was designed only for the
+ <property>"client"</property> mode to load some data initially.</note>
+
<para>There are three button-related attributes:</para>
<itemizedlist>
<listitem>
17 years, 2 months
JBoss Rich Faces SVN: r3318 - trunk/test-applications/facelets/src/main/java/calendar.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-10-10 12:13:22 -0400 (Wed, 10 Oct 2007)
New Revision: 3318
Modified:
trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
Log:
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-10 16:11:56 UTC (rev 3317)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-10 16:13:22 UTC (rev 3318)
@@ -98,4 +98,9 @@
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
+
+ public int getDay() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
}
17 years, 2 months
JBoss Rich Faces SVN: r3317 - trunk/test-applications/facelets/src/main/java/calendar.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-10-10 12:11:56 -0400 (Wed, 10 Oct 2007)
New Revision: 3317
Modified:
trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
Log:
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-10 16:09:37 UTC (rev 3316)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-10 16:11:56 UTC (rev 3317)
@@ -35,6 +35,7 @@
private Object toolTip;
private boolean enabled = true;
+
/* (non-Javadoc)
* @see org.richfaces.component.CalendarDataModelItem#getData()
*/
@@ -97,12 +98,4 @@
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
-
- /* (non-Javadoc)
- * @see org.richfaces.model.CalendarDataModelItem#getDay()
- */
- public int getDay() {
- // TODO Auto-generated method stub
- return 0;
- }
}
17 years, 2 months
JBoss Rich Faces SVN: r3316 - trunk/test-applications/facelets/src/main/java/calendar.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-10-10 12:09:37 -0400 (Wed, 10 Oct 2007)
New Revision: 3316
Modified:
trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java
trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java
Log:
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-10-10 16:09:21 UTC (rev 3315)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-10-10 16:09:37 UTC (rev 3316)
@@ -28,8 +28,8 @@
import java.util.Locale;
import java.util.StringTokenizer;
import java.util.TimeZone;
+
import javax.faces.event.ValueChangeEvent;
-import javax.faces.webapp.UIComponentTag;
import org.richfaces.event.CurrentDateChangeEvent;
@@ -72,7 +72,6 @@
private String toolTipMode;
private String label;
private String timeZone;
- private String mode;
private int zindex;
private int counter;
@@ -120,13 +119,6 @@
this.pattern = pattern;
}
- public void selectPattern(ValueChangeEvent event) {
- String tPatern = (String) event.getNewValue();
- if (tPatern != null) {
- pattern = tPatern;
- }
- }
-
public CalendarBean() {
height = "400px";
width = "400px";
@@ -149,14 +141,12 @@
required = false;
weekDay = "long";
month = "none";
- mode = "client";
timeZone = "Eastern European Time";
preloadDateRangeBegin = "10.08.2007"; //d.m.y
preloadDateRangeEnd = "11.10.2007";
}
public Date getPrDateRangeBegin() {
- if("ajax".equals(mode)) return null;
Calendar cal = Calendar.getInstance();
StringTokenizer st = new StringTokenizer(preloadDateRangeBegin,".");
ArrayList<Integer> date = new ArrayList<Integer>();
@@ -169,7 +159,6 @@
}
public Date getPrDateRangeEnd() {
- if("ajax".equals(mode)) return null;
Calendar cal = Calendar.getInstance();
StringTokenizer st = new StringTokenizer(preloadDateRangeEnd, ".");
ArrayList<Integer> date = new ArrayList<Integer>();
@@ -205,15 +194,6 @@
this.readonly = readonly;
}
- public void selectLocale(ValueChangeEvent event) {
- String tLocale = (String) event.getNewValue();
- if (tLocale != null) {
- String lang = tLocale.substring(0, 2);
- String country = tLocale.substring(3);
- locale = new Locale(lang, country, "");
- }
- }
-
public Object getWeekDayLabels() {
if(weekDay.equals("long"))
return CalendarBean.WEEK_DAY;
@@ -281,9 +261,6 @@
this.jointPoint = jointPoint;
}
- public void selectJointPoint(ValueChangeEvent event) {
- jointPoint = (String) event.getNewValue();
- }
public String getDirection() {
return direction;
@@ -293,10 +270,6 @@
this.direction = direction;
}
- public void selectDirection(ValueChangeEvent event) {
- direction = (String) event.getNewValue();
- }
-
public String getBoundary() {
return boundary;
}
@@ -432,14 +405,6 @@
this.preloadDateRangeEnd = preloadDateRangeEnd;
}
- public String getMode() {
- return mode;
- }
-
- public void setMode(String mode) {
- this.mode = mode;
- }
-
public String getWeekDay() {
return weekDay;
}
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-10 16:09:21 UTC (rev 3315)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-10 16:09:37 UTC (rev 3316)
@@ -22,10 +22,12 @@
package calendar;
import java.text.DateFormat;
+import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Random;
import org.richfaces.model.CalendarDataModel;
import org.richfaces.model.CalendarDataModelItem;
@@ -62,8 +64,20 @@
data.put("enLabel", enFormatter.format(date));
data.put("frLabel", frFormatter.format(date));
data.put("deLabel", deFormatter.format(date));
+ /*Calendar c = Calendar.getInstance();
+ c.setTime(date);
+ item.setDay(c.get(Calendar.DAY_OF_MONTH));*/
+
+ if (new Random().nextInt(10) > 5) {
+ item.setEnabled(true);
+ } else {
+ item.setEnabled(false);
+ }
+
item.setData(data);
-
+
+ System.out.println(item.getData() + " " + item.isEnabled());
+
return item;
}
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java 2007-10-10 16:09:21 UTC (rev 3315)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java 2007-10-10 16:09:37 UTC (rev 3316)
@@ -1,3 +1,6 @@
+/**
+ *
+ */
package calendar;
import java.util.Calendar;
17 years, 2 months