JBoss Rich Faces SVN: r3294 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-10-08 11:16:04 -0400 (Mon, 08 Oct 2007)
New Revision: 3294
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-08 12:47:14 UTC (rev 3293)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-10-08 15:16:04 UTC (rev 3294)
@@ -93,17 +93,50 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/calendar.png" />
+ <imagedata fileref="images/calendar.png"/>
</imageobject>
</mediaobject>
</figure>
+ <para>Usage <emphasis>
+ <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>
+ <property>"mode"</property>
+ </emphasis> attribute with two possible parameters: Ajax and Client. Default value is set to
+ "Client".</para>
+ <itemizedlist>
+ <listitem>
+ <para>Ajax</para>
+ </listitem>
+ </itemizedlist>
+
+ <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>
+
+ <itemizedlist>
+ <listitem>
+ <para>Client</para>
+ </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>There are three button-related attributes:</para>
<itemizedlist>
<listitem>
<para><emphasis>
<property>"buttonLabel"</property>
- </emphasis> defines a label for the button. If the attribute is set "buttonIcon" and "buttonIconDisabled" are ignored
- </para>
+ </emphasis> defines a label for the button. If the attribute is set "buttonIcon" and
+ "buttonIconDisabled" are ignored </para>
</listitem>
</itemizedlist>
<itemizedlist>
@@ -225,8 +258,8 @@
<para>The <emphasis role="bold">
<property><rich:calendar></property>
- </emphasis> component provides the possibility to use a special data model to define data for
- element rendering. Data model includes two major interfaces: </para>
+ </emphasis> component provides the possibility to use a special Data Model to define data for
+ element rendering. Data Model includes two major interfaces: </para>
<itemizedlist>
<listitem>CalendarDataModel</listitem>
@@ -402,389 +435,389 @@
<section>
<title>Look-and-Feel Customization</title>
-
+
<para>For skinnability implementation, the components use a <emphasis>
- <property>style class redefinition method.</property>
- </emphasis>
- Default style classes are mapped on <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
<property>skin parameters.</property>
</emphasis></para>
-
+
<para>There are two ways to redefine the appearance of all <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> components at once:</para>
-
+ <property><rich:calendar></property>
+ </emphasis> components at once:</para>
+
<itemizedlist>
<listitem>
<para>Redefine the corresponding skin parameters</para>
</listitem>
-
+
<listitem>
<para>Add to your style sheets <emphasis>
- <property>style classes</property>
- </emphasis> used by a <emphasis role="bold">
- <property><rich:calendar></property>
- </emphasis> component</para>
+ <property>style classes</property>
+ </emphasis> used by a <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component</para>
</listitem>
</itemizedlist>
</section>
-
+
<section>
<title>Skin Parameters Redefinition</title>
-
+
<table>
<title>Skin parameters redefinition for a popup element</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-color</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Skin parameters redefinition for headers (header, optional header)</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-bottom-color</entry>
</row>
-
+
<row>
<entry>additionalBackgroundColor</entry>
-
+
<entry>background-color</entry>
</row>
-
+
<row>
<entry>generalSizeFont</entry>
-
+
<entry>font-size</entry>
</row>
-
+
<row>
<entry>generalFamilyFont</entry>
-
+
<entry>font-family</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
- <title>Skin parameters redefinition for footers (footer, optional footer) and names of working days</title>
-
+ <title>Skin parameters redefinition for footers (footer, optional footer) and names of working
+ days</title>
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-top-color</entry>
</row>
-
+
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-right-color</entry>
</row>
-
+
<row>
<entry>additionalBackgroundColor</entry>
-
+
<entry>background</entry>
</row>
-
+
<row>
<entry>generalSizeFont</entry>
-
+
<entry>font-size</entry>
</row>
-
+
<row>
<entry>generalFamilyFont</entry>
-
+
<entry>font-family</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Skin parameters redefinition for weeks numbers</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-bottom-color</entry>
</row>
-
+
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-right-color</entry>
</row>
-
+
<row>
<entry>additionalBackgroundColor</entry>
-
+
<entry>background</entry>
</row>
-
+
<row>
<entry>calendarWeekBackgroundColor</entry>
-
+
<entry>background-color</entry>
</row>
-
+
<row>
<entry>generalSizeFont</entry>
-
+
<entry>font-size</entry>
</row>
-
+
<row>
<entry>generalFamilyFont</entry>
-
+
<entry>font-family</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Skin parameters redefinition for a toolbar and names of months</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>headerBackgroundColor</entry>
-
+
<entry>background-color</entry>
</row>
-
+
<row>
<entry>headerSizeFont</entry>
-
+
<entry>font-size</entry>
</row>
-
+
<row>
<entry>headerFamilyFont</entry>
-
+
<entry>font-family</entry>
</row>
-
+
<row>
<entry>headerWeightFont</entry>
-
+
<entry>font-weight</entry>
</row>
-
+
<row>
<entry>headerTextColor</entry>
-
+
<entry>color</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Skin parameters redefinition for cells with days</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-bottom-color</entry>
</row>
-
+
<row>
<entry>panelBorderColor</entry>
-
+
<entry>border-right-color</entry>
</row>
-
+
<row>
<entry>generalBackgroundColor</entry>
-
+
<entry>background-color</entry>
</row>
-
+
<row>
<entry>generalSizeFont</entry>
-
+
<entry>font-size</entry>
</row>
-
+
<row>
<entry>generalFamilyFont</entry>
-
+
<entry>font-family</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Skin parameters redefinition for holiday</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>calendarHolidaysBackgroundColor</entry>
-
+
<entry>background-color</entry>
</row>
-
+
<row>
<entry>calendarHolidaysTextColor</entry>
-
+
<entry>color</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Skin parameters redefinition for cell with a current date</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>calendarCurrentBackgroundColor</entry>
-
+
<entry>background-color</entry>
</row>
-
+
<row>
<entry>calendarCurrentTextColor</entry>
-
+
<entry>color</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<table>
<title>Skin parameters redefinition for a selected day</title>
-
+
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
+
<entry>CSS properties</entry>
</row>
</thead>
-
+
<tbody>
<row>
<entry>headerBackgroundColor</entry>
-
+
<entry>background-color</entry>
</row>
-
+
<row>
<entry>headerTextColor</entry>
-
+
<entry>color</entry>
</row>
-
+
<row>
<entry>headerWeightFont</entry>
-
+
<entry>font-weight</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
</section>
-
+
<section>
<title>Definition of Custom Style Classes</title>
@@ -860,10 +893,10 @@
<entry>Defines styles for weeks numbers</entry>
</row>
-
+
<row>
<entry>rich-calendar-today</entry>
-
+
<entry>Defines styles for cell with a current date</entry>
</row>
@@ -914,16 +947,16 @@
<entry>Defines styles for a popup element</entry>
</row>
-
+
<row>
<entry>rich-calendar-tool</entry>
-
+
<entry>Defines styles for toolbars</entry>
</row>
-
+
<row>
<entry>rich-calendar-month</entry>
-
+
<entry>Defines styles for names of months</entry>
</row>
@@ -989,8 +1022,9 @@
<section>
<title>Relevant Resources Links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar"
- >Here</ulink> you can see the example of <emphasis role="bold"
- ><property><rich:calendar></property></emphasis> usage and sources for the given example. </para>
+ >Here</ulink> you can see the example of <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> usage and sources for the given example. </para>
<para>How to use JavaScript API see on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#..."
>RichFaces Users Forum</ulink>.</para>
17 years, 2 months
JBoss Rich Faces SVN: r3293 - in trunk/samples: datascroller-sample/src/main/webapp/WEB-INF and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-08 08:47:14 -0400 (Mon, 08 Oct 2007)
New Revision: 3293
Modified:
trunk/samples/dataTableDemo/src/main/webapp/WEB-INF/web.xml
trunk/samples/datascroller-sample/src/main/webapp/WEB-INF/web.xml
trunk/samples/panel-sample/src/main/webapp/WEB-INF/web.xml
trunk/samples/separator-sample/src/main/webapp/WEB-INF/web.xml
trunk/samples/tabPanelDemo/src/main/webapp/WEB-INF/web.xml
trunk/samples/toolBarDemo/src/main/webapp/WEB-INF/web.xml
Log:
Add org.ajax4jsf.COMPRESS_SCRIPT parameter to web.xml files in samples.
Modified: trunk/samples/dataTableDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/dataTableDemo/src/main/webapp/WEB-INF/web.xml 2007-10-08 11:01:11 UTC (rev 3292)
+++ trunk/samples/dataTableDemo/src/main/webapp/WEB-INF/web.xml 2007-10-08 12:47:14 UTC (rev 3293)
@@ -14,6 +14,10 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/samples/datascroller-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/datascroller-sample/src/main/webapp/WEB-INF/web.xml 2007-10-08 11:01:11 UTC (rev 3292)
+++ trunk/samples/datascroller-sample/src/main/webapp/WEB-INF/web.xml 2007-10-08 12:47:14 UTC (rev 3293)
@@ -14,6 +14,10 @@
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/samples/panel-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/panel-sample/src/main/webapp/WEB-INF/web.xml 2007-10-08 11:01:11 UTC (rev 3292)
+++ trunk/samples/panel-sample/src/main/webapp/WEB-INF/web.xml 2007-10-08 12:47:14 UTC (rev 3293)
@@ -39,6 +39,10 @@
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/samples/separator-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/separator-sample/src/main/webapp/WEB-INF/web.xml 2007-10-08 11:01:11 UTC (rev 3292)
+++ trunk/samples/separator-sample/src/main/webapp/WEB-INF/web.xml 2007-10-08 12:47:14 UTC (rev 3293)
@@ -14,6 +14,10 @@
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/samples/tabPanelDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/tabPanelDemo/src/main/webapp/WEB-INF/web.xml 2007-10-08 11:01:11 UTC (rev 3292)
+++ trunk/samples/tabPanelDemo/src/main/webapp/WEB-INF/web.xml 2007-10-08 12:47:14 UTC (rev 3293)
@@ -14,6 +14,10 @@
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/samples/toolBarDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/toolBarDemo/src/main/webapp/WEB-INF/web.xml 2007-10-08 11:01:11 UTC (rev 3292)
+++ trunk/samples/toolBarDemo/src/main/webapp/WEB-INF/web.xml 2007-10-08 12:47:14 UTC (rev 3293)
@@ -14,6 +14,10 @@
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
17 years, 2 months
JBoss Rich Faces SVN: r3292 - in trunk/test-applications: facelets/src/main/java/calendar and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-10-08 07:01:11 -0400 (Mon, 08 Oct 2007)
New Revision: 3292
Modified:
trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java
trunk/test-applications/pom.xml
Log:
Fixed test apps
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 11:01:03 UTC (rev 3291)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 11:01:11 UTC (rev 3292)
@@ -98,4 +98,11 @@
this.enabled = enabled;
}
+ /* (non-Javadoc)
+ * @see org.richfaces.model.CalendarDataModelItem#getDay()
+ */
+ public int getDay() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
}
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 11:01:03 UTC (rev 3291)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 11:01:11 UTC (rev 3292)
@@ -98,4 +98,9 @@
this.enabled = enabled;
}
+ public int getDay() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
}
Modified: trunk/test-applications/pom.xml
===================================================================
--- trunk/test-applications/pom.xml 2007-10-08 11:01:03 UTC (rev 3291)
+++ trunk/test-applications/pom.xml 2007-10-08 11:01:11 UTC (rev 3292)
@@ -54,7 +54,20 @@
<module>jsp</module>
<module>facelets</module>
</modules>
-
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<dependency>
<artifactId>richfaces-ui</artifactId>
17 years, 2 months
JBoss Rich Faces SVN: r3291 - in branches/3.1.x/test-applications: facelets/src/main/java/calendar and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-10-08 07:01:03 -0400 (Mon, 08 Oct 2007)
New Revision: 3291
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java
branches/3.1.x/test-applications/pom.xml
Log:
Fixed test apps
Modified: branches/3.1.x/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 10:12:13 UTC (rev 3290)
+++ branches/3.1.x/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 11:01:03 UTC (rev 3291)
@@ -97,5 +97,10 @@
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
+
+ public int getDay() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
}
Modified: branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-08 10:12:13 UTC (rev 3290)
+++ branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-08 11:01:03 UTC (rev 3291)
@@ -76,5 +76,9 @@
// TODO Auto-generated method stub
return null;
}
+ public int getDay() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
}
Modified: branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 10:12:13 UTC (rev 3290)
+++ branches/3.1.x/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-08 11:01:03 UTC (rev 3291)
@@ -114,5 +114,9 @@
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
+ public int getDay() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
}
Modified: branches/3.1.x/test-applications/pom.xml
===================================================================
--- branches/3.1.x/test-applications/pom.xml 2007-10-08 10:12:13 UTC (rev 3290)
+++ branches/3.1.x/test-applications/pom.xml 2007-10-08 11:01:03 UTC (rev 3291)
@@ -55,6 +55,19 @@
<module>facelets</module>
</modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<dependency>
<artifactId>richfaces-ui</artifactId>
17 years, 2 months
JBoss Rich Faces SVN: r3290 - trunk/ui/calendar/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-10-08 06:12:13 -0400 (Mon, 08 Oct 2007)
New Revision: 3290
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
Log:
RF-1073
Modified: trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-10-05 23:30:08 UTC (rev 3289)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-10-08 10:12:13 UTC (rev 3290)
@@ -53,6 +53,9 @@
import org.richfaces.model.CalendarDataModelItem;
import org.richfaces.renderkit.CalendarRendererBase;
+import java.text.DateFormat;
+
+
// import org.richfaces.renderkit.html.BaseGradient.Data;
/**
@@ -191,16 +194,30 @@
super.validateValue(context, newValue);
}
- public void updateCurrentDate(FacesContext context, Date currentDate) {
+ public void updateCurrentDate(FacesContext context, Object currentDate) {
if (context == null) {
throw new NullPointerException();
}
+ //RF-1073
try {
ValueBinding vb = getValueBinding("currentDate");
if (vb != null) {
- vb.setValue(context, currentDate);
- return;
+ if(vb.getType(context).equals(String.class)){
+ DateTimeConverter convert = new DateTimeConverter();
+ convert.setLocale(getLocale());
+ convert.setPattern(getDatePattern());
+ vb.setValue(context,convert.getAsString(context, this, currentDate));
+ return;
+ }else if(vb.getType(context).equals(Calendar.class)){
+ Calendar c = Calendar.getInstance();
+ c.setTime((Date) currentDate);
+ vb.setValue(context, c);
+ return;
+ }else{
+ vb.setValue(context, currentDate);
+ return;
+ }
} else {
setCurrentDate(currentDate);
}
17 years, 2 months
JBoss Rich Faces SVN: r3289 - in trunk: framework/impl/src/main/java/org/ajax4jsf/resource and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-05 19:30:08 -0400 (Fri, 05 Oct 2007)
New Revision: 3289
Modified:
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ApplyValuesPhase.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/InvokeApplicationPhase.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/LifecyclePhase.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ProcessValidatorsPhase.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RenderResponsePhase.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/UpdateModelPhase.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
trunk/samples/seamIntegration/pom.xml
trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java
Log:
intermediate commit for a portal brige
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ApplyValuesPhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ApplyValuesPhase.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ApplyValuesPhase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -5,7 +5,6 @@
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
/**
@@ -27,9 +26,8 @@
/* (non-Javadoc)
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executeNextPhase(javax.faces.context.FacesContext, javax.faces.event.PhaseListener[])
*/
- protected void executeNextPhase(FacesContext context,
- PhaseListener[] listeners) {
- nextPhase.execute(context, listeners);
+ protected void executeNextPhase(FacesContext context) {
+ nextPhase.execute(context);
}
/* (non-Javadoc)
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/InvokeApplicationPhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/InvokeApplicationPhase.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/InvokeApplicationPhase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -5,7 +5,6 @@
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
/**
@@ -24,8 +23,7 @@
/* (non-Javadoc)
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executeNextPhase(javax.faces.context.FacesContext, javax.faces.event.PhaseListener[])
*/
- protected void executeNextPhase(FacesContext context,
- PhaseListener[] listeners) {
+ protected void executeNextPhase(FacesContext context) {
// do nothing.
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/LifecyclePhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/LifecyclePhase.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/LifecyclePhase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -33,11 +33,11 @@
/**
* Execute phase methods with
* @param context
- * @param listeners
*/
- public void execute(FacesContext context,PhaseListener[] listeners){
+ public void execute(FacesContext context){
int listenerToCall = 0;
- PhaseEvent event = new PhaseEvent(context,getPhaseId(),_lifecycle);
+ PhaseEvent event = new PhaseEvent(context,getPhaseId(),getLifecycle());
+ PhaseListener[] listeners = getLifecycle().getPhaseListeners();
// Execute listeners before phase.
try {
for(;listenerToCall<listeners.length;listenerToCall++){
@@ -71,16 +71,14 @@
}
if(!context.getRenderResponse() && !context.getResponseComplete()){
- executeNextPhase(context,listeners);
+ executeNextPhase(context);
}
}
/**
* @param context
- * @param listeners
*/
- protected abstract void executeNextPhase(FacesContext context,
- PhaseListener[] listeners);
+ protected abstract void executeNextPhase(FacesContext context);
/**
@@ -99,4 +97,12 @@
return 0 == getPhaseId().compareTo(phaseId) || 0 == PhaseId.ANY_PHASE.compareTo(phaseId);
}
+
+ /**
+ * @return the lifecycle
+ */
+ public Lifecycle getLifecycle() {
+ return _lifecycle;
+ }
+
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -79,7 +79,7 @@
* @see javax.faces.lifecycle.Lifecycle#execute(javax.faces.context.FacesContext)
*/
public void execute(FacesContext context) throws FacesException {
- executePhase.execute(context, getPhaseListeners());
+ executePhase.execute(context);
}
/**
@@ -88,7 +88,7 @@
* @see javax.faces.lifecycle.Lifecycle#render(javax.faces.context.FacesContext)
*/
public void render(FacesContext context) throws FacesException {
- renderPhase.execute(context, getPhaseListeners());
+ renderPhase.execute(context);
}
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ProcessValidatorsPhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ProcessValidatorsPhase.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/ProcessValidatorsPhase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -5,7 +5,6 @@
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
/**
@@ -27,9 +26,8 @@
/* (non-Javadoc)
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executeNextPhase(javax.faces.context.FacesContext, javax.faces.event.PhaseListener[])
*/
- protected void executeNextPhase(FacesContext context,
- PhaseListener[] listeners) {
- nextPhase.execute(context, listeners);
+ protected void executeNextPhase(FacesContext context) {
+ nextPhase.execute(context);
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RenderResponsePhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RenderResponsePhase.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RenderResponsePhase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -8,7 +8,6 @@
import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
/**
@@ -27,8 +26,7 @@
/* (non-Javadoc)
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executeNextPhase(javax.faces.context.FacesContext, javax.faces.event.PhaseListener[])
*/
- protected void executeNextPhase(FacesContext context,
- PhaseListener[] listeners) {
+ protected void executeNextPhase(FacesContext context) {
// do nothing.
}
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-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/RestoreViewPhase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -5,7 +5,6 @@
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
/**
@@ -27,9 +26,8 @@
/* (non-Javadoc)
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executeNextPhase(javax.faces.context.FacesContext, javax.faces.event.PhaseListener[])
*/
- protected void executeNextPhase(FacesContext context,
- PhaseListener[] listeners) {
- nextPhase.execute(context, listeners);
+ protected void executeNextPhase(FacesContext context) {
+ nextPhase.execute(context);
}
/* (non-Javadoc)
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/UpdateModelPhase.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/UpdateModelPhase.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/UpdateModelPhase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -5,7 +5,6 @@
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
/**
@@ -26,9 +25,8 @@
/* (non-Javadoc)
* @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executeNextPhase(javax.faces.context.FacesContext, javax.faces.event.PhaseListener[])
*/
- protected void executeNextPhase(FacesContext context,
- PhaseListener[] listeners) {
- nextPhase.execute(context, listeners);
+ protected void executeNextPhase(FacesContext context) {
+ nextPhase.execute(context);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -167,7 +167,7 @@
* @see org.ajax4jsf.chameleon.resource.InternetResource#getContentType()
*/
public String getContentType(ResourceContext resourceContext) {
- return getRenderer(null).getContentType();
+ return getRenderer(resourceContext).getContentType();
}
/**
@@ -230,7 +230,7 @@
* @return - any {@link java.io.Serializable} object, or null.
*/
protected Object getDataToStore(FacesContext context, Object data) {
- return getRenderer(null).getData(this, context, data);
+ return getRenderer(new FacesResourceContext(context)).getData(this, context, data);
}
/**
@@ -307,7 +307,7 @@
if (log.isDebugEnabled()) {
log.debug(Messages.getMessage(Messages.ENCODE_HTML_INFO, getKey()));
}
- getRenderer(null).encode(this, context, data);
+ getRenderer(new FacesResourceContext(context)).encode(this, context, data);
}
/*
@@ -322,8 +322,8 @@
log.debug(Messages.getMessage(Messages.ENCODE_HTML_INFO_2,
getKey(), attributes));
}
- getRenderer(null).encodeBegin(this, context, data, attributes);
- getRenderer(null).encodeEnd(this, context, data);
+ getRenderer(new FacesResourceContext(context)).encodeBegin(this, context, data, attributes);
+ getRenderer(new FacesResourceContext(context)).encodeEnd(this, context, data);
}
@@ -339,7 +339,7 @@
log.debug(Messages.getMessage(Messages.ENCODE_BEGIN_HTML_INFO,
getKey(), attrs));
}
- getRenderer(null).encodeBegin(this, context, component, attrs);
+ getRenderer(new FacesResourceContext(context)).encodeBegin(this, context, component, attrs);
}
@@ -355,7 +355,7 @@
log.debug(Messages.getMessage(Messages.ENCODE_END_HTML_INFO,
getKey()));
}
- getRenderer(null).encodeEnd(this, context, component);
+ getRenderer(new FacesResourceContext(context)).encodeEnd(this, context, component);
}
/*
@@ -370,9 +370,9 @@
.debug(Messages.getMessage(Messages.SEND_CONTENT_INFO,
getKey()));
}
- int total = getRenderer(null).send(this, context);
+ int total = getRenderer(context).send(this, context);
// For cacheable resources, store size.
- if (isCacheable(null)) {
+ if (isCacheable(context)) {
setContentLength(total);
}
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -54,7 +54,7 @@
public class ResourceLifecycle extends Lifecycle {
private Lifecycle lifecycle;
-
+
private static final Log _log = LogFactory.getLog(ResourceLifecycle.class);
/*
@@ -122,73 +122,107 @@
phaseListeners = facesLifecycle.getPhaseListeners();
PhaseEvent restoreViewEvent = new PhaseEvent(facesContext,
PhaseId.RESTORE_VIEW, this);
- // Invoke before restore view phase listeners
- for (int i = 0; i < phaseListeners.length; i++) {
- PhaseListener phaseListener = phaseListeners[i];
- if (PhaseId.RESTORE_VIEW.equals(phaseListener.getPhaseId())
- || PhaseId.ANY_PHASE.equals(phaseListener.getPhaseId())) {
- try {
- phaseListener.beforePhase(restoreViewEvent);
+ processPhaseListeners(phaseListeners, restoreViewEvent, true);
+ // Fix for a http://jira.jboss.org/jira/browse/RF-1056
+ if (facesContext.getResponseComplete())
+ return;
+ // fix for a http://jira.jboss.com/jira/browse/RF-1064 .
+ // viewRoot can be created outside.
+ UIViewRoot savedViewRoot = facesContext.getViewRoot();
+ try {
+ // create "dummy" viewRoot, to avoid problems in phase
+ // listeners.
+ UIViewRoot root = new UIViewRoot();
+ root.setViewId(resource.getKey());
+ root.setLocale(Locale.getDefault());
+ root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
+ facesContext.setViewRoot(root);
+ // Invoke after restore view phase listeners
+ processPhaseListeners(phaseListeners, restoreViewEvent, false);
+ // Fix for a http://jira.jboss.org/jira/browse/RF-1056
+ if (!facesContext.getResponseComplete()) {
+ // Invoke before render view phase listeners
+ renderViewEvent = new PhaseEvent(facesContext,
+ PhaseId.RENDER_RESPONSE, this);
+ processPhaseListeners(phaseListeners, renderViewEvent, true);
+ sendResource(resourceContext, resource);
+ processPhaseListeners(phaseListeners, renderViewEvent,
+ false);
+ }
- } catch (Exception e) {
- _log.error("Exception in PhaseListener, restore view : beforePhase", e);
- }
+ } finally {
+ if (null != savedViewRoot) {
+ facesContext.setViewRoot(savedViewRoot);
}
}
- // create "dummy" viewRoot, to avoid problems in phase listeners.
- UIViewRoot root = new UIViewRoot();
- root.setViewId(resource.getKey());
- root.setLocale(Locale.getDefault());
- root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
- facesContext.setViewRoot(root);
- // Invoke after restore view phase listeners
- for (int i = phaseListeners.length - 1; i > 0; i--) {
- PhaseListener phaseListener = phaseListeners[i];
- if (PhaseId.RESTORE_VIEW.equals(phaseListener.getPhaseId())
- || PhaseId.ANY_PHASE.equals(phaseListener.getPhaseId())) {
- try {
- phaseListener.afterPhase(restoreViewEvent);
+ } else {
+ sendResource(resourceContext, resource);
+ }
+ }
- } catch (Exception e) {
- _log.error("Exception in PhaseListener, restore view : afterPhase", e);
- }
- }
- }
- // Invoke before render view phase listeners
- renderViewEvent = new PhaseEvent(facesContext,
- PhaseId.RENDER_RESPONSE, this);
+ /**
+ * Send phase event to all apropriate PhaseListener's
+ *
+ * @param phaseListeners
+ * @param phaseEvent
+ * @param beforePhase
+ * TODO
+ */
+ private void processPhaseListeners(PhaseListener[] phaseListeners,
+ PhaseEvent phaseEvent, boolean beforePhase) {
+ if (beforePhase) {
+ // Invoke before phase listeners
for (int i = 0; i < phaseListeners.length; i++) {
PhaseListener phaseListener = phaseListeners[i];
- if (PhaseId.RENDER_RESPONSE.equals(phaseListener.getPhaseId())
- || PhaseId.ANY_PHASE.equals(phaseListener.getPhaseId())) {
- try {
- phaseListener.beforePhase(renderViewEvent);
+ invokePhaseListener(phaseListener, phaseEvent, beforePhase);
+ }
- } catch (Exception e) {
- _log.error("Exception in PhaseListener, render view : beforePhase", e);
- }
- }
- }
- }
- resource.sendHeaders(resourceContext);
- resource.send(resourceContext);
- if (null != facesContext) {
- // Invoke after restore view phase listeners
+ } else {
+ // Invoke after phase listeners, in reverse order.
for (int i = phaseListeners.length - 1; i > 0; i--) {
PhaseListener phaseListener = phaseListeners[i];
- if (PhaseId.RENDER_RESPONSE.equals(phaseListener.getPhaseId())
- || PhaseId.ANY_PHASE.equals(phaseListener.getPhaseId())) {
- try {
- phaseListener.afterPhase(renderViewEvent);
+ invokePhaseListener(phaseListener, phaseEvent, beforePhase);
+ }
- } catch (Exception e) {
- _log.error("Exception in PhaseListener, render view : afterPhase", e);
- }
+ }
+ }
+
+ /**
+ * @param phaseListener
+ * @param phaseEvent
+ * @param beforePhase
+ */
+ private void invokePhaseListener(PhaseListener phaseListener,
+ PhaseEvent phaseEvent, boolean beforePhase) {
+ if (phaseEvent.getPhaseId().equals(phaseListener.getPhaseId())
+ || PhaseId.ANY_PHASE.equals(phaseListener.getPhaseId())) {
+ try {
+ if (beforePhase) {
+ phaseListener.beforePhase(phaseEvent);
+ } else {
+ phaseListener.afterPhase(phaseEvent);
}
+ } catch (Exception e) {
+ _log
+ .error("Exception in PhaseListener, phase :"
+ + phaseEvent.getPhaseId().toString()
+ + (beforePhase ? " : beforePhase"
+ : " : afterPhase"), e);
}
}
}
+ /**
+ * @param resourceContext
+ * @param resource
+ * @throws IOException
+ */
+ private void sendResource(ResourceContext resourceContext,
+ InternetResource resource) throws IOException {
+ resource.sendHeaders(resourceContext);
+ resource.send(resourceContext);
+ }
+
protected synchronized Lifecycle getFacesLifecycle() {
if (lifecycle == null) {
// Acquire our Lifecycle instance
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/samples/seamIntegration/pom.xml 2007-10-05 23:30:08 UTC (rev 3289)
@@ -27,112 +27,72 @@
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
- <webResources>
+ <!--
+ <webResources>
<resource>
- <directory>${seamHome}</directory>
- <targetPath>WEB-INF/lib</targetPath>
- <includes>
- <include>jboss-seam.jar</include>
- <include>jboss-seam-ui.jar</include>
- <include>jboss-seam-debug.jar</include>
- <include>
- jboss-seam-remoting.jar
- </include>
- <include>
- jboss-seam-pdf.jar
- </include>
- </includes>
+ <directory>${seamHome}</directory>
+ <targetPath>WEB-INF/lib</targetPath>
+ <includes>
+ <include>jboss-seam.jar</include>
+ <include>jboss-seam-ui.jar</include>
+ <include>jboss-seam-debug.jar</include>
+ <include>
+ jboss-seam-remoting.jar
+ </include>
+ <include>
+ jboss-seam-pdf.jar
+ </include>
+ </includes>
</resource>
<resource>
- <directory>${seamHome}/lib</directory>
- <targetPath>WEB-INF/lib</targetPath>
- <includes>
- <include>jboss-el.jar</include>
- </includes>
+ <directory>${seamHome}/lib</directory>
+ <targetPath>WEB-INF/lib</targetPath>
+ <includes>
+ <include>jboss-el.jar</include>
+ </includes>
</resource>
- </webResources>
+ </webResources>
+ -->
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>seam-core</artifactId>
- <version>2.0.0.BETA</version>
- <scope>system</scope>
- <systemPath>${seamHome}/jboss-seam.jar</systemPath>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>3.0.0.GA</version>
</dependency>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>seam-ui</artifactId>
- <version>2.0.0.BETA</version>
- <scope>system</scope>
- <systemPath>${seamHome}/jboss-seam-ui.jar</systemPath>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.3.0.ga</version>
</dependency>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>seam-debug</artifactId>
- <version>2.0.0.BETA</version>
- <scope>system</scope>
- <systemPath>${seamHome}/jboss-seam-debug.jar</systemPath>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.3.1.ga</version>
</dependency>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>seam-remoting</artifactId>
- <version>2.0.0.BETA</version>
- <scope>system</scope>
- <systemPath>${seamHome}/jboss-seam-remoting.jar</systemPath>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <version>2.0.0.CR2</version>
</dependency>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>seam-pdf</artifactId>
- <version>2.0.0.BETA</version>
- <scope>system</scope>
- <systemPath>${seamHome}/jboss-seam-pdf.jar</systemPath>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <version>2.0.0.CR2</version>
</dependency>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-el</artifactId>
- <version>2.0.0.BETA</version>
- <scope>system</scope>
- <systemPath>${seamHome}/lib/jboss-el.jar</systemPath>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ioc</artifactId>
+ <version>2.0.0.CR2</version>
</dependency>
<dependency>
- <groupId>jboss</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.ga</version>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-debug</artifactId>
+ <version>2.0.0.CR2</version>
</dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <version>3.2.4.ga</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>3.0.0.ga</version>
- </dependency>
- <dependency>
- <groupId>jstl</groupId>
- <artifactId>jstl</artifactId>
- <version>1.2</version>
- </dependency>
</dependencies>
</project>
Modified: trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java
===================================================================
--- trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java 2007-10-05 17:06:42 UTC (rev 3288)
+++ trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java 2007-10-05 23:30:08 UTC (rev 3289)
@@ -64,8 +64,10 @@
return _renderers[0];
}
- public ResourceRenderer getRenderer(ResourceContext arg0) {
- return getRenderer();
+ public ResourceRenderer getRenderer(ResourceContext context) {
+ ImageData data = (ImageData) restoreData(context);
+ ImageRenderer renderer = _renderers[data._format];
+ return renderer;
}
/* (non-Javadoc)
* @see org.ajax4jsf.resource.InternetResourceBase#isCacheable()
@@ -73,6 +75,11 @@
public boolean isCacheable() {
return false;
}
+
+ public boolean isCacheable(ResourceContext resourceContext) {
+ ImageData data = (ImageData) restoreData(resourceContext);
+ return data.cacheable;
+ }
/* (non-Javadoc)
* @see org.ajax4jsf.resource.InternetResourceBase#requireFacesContext()
@@ -106,6 +113,7 @@
try {
dataToStore._bgColor = HtmlColor.decode(bgColor).getRGB();
} catch (Exception e) {}
+ dataToStore.cacheable = paint2D.isCacheable();
return dataToStore;
} else {
@@ -113,15 +121,16 @@
}
}
- private static class ImageData implements Serializable {
+ private static final class ImageData implements Serializable {
- private static final long serialVersionUID = 4452040100045367726L;
+ private static final long serialVersionUID = 4452040100045367728L;
int _width=1;
int _height = 1;
Object _data;
int _format = 0;
Object _paint;
+ boolean cacheable = false;
/*
* init color with transparent by default
*/
@@ -156,7 +165,7 @@
*/
public void send(ResourceContext context) throws IOException {
ImageData data = (ImageData) restoreData(context);
- ImageRenderer renderer = _renderers[data._format];
+ ImageRenderer renderer = (ImageRenderer) getRenderer(context);
FacesContext facesContext = FacesContext.getCurrentInstance();
try {
BufferedImage image = renderer.createImage(data._width,data._height);
@@ -184,14 +193,14 @@
}
}
- public String getContentType(ResourceContext context) {
- Object contentType = threadLocalContentType.get();
- if (contentType != null) {
- return (String) contentType;
- } else {
- return super.getContentType(context);
- }
- }
+// public String getContentType(ResourceContext context) {
+// Object contentType = threadLocalContentType.get();
+// if (contentType != null) {
+// return (String) contentType;
+// } else {
+// return super.getContentType(context);
+// }
+// }
/* (non-Javadoc)
* @see org.ajax4jsf.resource.InternetResourceBase#sendHeaders(org.ajax4jsf.resource.ResourceContext)
17 years, 2 months
JBoss Rich Faces SVN: r3288 - in branches/3.1.x: ui/drag-drop/src/main/templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-05 13:06:42 -0400 (Fri, 05 Oct 2007)
New Revision: 3288
Modified:
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
branches/3.1.x/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1078
Modified: branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-10-05 16:56:47 UTC (rev 3287)
+++ branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-10-05 17:06:42 UTC (rev 3288)
@@ -36,7 +36,8 @@
}
}
- if (this.mouseMoveProvidesButton && !Event.isLeftClick(event)) {
+ if (this.mouseMoveProvidesButton && !Event.isLeftClick(event) &&
+ RichFaces.navigatorType() != "MSIE") {
this.endDrag(event);
}
}
Modified: branches/3.1.x/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
===================================================================
--- branches/3.1.x/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-10-05 16:56:47 UTC (rev 3287)
+++ branches/3.1.x/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-10-05 17:06:42 UTC (rev 3288)
@@ -18,6 +18,8 @@
/org/richfaces/renderkit/html/scripts/utils.js,
/org/richfaces/renderkit/html/scripts/json/json-dom.js,
/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js,
+ /org/richfaces/renderkit/html/scripts/browser_info.js,
+
scripts/drag-indicator.js
</h:scripts>
<h:styles>/org/richfaces/renderkit/html/css/dragIndicator.xcss</h:styles>
17 years, 2 months
JBoss Rich Faces SVN: r3287 - in trunk: ui/drag-drop/src/main/templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-05 12:56:47 -0400 (Fri, 05 Oct 2007)
New Revision: 3287
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1078
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-10-05 15:58:55 UTC (rev 3286)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-10-05 16:56:47 UTC (rev 3287)
@@ -36,7 +36,8 @@
}
}
- if (this.mouseMoveProvidesButton && !Event.isLeftClick(event)) {
+ if (this.mouseMoveProvidesButton && !Event.isLeftClick(event) &&
+ RichFaces.navigatorType() != "MSIE") {
this.endDrag(event);
}
}
Modified: trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
===================================================================
--- trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-10-05 15:58:55 UTC (rev 3286)
+++ trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-10-05 16:56:47 UTC (rev 3287)
@@ -17,7 +17,8 @@
new org.ajax4jsf.javascript.DnDScript(),
/org/richfaces/renderkit/html/scripts/utils.js,
/org/richfaces/renderkit/html/scripts/json/json-dom.js,
- /org/richfaces/renderkit/html/scripts/dnd/dnd-common.js,
+ /org/richfaces/renderkit/html/scripts/dnd/dnd-common.js,
+ /org/richfaces/renderkit/html/scripts/browser_info.js,
scripts/drag-indicator.js
</h:scripts>
<h:styles>/org/richfaces/renderkit/html/css/dragIndicator.xcss</h:styles>
17 years, 2 months
JBoss Rich Faces SVN: r3286 - in trunk/test-applications/jsp/src/main: webapp and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-10-05 11:58:55 -0400 (Fri, 05 Oct 2007)
New Revision: 3286
Added:
trunk/test-applications/jsp/src/main/webapp/CustomizePage/
trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp
trunk/test-applications/jsp/src/main/webapp/pages/Div/
trunk/test-applications/jsp/src/main/webapp/pages/Div/Div.jsp
trunk/test-applications/jsp/src/main/webapp/pages/Rich/
trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
trunk/test-applications/jsp/src/main/webapp/pages/Select/
trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp
trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-10-05 15:22:57 UTC (rev 3285)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-10-05 15:58:55 UTC (rev 3286)
@@ -307,7 +307,6 @@
public void dcl(CurrentDateChangeEvent event) {
System.out.println(event.getCurrentDateString());
- System.out.println("ajvhckndskncs");
}
public void ddd(ValueChangeEvent event) {
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-10-05 15:22:57 UTC (rev 3285)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-10-05 15:58:55 UTC (rev 3286)
@@ -17,8 +17,9 @@
}
</style>
<h:form>
- <rich:calendar id="calendarID" dataModel="#{calendarDataModel}"
- locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
+ <rich:calendar id="calendarID" dataModel="#{calendarDataModel}"
+ locale="#{calendarBean.locale}"
+ popup="#{calendarBean.popup}"
datePattern="#{calendarBean.pattern}"
weekDayLabels="#{calendarBean.weekDayLabels}"
weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
@@ -29,7 +30,8 @@
jointPoint="#{calendarBean.jointPoint}"
direction="#{calendarBean.direction}"
enableManualInput="#{calendarBean.enableManualInput}"
- showInput="#{calendarBean.showInput}" buttonLabel="#{calendarBean.label}"
+ showInput="#{calendarBean.showInput}"
+ buttonLabel="#{calendarBean.label}"
boundaryDatesMode="#{calendarBean.boundary}"
currentDateChangeListener="#{calendarBean.dcl}"
valueChangeListener="#{calendarBean.ddd}" reRender="counter"
@@ -48,10 +50,11 @@
mode="#{calendarBean.mode}"
required="#{calendarBean.required}"
requiredMessage="Required Message"
+ timeZone="#{calendarBean.tmZone}"
>
<f:facet name="weekDay">
- <f:verbatim><span style="padding: 2px; font-size: 4" >{weekDayLabel + weekDayLabelShort}</span></f:verbatim>
+ {weekDayLabel}
</f:facet>
<f:facet name="optionalHeader">
Added: trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp 2007-10-05 15:58:55 UTC (rev 3286)
@@ -0,0 +1,18 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<f:view>
+<html>
+<head>
+<title></title>
+<link rel="stylesheet" href="<%=request.getContextPath()%>/styles/styles.css" type="text/css" />
+</head>
+<body>
+ <h:form>
+ <rich:messages showDetail="true"></rich:messages>
+
+ </h:form>
+</body>
+</html>
+</f:view>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/pages/Div/Div.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Div/Div.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Div/Div.jsp 2007-10-05 15:58:55 UTC (rev 3286)
@@ -0,0 +1,21 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<f:view>
+<html>
+<head>
+<title></title>
+<link rel="stylesheet" href="<%=request.getContextPath()%>/styles/styles.css" type="text/css" />
+</head>
+<body>
+ <jsp:include page="/pages/RichMenu/RichMenu.jsp" />
+
+ <div id="div_1_ID" style="position: relative; left:400px; top:400px; border-color: red, 2px;">
+ <div id="div_2_ID" style="position: absolute; left:-380px; top:-380px; color: blue, 2px;">
+ <jsp:include page="${richBean.src}" />
+ </div>
+ </div>
+</body>
+</html>
+</f:view>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Rich/Rich.jsp 2007-10-05 15:58:55 UTC (rev 3286)
@@ -0,0 +1,16 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<f:view>
+<html>
+<head>
+<title></title>
+<link rel="stylesheet" href="<%=request.getContextPath()%>/styles/styles.css" type="text/css" />
+</head>
+<body>
+ <jsp:include page="/pages/RichMenu/RichMenu.jsp" />
+ <jsp:include page="${richBean.src}" />
+</body>
+</html>
+</f:view>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp 2007-10-05 15:58:55 UTC (rev 3286)
@@ -0,0 +1,22 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<f:view>
+<html>
+<head>
+<title></title>
+<link rel="stylesheet" href="<%=request.getContextPath()%>/styles/styles.css" type="text/css" />
+</head>
+<body>
+ <jsp:include page="/pages/RichMenu/RichMenu.jsp" />
+
+ <div id="divID" style="position: absolute; top:60px; left: 10px; z-index: 1">
+ <jsp:include page="SelectOneMenuPage.jsp" />
+ </div>
+ <div id="divPageID" style="position: absolute; top:110px; left: 10px;">
+ <jsp:include page="${richBean.src}" />
+ </div>
+</body>
+</html>
+</f:view>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp 2007-10-05 15:58:55 UTC (rev 3286)
@@ -0,0 +1,176 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+
+<f:subview id="selectOneMenuPage">
+ <h:panelGrid columns="7" cellpadding="20px" cellspacing="30px">
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+
+ <h:selectOneMenu value="selectItem" >
+ <f:selectItem itemLabel="selectItem" itemValue="test" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+</f:subview>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3285 - in branches/3.1.x/ui/panelmenu/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-05 11:22:57 -0400 (Fri, 05 Oct 2007)
New Revision: 3285
Modified:
branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
Log:
RF-1070
Modified: branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-10-05 15:22:17 UTC (rev 3284)
+++ branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-10-05 15:22:57 UTC (rev 3285)
@@ -22,6 +22,7 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -31,13 +32,14 @@
import java.util.Set;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import javax.faces.event.ActionEvent;
-import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.component.UIPanelMenu;
import org.richfaces.component.UIPanelMenuGroup;
import org.richfaces.component.UIPanelMenuItem;
@@ -52,6 +54,41 @@
return UIComponent.class;
}
+ // find and encode UIParameter's components
+ public List encodeParams(FacesContext context, UIPanelMenuItem component) throws IOException {
+
+ UIPanelMenuItem menuItem = component;
+ List params = new ArrayList();
+ StringBuffer buff = new StringBuffer();
+
+ List children = menuItem.getChildren();
+ for (Iterator iterator = children.iterator(); iterator.hasNext();) {
+ UIComponent child = (UIComponent) iterator.next();
+
+ if(child instanceof UIParameter){
+
+ UIParameter param = (UIParameter)child;
+ String name = param.getName();
+
+ if (null == name) {
+ throw new IllegalArgumentException(Messages.getMessage(
+ Messages.UNNAMED_PARAMETER_ERROR, component.getClientId(context)));
+ }
+
+ Object value = param.getValue();
+ buff.append("params[");
+ buff.append(ScriptUtils.toScript(name));
+ buff.append("] = ");
+ buff.append(ScriptUtils.toScript(value));
+ buff.append(";");
+ params.add(buff.toString());
+ }
+ }
+
+ return params;
+ }
+
+
public void insertScript(FacesContext context, UIComponent component)
throws IOException {
@@ -122,8 +159,11 @@
if (null == target)
targetString = "";
else
- targetString = target.toString();
+ targetString = target.toString();
+
+
+
if (childRendered && parentRendered){
if ( !isParentDisabled(child) ){
String childName;
@@ -139,8 +179,19 @@
itemNames.add(childName);
}
+
+ if(child instanceof UIPanelMenuItem){
+ List paramsList = encodeParams(context, (UIPanelMenuItem)child);
+ if(!paramsList.isEmpty()){
+ buffer.append("var params = new Object();");
+ for (Iterator iterator = paramsList.iterator(); iterator.hasNext();) {
+ buffer.append(iterator.next());
+ }
+ }
+ }
+
buffer
- .append("new PanelMenuItem({myId:'")
+ .append("new PanelMenuItem(params,{myId:'")
.append((String) child.getClientId(context))
.append("',parentId:'")
.append((String) child.getParent().getClientId(context))
Modified: branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-10-05 15:22:17 UTC (rev 3284)
+++ branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-10-05 15:22:57 UTC (rev 3285)
@@ -27,14 +27,17 @@
PanelMenuItem = Class.create();
PanelMenuItem.prototype = {
- initialize: function(ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
+ initialize: function(params,ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
if (!ids.parentId){return};
this.type = options.type;
this.onopen = options.onopen;
+ this.itemId = ids.myId;
this.onclose = options.onclose;
this.event = options.event;
this.disabled = options.disabled;
this.name = options.name;
+ this.params = params;
+ this.myId = ids.myId;
this.mode = options.mode;
if (!this.mode)
@@ -214,7 +217,9 @@
if ("server" == this.mode) {
if (this.target)
form.target = this.target;
- form.submit();
+
+ Richfaces.jsFormSubmit(this.myId, form.name, this.target,this.params);
+ //form.submit();
}
else if ("ajax" == this.mode) {
var event = e;
Modified: branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-10-05 15:22:17 UTC (rev 3284)
+++ branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-10-05 15:22:57 UTC (rev 3285)
@@ -17,7 +17,9 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
new org.ajax4jsf.javascript.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/ajax4jsf/javascript/scripts/form.js,
+ /org/richfaces/renderkit/html/scripts/form.js
/org/richfaces/renderkit/html/scripts/panelMenu.js,
</h:scripts>
17 years, 2 months