JBoss Rich Faces SVN: r2755 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-09-05 05:03:47 -0400 (Wed, 05 Sep 2007)
New Revision: 2755
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
fixed small bug
in inline mode:
press today,
press next month,
select date,
press today,
reset date.
Selected date must be cleared
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-09-05 08:55:09 UTC (rev 2754)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-09-05 09:03:47 UTC (rev 2755)
@@ -1144,7 +1144,7 @@
}
},
- today: function(noUpdate) {
+ today: function(noUpdate, noHighlight) {
var now = new Date();
var nowyear = now.getFullYear();
var nowmonth = now.getMonth();
@@ -1166,7 +1166,7 @@
else
{
// highlight today
- if (this.isVisible && this.todayCellId)
+ if (this.isVisible && this.todayCellId && !noHighlight)
{
if (this.highlightEffect)
{
@@ -1250,7 +1250,14 @@
this.renderHeader();
this.renderFooter();
}
- this.today(noUpdate);
+
+ var date = new Date();
+ if (this.currentDate.getMonth()==date.getMonth() && this.currentDate.getFullYear()==date.getFullYear())
+ {
+ this.renderHeader();
+ this.renderFooter();
+ }
+ this.today(noUpdate, true);
}
}
17 years, 4 months
JBoss Rich Faces SVN: r2754 - in trunk/samples/richfaces-art-datatable: src/main/webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-09-05 04:55:09 -0400 (Wed, 05 Sep 2007)
New Revision: 2754
Modified:
trunk/samples/richfaces-art-datatable/pom.xml
trunk/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp
Log:
Modified: trunk/samples/richfaces-art-datatable/pom.xml
===================================================================
--- trunk/samples/richfaces-art-datatable/pom.xml 2007-09-05 08:43:16 UTC (rev 2753)
+++ trunk/samples/richfaces-art-datatable/pom.xml 2007-09-05 08:55:09 UTC (rev 2754)
@@ -3,12 +3,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.0.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>richfaces-art-datatable</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>richfaces-art-datatableDemo Maven Webapp</name>
<dependencies>
Modified: trunk/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp
===================================================================
--- trunk/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp 2007-09-05 08:43:16 UTC (rev 2753)
+++ trunk/samples/richfaces-art-datatable/src/main/webapp/pages/example10.jsp 2007-09-05 08:55:09 UTC (rev 2754)
@@ -57,53 +57,8 @@
</h:outputText>
</h:column>
</rich:dataTable>
-
-
- <a4j:outputPanel id="err" ajaxRendered="true">
- <h:messages />
- </a4j:outputPanel>
-
+ <rich:messages />
</h:form>
-
-
- <h:form id="form1">
- <f:verbatim><table class="dr-table rich-table" id="form1:_id0" border="0" cellpadding="0" cellspacing="0">
- <colgroup span="4"></colgroup>
-<thead><tr class="dr-table-header rich-table-header"><td id="form:_id0:_id2" class="dr-table-headercell rich-table-headercell">Product Code</td><td id="form:_id0:_id4" class="dr-table-headercell rich-table-headercell">Proposed Price</td><td id="form:_id0:_id6" class="dr-table-headercell rich-table-headercell">Sales Cost</td><td id="form:_id0:_id8" class="dr-table-headercell rich-table-headercell">Proposed Gross Margin</td></tr></thead><tbody>
- </f:verbatim>
- <a4j:repeat id="rep" value="#{salesReport.items}" var="item">
- <f:verbatim><tr class="dr-table-firstrow rich-table-firstrow">
- <td id="form1:_id0:0:_id10" class="dr-table-cell rich-table-cell">
- </f:verbatim>
-
- <h:outputText value="#{item.productCode}" />
-
- <f:verbatim></td><td id="form1:_id0:0:_id12" class="dr-table-cell rich-table-cell"></f:verbatim>
-
- <h:inputText value="#{item.proposedPrice}" size="7">
- <a4j:support event="onchange" ajaxSingle="true" reRender="margin1" />
- </h:inputText>
- <f:verbatim></td>
- <td id="form1:_id0:0:_id16" class="dr-table-cell rich-table-cell">
- </f:verbatim>
- <h:outputText value="#{item.salesCost}" />
- <f:verbatim></td><td id="form:_id0:0:_id12" class="dr-table-cell rich-table-cell"></f:verbatim>
- <h:outputText id="margin1" value="#{item.proposedGrossMargin}">
- <f:convertNumber pattern="$###0.000" />
- </h:outputText>
- <f:verbatim></td></tr></f:verbatim>
- </a4j:repeat>
- <f:verbatim></tbody></table></f:verbatim>
- </h:form>
-
-
-
-
- <h:form>
- <rich:separator lineType="dashed" height="1" style="padding-top:20px" />
- <h:commandLink value="back to example list" action="main"></h:commandLink>
- </h:form>
- <a4j:log hotkey="M" />
</f:view>
</body>
</html>
17 years, 4 months
JBoss Rich Faces SVN: r2753 - in trunk/test-applications/jsp/src/main/webapp: DropDownMenu and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-09-05 04:43:16 -0400 (Wed, 05 Sep 2007)
New Revision: 2753
Modified:
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DDMenu.jsp
Log:
http://jira.jboss.com/jira/browse/RF-819
http://jira.jboss.com/jira/browse/RF-820
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-09-05 08:43:09 UTC (rev 2752)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-09-05 08:43:16 UTC (rev 2753)
@@ -32,7 +32,7 @@
<br />
<rich:calendar
id="calendar"
- data="#{calendarDataModel}"
+ dataModel="#{calendarDataModel}"
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
datePattern="#{calendarBean.pattern}"
Modified: trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DDMenu.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DDMenu.jsp 2007-09-05 08:43:09 UTC (rev 2752)
+++ trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DDMenu.jsp 2007-09-05 08:43:16 UTC (rev 2753)
@@ -54,25 +54,25 @@
<a4j:support event="onclick" reRender="ddmId" />
</h:selectOneRadio>
- <h:outputText value="GroupDirection:" />
- <h:selectOneRadio value="#{dDMenu.groupDirection}">
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
- <f:selectItem itemLabel="auto" itemValue="auto" />
- <a4j:support event="onclick" reRender="ddmId" />
- </h:selectOneRadio>
+ <h:outputText value="GroupDirection:" />
+ <h:selectOneRadio value="#{dDMenu.groupDirection}">
+ <f:selectItem itemLabel="top-up" itemValue="top-up" />
+ <f:selectItem itemLabel="top-down" itemValue="top-down" />
+ <f:selectItem itemLabel="bottom-up" itemValue="bottom-up" />
+ <f:selectItem itemLabel="bottom-down" itemValue="bottom-down" />
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ <a4j:support event="onclick" reRender="ddmId" />
+ </h:selectOneRadio>
- <h:outputText value="JointPoint:" />
- <h:selectOneRadio value="#{dDMenu.jointPoint}">
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
- <f:selectItem itemLabel="auto" itemValue="auto" />
- <a4j:support event="onclick" reRender="ddmId" />
- </h:selectOneRadio>
+ <h:outputText value="JointPoint:" />
+ <h:selectOneRadio value="#{dDMenu.jointPoint}">
+ <f:selectItem itemLabel="top-right" itemValue="tr" />
+ <f:selectItem itemLabel="top-left" itemValue="tl" />
+ <f:selectItem itemLabel="bottom-right" itemValue="br" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bl" />
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ <a4j:support event="onclick" reRender="ddmId" />
+ </h:selectOneRadio>
<h:outputText value="Menu appearance event:" />
<h:selectOneRadio value="#{dDMenu.event}" onclick="submit()">
17 years, 4 months
JBoss Rich Faces SVN: r2752 - in trunk/test-applications/facelets/src/main/webapp: DropDownMenu and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-09-05 04:43:09 -0400 (Wed, 05 Sep 2007)
New Revision: 2752
Modified:
trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-819
http://jira.jboss.com/jira/browse/RF-820
Modified: trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-05 08:36:26 UTC (rev 2751)
+++ trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-05 08:43:09 UTC (rev 2752)
@@ -32,7 +32,7 @@
<br />
<rich:calendar
id="calendar"
- data="#{calendarDataModel}"
+ dataModel="#{calendarDataModel}"
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
datePattern="#{calendarBean.pattern}"
Modified: trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml 2007-09-05 08:36:26 UTC (rev 2751)
+++ trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml 2007-09-05 08:43:09 UTC (rev 2752)
@@ -63,20 +63,20 @@
<h:outputText value="GroupDirection:" />
<h:selectOneRadio value="#{dDMenu.groupDirection}">
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
+ <f:selectItem itemLabel="top-up" itemValue="top-up" />
+ <f:selectItem itemLabel="top-down" itemValue="top-down" />
+ <f:selectItem itemLabel="bottom-up" itemValue="bottom-up" />
+ <f:selectItem itemLabel="bottom-down" itemValue="bottom-down" />
<f:selectItem itemLabel="auto" itemValue="auto" />
<a4j:support event="onclick" reRender="ddmId" />
</h:selectOneRadio>
<h:outputText value="JointPoint:" />
<h:selectOneRadio value="#{dDMenu.jointPoint}">
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
+ <f:selectItem itemLabel="top-right" itemValue="tr" />
+ <f:selectItem itemLabel="top-left" itemValue="tl" />
+ <f:selectItem itemLabel="bottom-right" itemValue="br" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bl" />
<f:selectItem itemLabel="auto" itemValue="auto" />
<a4j:support event="onclick" reRender="ddmId" />
</h:selectOneRadio>
17 years, 4 months
JBoss Rich Faces SVN: r2751 - in trunk/ui/datascroller/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-09-05 04:36:26 -0400 (Wed, 05 Sep 2007)
New Revision: 2751
Modified:
trunk/ui/datascroller/src/main/config/component/datascroller.xml
trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-797
Modified: trunk/ui/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/ui/datascroller/src/main/config/component/datascroller.xml 2007-09-05 08:03:14 UTC (rev 2750)
+++ trunk/ui/datascroller/src/main/config/component/datascroller.xml 2007-09-05 08:36:26 UTC (rev 2751)
@@ -102,12 +102,24 @@
</description>
</property>
<property>
+ <name>inactiveStyle</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML style attribute for the inactive cell on scroller
+ </description>
+ </property>
+ <property>
<name>selectedStyleClass</name>
<classname>java.lang.String</classname>
<description>Corresponds to the HTML class attribute for the selected cell on scroller
</description>
</property>
<property>
+ <name>inactiveStyleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute for the inactive cell on scroller
+ </description>
+ </property>
+ <property>
<name>tableStyleClass</name>
<classname>java.lang.String</classname>
<description>Space-separated list of CSS style class(es) that are be applied to outside table of this component
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-09-05 08:03:14 UTC (rev 2750)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-09-05 08:36:26 UTC (rev 2751)
@@ -175,6 +175,13 @@
public abstract void setStepControls(String stepControls);
+ public abstract String getInactiveStyleClass();
+
+ public abstract String getInactiveStyle();
+
+ public abstract void setInactiveStyleClass(String inactiveStyleClass);
+
+ public abstract void setInactiveStyle(String inactiveStyle);
/**
* Finds the dataTable which id is mapped to the "for" property
*
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-09-05 08:03:14 UTC (rev 2750)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-09-05 08:36:26 UTC (rev 2751)
@@ -189,43 +189,33 @@
}
for (int i = start, size = start + pages; i < size; i++) {
- //String styleClass;
- //String style;
boolean isCurrentPage = (i + 1 == currentPage);
- /*
- if (isCurrentPage) {
- styleClass = scroller.getSelectedStyleClass();
- style = scroller.getSelectedStyle();
- }
- else {
- styleClass = scroller.getStyleClass();
- style = scroller.getStyle();
- }
+ String styleClass;
+ String style;
+ if (isCurrentPage) {
+ styleClass = scroller.getSelectedStyleClass();
+ style = scroller.getSelectedStyle();
+ } else {
+ styleClass = scroller.getInactiveStyleClass();
+ style = scroller.getInactiveStyle();
+ }
+ if (styleClass==null){
+ styleClass="";
+ }
- if (style==null){
- style="";
- }
- if (styleClass==null){
- styleClass="";
- }
- */
-
out.startElement("td", component);
+
if (isCurrentPage) {
- //out.writeAttribute("class", "dr-dscr-act rich-datascr-act "+scroller.getStyleClass(), null);
- out.writeAttribute("class", "dr-dscr-act rich-datascr-act",
- null);
- out.writeAttribute("style", "" + scroller.getSelectedStyle(),
- null);
+ out.writeAttribute("class", "dr-dscr-act rich-datascr-act "+
+ styleClass, null);
} else {
- //out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact "+scroller.getStyleClass(), null);
- out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact",
- null);
- //out.writeAttribute("style", ""+scroller.getStyle(), null);
+ out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact "+
+ styleClass, null);
out.writeAttribute("onclick", getOnClick(context, component,
Integer.toString(i + 1)), null);
}
+ if (null != style) out.writeAttribute("style", style, null);
out.writeText(Integer.toString(i + 1), null);
//renderChild(context, link);
out.endElement("td");
17 years, 4 months
JBoss Rich Faces SVN: r2750 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-09-05 04:03:14 -0400 (Wed, 05 Sep 2007)
New Revision: 2750
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml 2007-09-05 00:35:04 UTC (rev 2749)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml 2007-09-05 08:03:14 UTC (rev 2750)
@@ -10,7 +10,7 @@
<h:commandLink value="Non-Ajax Submit" action="foo" >
<f:param name="param1" value="foo"/>
...
- </h:commandLink>
+ </h:commandLink>
....
</h:panelGrid>
....
17 years, 4 months
JBoss Rich Faces SVN: r2749 - in trunk/samples: richfaces-demo/src/main/webapp/richfaces and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-09-04 20:35:04 -0400 (Tue, 04 Sep 2007)
New Revision: 2749
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/jsAPI.xhtml
Modified:
trunk/samples/pom.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/model.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/messages/examples/form.xhtml
Log:
demo update. calendar client side api is added. other minor updates
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-09-04 22:55:46 UTC (rev 2748)
+++ trunk/samples/pom.xml 2007-09-05 00:35:04 UTC (rev 2749)
@@ -430,7 +430,9 @@
-->
<module>panelmenu-sample</module>
<module>rich-message-demo</module>
+ <!--
<module>scrollableDataTableDemo</module>
- <module>richfaces-ear-demo</module>
+ <module>richfaces-ear-demo</module>
+ -->
</modules>
</project>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml 2007-09-04 22:55:46 UTC (rev 2748)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml 2007-09-05 00:35:04 UTC (rev 2749)
@@ -127,11 +127,11 @@
</h:inputText>
</pre>
</div>
- <p><b>requestDelay</b> attribute defines the time (in ms.) that request will be wait in
+ <p><b>requestDelay</b> attribute defines the time (in ms.) that the request will be wait in
the queue before it is ready to send. When the delay time is over, the request will be
sent to the server or removed if the newest 'similar' request is in a queue already .
</p>
- <p><b>ignoreDupResponses</b> attributes orders to ignore the Ajax Response produced by the
+ <p><b>ignoreDupResponses</b> attribute orders to ignore the Ajax Response produced by the
request if the newest 'similar' request is in a queue already. ignoreDupResponses="true"
does not cancel the request while it is processed on the server, but just allows to
avoid unnecessary updates on the client side if the response loses the actuality.
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/jsAPI.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/jsAPI.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/jsAPI.xhtml 2007-09-05 00:35:04 UTC (rev 2749)
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+ <p>
+ Calendar object JavaScript API supports the following calls:
+ <ul>
+ <li><b>selectDate(date)</b> selects the date specified. If the date isn't in current
+ month, performs request to select</li>
+ <li><b>isDateEnabled(date)</b> checks if given date is selectable</li>
+ <li><b>enableDate(date)</b> enables the given date</li>
+ <li><b>disableDate(date)</b> disables the given date</li>
+ <li><b>enableDates(date[])</b> enables the set of dates</li>
+ <li><b>disableDates(daye[])</b> disables the set of dates</li>
+ <li><b>nextMonth()</b> navigates to next month</li>
+ <li><b>nextYear()</b> navigates to next year</li>
+ <li><b>prevMonth()</b> navigates to previous month </li>
+ <li><b>prevYear()</b> navigates to previous year</li>
+ <li><b>today()</b> selects today date</li>
+ <li><b>getSelectedDate()</b> returns currently selected date</li>
+ <li><b>Object getData()</b> gets the current selected date</li>
+ <li><b>enable()</b> enables the whole calendar</li>
+ <li><b>disable()</b> disables (makes it read-only) the whole calendar </li>
+ <li><b>getCurrentMonth()</b> returns number of the month currently being viewed</li>
+ <li><b>getCurrentYear()</b> returns number of the year currently being viewed</li>
+ </ul>
+ </p>
+ <p>
+ You can access the calendar object using <code>$(calendar_client_id).component</code>
+ call from any place outside of the component itself.
+ </p>
+
+ <p> <dl><dt>If you develop the macrodefinition for calendar object, you can use:</dt>
+ <dd><code>Richfaces.invokeOnComponent('calendar',element,api_function_name)</code></dd>
+ <dt>For example, the following call is
+ used on the "Next Year" button on the popup calendar panel:</dt>
+ <dd><code>Richfaces.invokeOnComponent('calendar',this,'nextYear'); </code></dd>
+ The second parameter
+ is an element inside the calendar. The Richfaces.invokeOnComponent tries to find
+ the component in the parents hierarchy with type specified with the first parameter and
+ invokes the function defined with the third parameter.
+ </dl>
+ </p>
+
+ </ui:define>
+
+ </ui:composition>
+</html>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/model.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/model.xhtml 2007-09-04 22:55:46 UTC (rev 2748)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/model.xhtml 2007-09-05 00:35:04 UTC (rev 2749)
@@ -8,15 +8,12 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>Calendar may use a special Data Model to provide data for element rendering.
- Data Model consist of two major interfaces:
- <ul>
- <li>CalendarDataModel</li>
- <li>CalendarDataModelItem</li>
- </ul>
- </p>
+ <p>Calendar may use a special Data Model to provide data for element rendering. You
+ can re-define the default Calendar Model using the <b>dataModel</b> attribute pointed
+ to the object that implements CalendarDataModel interface.
+ </p>
<p>
- CalendarDataModel has the following functions:
+ CalendarDataModel has the following methods:
<ul>
<li><b>CalendarDataModelItem[] getData(Date[]) </b>
is called every time when components will need next block of
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml 2007-09-04 22:55:46 UTC (rev 2748)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar.xhtml 2007-09-05 00:35:04 UTC (rev 2749)
@@ -13,7 +13,10 @@
</rich:tab>
<rich:tab label="Calendar Model">
<ui:include src="/richfaces/calendar/model.xhtml"/>
- </rich:tab>
+ </rich:tab>
+ <rich:tab label="Client Side API">
+ <ui:include src="/richfaces/calendar/jsAPI.xhtml"/>
+ </rich:tab>
<ui:include src="/templates/include/tagInfo.xhtml">
<ui:param name="path" value="rich/calendar"/>
</ui:include>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml 2007-09-04 22:55:46 UTC (rev 2748)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml 2007-09-05 00:35:04 UTC (rev 2749)
@@ -27,6 +27,14 @@
<ui:param name="openlabel" value="View Page Source" />
</ui:include>
</div>
+
+ <p>
+ <b>errorContent</b> attribute defines the alternative content that will be shown
+ in case rich:insert cannot read the resource defined with 'src' attribute. If
+ errorContent attribute is not defined, the component shown the actual error message in the
+ place where the content is expected.
+ </p>
+
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/messages/examples/form.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/messages/examples/form.xhtml 2007-09-04 22:55:46 UTC (rev 2748)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/messages/examples/form.xhtml 2007-09-05 00:35:04 UTC (rev 2749)
@@ -6,25 +6,30 @@
xmlns:rich="http://richfaces.org/rich">
<style type="text/css">
- .rich-message-marker img {
- padding-right:7px;
- }
- .rich-message-label {
- color:red;
- }
- .top{
- vertical-align:top;
- }
+ .rich-messages-marker img {padding-right:7px;}
+ .rich-message-label {color:red;}
+ .top {vertical-align:top;}
</style>
- <rich:panel>
+ <rich:panel style="width:400px">
<f:facet name="header">
<h:outputText value="Form Validation. Using rich:messages"/>
</f:facet>
<h:form>
- <h:panelGrid columns="2" columnClasses="top">
+ <rich:messages passedLabel="Data is allowed to be stored." layout="list">
+ <f:facet name="header">
+ <h:outputText value="Entered Data Status:"></h:outputText>
+ </f:facet>
+ <f:facet name="passedMarker">
+ <h:graphicImage value="/images/ajax/passed.gif" />
+ </f:facet>
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:messages>
+
<h:panelGrid columns="2">
<h:outputText value="Name:" />
<h:inputText label="Name" id="name" required="true" value="#{userBean.name}">
@@ -46,18 +51,6 @@
<a4j:commandButton value="Validate" />
</f:facet>
</h:panelGrid>
- <rich:messages passedLabel="Data is allowed to be stored." layout="list">
- <f:facet name="header">
- <h:outputText value="Entered Data Status:"></h:outputText>
- </f:facet>
- <f:facet name="passedMarker">
- <h:graphicImage value="/images/ajax/passed.gif" />
- </f:facet>
- <f:facet name="errorMarker">
- <h:graphicImage value="/images/ajax/error.gif" />
- </f:facet>
- </rich:messages>
- </h:panelGrid>
</h:form>
</rich:panel>
</ui:composition>
\ No newline at end of file
17 years, 4 months
JBoss Rich Faces SVN: r2748 - trunk/samples/seamIntegration.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-09-04 18:55:46 -0400 (Tue, 04 Sep 2007)
New Revision: 2748
Removed:
trunk/samples/seamIntegration/webapp/
Log:
Fix exception from seam pdf library during send facesContext-requuried resources.
17 years, 4 months
JBoss Rich Faces SVN: r2747 - in trunk: framework/impl/src/main/javascript/ajaxjsf and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-09-04 18:55:44 -0400 (Tue, 04 Sep 2007)
New Revision: 2747
Added:
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Media.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaBean.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaData.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PageDescriptionBean.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PagesBean.java
trunk/samples/seamIntegration/src/main/webapp/index.jsp
trunk/samples/seamIntegration/src/main/webapp/pages/mediaOutput.xhtml
Removed:
trunk/samples/seamIntegration/src/main/webapp/home.xhtml
trunk/samples/seamIntegration/src/main/webapp/index.html
trunk/samples/seamIntegration/src/main/webapp/index.jsp
trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml
trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml
trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml
trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml
trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml
trunk/samples/seamIntegration/src/main/webapp/login.page.xml
trunk/samples/seamIntegration/src/main/webapp/login.xhtml
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/samples/seamIntegration/pom.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
Log:
Fix exception from seam pdf library during send facesContext-requuried resources.
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2007-09-04 22:55:44 UTC (rev 2747)
@@ -25,15 +25,18 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import javax.faces.FacesException;
import javax.faces.FactoryFinder;
+import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
+import javax.faces.render.RenderKitFactory;
import javax.servlet.ServletException;
import org.ajax4jsf.resource.InternetResource;
@@ -132,6 +135,12 @@
}
}
}
+ // 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];
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-09-04 22:55:44 UTC (rev 2747)
@@ -734,10 +734,6 @@
A4J.AJAX.replaceViewState(inputs,newinputs);
}
- if ((typeof Event != "undefined") && (typeof Event.unloadElementsCache === "function")) {
- Event.unloadElementsCache();
- }
-
// Process listeners.
for(var li = 0; li < A4J.AJAX._listeners.length; li++){
var listener = A4J.AJAX._listeners[li];
@@ -874,6 +870,11 @@
*/
A4J.AJAX.finishRequest = function(request){
var options = request.options;
+ // Remove unload prototype events for a removed elements.
+ if ((typeof Event != "undefined") && (typeof Event.unloadElementsCache == "function")) {
+ Event.unloadElementsCache();
+ }
+
// we can set listener for complete request - for example,
// it can shedule next request for update page.
var oncomplete = request.getElementById('org.ajax4jsf.oncomplete');
@@ -894,14 +895,14 @@
}
// mark status object ( if any ) for complete request ;
A4J.AJAX.status(request.containerId,options.status,false);},
- 50);
+ 10);
} else if(options.oncomplete){
LOG.debug( "Call component oncomplete function after processing updates" );
window.setTimeout(function(){
options.oncomplete(request,request.domEvt,request.getJSON('_ajax:data'));
// mark status object ( if any ) for complete request ;
A4J.AJAX.status(request.containerId,options.status,false);},
- 50);
+ 10);
} else {
// mark status object ( if any ) for complete request ;
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/pom.xml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -38,6 +38,9 @@
<include>
jboss-seam-remoting.jar
</include>
+ <include>
+ jboss-seam-pdf.jar
+ </include>
</includes>
</resource>
<resource>
@@ -69,6 +72,27 @@
</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>
+ </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>
+ </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>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
<artifactId>jboss-el</artifactId>
<version>2.0.0.BETA</version>
<scope>system</scope>
@@ -96,9 +120,19 @@
</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>
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Media.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Media.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Media.java 2007-09-04 22:55:44 UTC (rev 2747)
@@ -0,0 +1,17 @@
+package org.ajax4jsf;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+
+public interface Media {
+
+ public void paint(OutputStream out, Object data) throws IOException;
+
+ public void initData();
+
+ public void setData(MediaData data);
+
+ public MediaData getData();
+
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Media.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaBean.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaBean.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaBean.java 2007-09-04 22:55:44 UTC (rev 2747)
@@ -0,0 +1,62 @@
+package org.ajax4jsf;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+
+
+@Name("media")
+public class MediaBean implements Media {
+
+ private MediaData data;
+
+ /**
+ * @return the data
+ */
+ @Out
+ public MediaData getData() {
+ return data;
+ }
+
+ /**
+ * @param data the data to set
+ */
+ public void setData(MediaData data) {
+ this.data = data;
+ }
+
+ @Factory(value="data")
+ public void initData(){
+ data= new MediaData();
+ data.setWidth(100);
+ data.setHeight(100);
+ data.setBackground(Color.BLUE);
+ data.setDrawColor(Color.RED);
+ }
+
+ public void paint(OutputStream out, Object data) throws IOException{
+ if (data instanceof MediaData) {
+
+ MediaData paintData = (MediaData) data;
+ BufferedImage img = new BufferedImage(paintData.getWidth(),paintData.getHeight(),BufferedImage.TYPE_INT_RGB);
+ Graphics2D graphics2D = img.createGraphics();
+ graphics2D.setBackground(paintData.getBackground());
+ graphics2D.setColor(paintData.getDrawColor());
+ graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
+ graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
+ graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
+ graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
+
+ ImageIO.write(img,"jpeg",out);
+
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaData.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaData.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaData.java 2007-09-04 22:55:44 UTC (rev 2747)
@@ -0,0 +1,39 @@
+package org.ajax4jsf;
+
+import java.awt.Color;
+import java.io.Serializable;
+
+public class MediaData implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+ Integer Width=110;
+ Integer Height=50;
+ Color Background=new Color(0,0,0);
+ Color DrawColor=new Color(255,255,255);
+ public MediaData() {
+ }
+ public Color getBackground() {
+ return Background;
+ }
+ public void setBackground(Color background) {
+ Background = background;
+ }
+ public Color getDrawColor() {
+ return DrawColor;
+ }
+ public void setDrawColor(Color drawColor) {
+ DrawColor = drawColor;
+ }
+ public Integer getHeight() {
+ return Height;
+ }
+ public void setHeight(Integer height) {
+ Height = height;
+ }
+ public Integer getWidth() {
+ return Width;
+ }
+ public void setWidth(Integer width) {
+ Width = width;
+ }
+}
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/MediaData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PageDescriptionBean.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PageDescriptionBean.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PageDescriptionBean.java 2007-09-04 22:55:44 UTC (rev 2747)
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PageDescriptionBean {
+
+ private String _path;
+
+ private String _title;
+
+ /**
+ * @return the path
+ */
+ public String getPath() {
+ return _path;
+ }
+
+ /**
+ * @param path the path to set
+ */
+ public void setPath(String path) {
+ _path = path;
+ }
+
+ /**
+ * @return the title
+ */
+ public String getTitle() {
+ return _title;
+ }
+
+ /**
+ * @param title the title to set
+ */
+ public void setTitle(String title) {
+ _title = title;
+ }
+
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PageDescriptionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PagesBean.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PagesBean.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PagesBean.java 2007-09-04 22:55:44 UTC (rev 2747)
@@ -0,0 +1,125 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.ServletContext;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PagesBean {
+
+ private static final Pattern JSP_PATTERN = Pattern.compile(".*\\.jspx?");
+
+ private static final Pattern XHTML_PATTERN = Pattern.compile(".*\\.xhtml");
+
+ private static final Pattern TITLE_PATTERN = Pattern.compile("<title>(.*)</title>",Pattern.CASE_INSENSITIVE|Pattern.MULTILINE);
+
+ private ServletContext _servletContext;
+
+ private List<PageDescriptionBean> _jspPages;
+
+ private String _path;
+
+ private List<PageDescriptionBean> _xhtmlPages;
+
+ /**
+ * @return the path
+ */
+ public String getPath() {
+ return _path;
+ }
+
+ /**
+ * @param path
+ * the path to set
+ */
+ public void setPath(String path) {
+ _path = path;
+ }
+
+ /**
+ * @return the servletContext
+ */
+ public ServletContext getServletContext() {
+ return _servletContext;
+ }
+
+ /**
+ * @param servletContext
+ * the servletContext to set
+ */
+ public void setServletContext(ServletContext servletContext) {
+ _servletContext = servletContext;
+ }
+
+ public List<PageDescriptionBean> getJspPages() {
+ if (_jspPages == null && null != getServletContext()) {
+ _jspPages = getPagesByPattern(JSP_PATTERN);
+ }
+
+ return _jspPages;
+ }
+
+ public List<PageDescriptionBean> getXhtmlPages() {
+ if (_xhtmlPages == null && null != getServletContext()) {
+ _xhtmlPages = getPagesByPattern(XHTML_PATTERN);
+ }
+
+ return _xhtmlPages;
+ }
+
+ /**
+ *
+ */
+ private List<PageDescriptionBean> getPagesByPattern(Pattern pattern) {
+ List<PageDescriptionBean> jspPages = new ArrayList<PageDescriptionBean>();
+ Set resourcePaths = getServletContext().getResourcePaths(getPath());
+ for (Iterator iterator = resourcePaths.iterator(); iterator
+ .hasNext();) {
+ String page = (String) iterator.next();
+ if (pattern.matcher(page).matches()) {
+ PageDescriptionBean pageBean = new PageDescriptionBean();
+ pageBean.setPath(page);
+ InputStream pageInputStream = getServletContext().getResourceAsStream(page);
+ if(null != pageInputStream){
+ byte[] head = new byte[1024];
+ try {
+ int readed = pageInputStream.read(head);
+ String headString = new String(head,0,readed);
+ Matcher titleMatcher = TITLE_PATTERN.matcher(headString);
+ if(titleMatcher.find() && titleMatcher.group(1).length()>0){
+ pageBean.setTitle(titleMatcher.group(1));
+ } else {
+ pageBean.setTitle(page);
+ }
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } finally {
+ try {
+ pageInputStream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ jspPages.add(pageBean);
+ }
+ }
+ return jspPages;
+ }
+
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/PagesBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -47,7 +47,8 @@
<mail:mail-session host="localhost" port="2525" username="test" password="test" />
- --><!-- For use with jBPM pageflow or process management -->
+ -->
+ <!-- For use with jBPM pageflow or process management -->
<!--
<bpm:jbpm>
<bpm:process-definitions></bpm:process-definitions>
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -2,18 +2,9 @@
<pages xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
+>
- no-conversation-view-id="/home.xhtml"
- login-view-id="/login.xhtml">
- <page view-id="*">
- <navigation>
- <rule if-outcome="home">
- <redirect view-id="/home.xhtml"/>
- </rule>
- </navigation>
- </page>
-
<exception class="org.jboss.seam.framework.EntityNotFoundException">
<redirect view-id="/error.xhtml">
<message>Not found</message>
@@ -39,11 +30,6 @@
</redirect>
</exception>
- <exception class="org.jboss.seam.security.NotLoggedInException">
- <redirect view-id="/login.xhtml">
- <message>Please log in first</message>
- </redirect>
- </exception>
<exception>
<redirect view-id="/error.xhtml">
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,81 +1,94 @@
<?xml version="1.0" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
- <!-- Ajax4jsf -->
-
- <context-param>
- <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
- <param-value>com.sun.facelets.FaceletViewHandler</param-value>
- </context-param>
-
- <context-param>
- <param-name>org.ajax4jsf.SKIN</param-name>
- <param-value>blueSky</param-value>
- </context-param>
-
- <!-- Seam -->
-
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
-
- <filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
- </filter>
+ <!-- Ajax4jsf -->
- <filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <servlet>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <url-pattern>/seam/resource/*</url-pattern>
- </servlet-mapping>
-
- <!-- Facelets development mode (disable in production) -->
-
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <!-- JSF -->
-
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.seam</url-pattern>
- </servlet-mapping>
-
- <security-constraint>
- <display-name>Restrict raw XHTML Documents</display-name>
- <web-resource-collection>
- <web-resource-name>XHTML</web-resource-name>
- <url-pattern>*.xhtml</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>NONE</role-name>
- </auth-constraint>
- </security-constraint>
-
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>
+ org.jboss.seam.servlet.SeamListener
+ </listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>
+ org.jboss.seam.servlet.SeamResourceServlet
+ </servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- Facelets development mode (disable in production) -->
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- JSF -->
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <display-name>Restrict raw XHTML Documents</display-name>
+ <web-resource-collection>
+ <web-resource-name>XHTML</web-resource-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>NONE</role-name>
+ </auth-constraint>
+ </security-constraint>
+
</web-app>
Deleted: trunk/samples/seamIntegration/src/main/webapp/home.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/home.xhtml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/home.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,31 +0,0 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
-
-<ui:define name="body">
-
- <h:messages globalOnly="true" styleClass="message"/>
-
- <rich:panel>
- <f:facet name="header">Welcome!</f:facet>
- <p>This empty shell application includes:</p>
- <ul>
- <li>Ant build script</li>
- <li>Deployment to JBoss AS</li>
- <li>Integration testing using TestNG and JBoss Embeddable EJB3</li>
- <li>EJB 3.0 Seam components</li>
- <li>Templated Facelets views</li>
- <li>HSQL (or MySQL) Datasource</li>
- <li>Default CSS stylesheet</li>
- <li>Internationalization support</li>
- </ul>
- </rich:panel>
-
-</ui:define>
-</ui:composition>
Deleted: trunk/samples/seamIntegration/src/main/webapp/index.html
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/index.html 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/index.html 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,5 +0,0 @@
-<html>
-<head>
- <meta http-equiv="Refresh" content="0; URL=home.seam">
-</head>
-</html>
\ No newline at end of file
Deleted: trunk/samples/seamIntegration/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/index.jsp 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/index.jsp 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,11 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-
-<html>
-
-<head></head>
-
- <body>
- <jsp:forward page="/pages/index.jsf" />
- </body>
-
-</html>
\ No newline at end of file
Added: trunk/samples/seamIntegration/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/index.jsp (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/index.jsp 2007-09-04 22:55:44 UTC (rev 2747)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"
+ prefix="c" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>Richfaces examples and tests</title>
+</head>
+<body>
+<jsp:useBean id="pages" scope="application" class="org.ajax4jsf.PagesBean">
+ <jsp:setProperty name="pages" property="servletContext" value="${pageContext.servletContext}"/>
+ <jsp:setProperty name="pages" property="path" value="/pages"/>
+</jsp:useBean>
+<h2>JSF pages</h2>
+<ul>
+<c:forEach var="page" items="${pages.jspPages}">
+ <li><a href="${pageContext.request.contextPath}/faces${page.path}">${page.title}</a></li>
+</c:forEach>
+</ul>
+<h2>Facelets pages</h2>
+<ul>
+<c:forEach var="page" items="${pages.xhtmlPages}">
+ <li><a href="${pageContext.request.contextPath}/faces${page.path}">${page.title}</a></li>
+</c:forEach>
+</ul>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/webapp/index.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,16 +0,0 @@
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
-
- <div class="prop">
- <span class="name">
- <ui:insert name="label"/>
- </span>
- <span class="value">
- <ui:insert/>
- </span>
- </div>
-
-</ui:composition>
\ No newline at end of file
Deleted: trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,24 +0,0 @@
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
-
- <div class="prop">
-
- <s:label styleClass="name #{invalid?'errors':''}">
- <ui:insert name="label"/>
- <s:span styleClass="required" rendered="#{required}">*</s:span>
- </s:label>
-
- <span class="value #{invalid?'errors':''}">
- <s:validateAll>
- <ui:insert/>
- </s:validateAll>
- </span>
-
- <s:message styleClass="error errors"/>
-
- </div>
-
-</ui:composition>
\ No newline at end of file
Deleted: trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,12 +0,0 @@
-<div class="loginout"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
- <h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/>
-  | 
- <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}"/>
- <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
- |
-</div>
Deleted: trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,17 +0,0 @@
-<rich:toolBar
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:rich="http://richfaces.org/rich">
- <rich:toolBarGroup>
- <h:outputText value="#{projectName}:"/>
- <s:link view="/home.xhtml" value="Home"/>
- </rich:toolBarGroup>
- <rich:toolBarGroup location="right">
- <h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/>
- <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}"/>
- <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
- </rich:toolBarGroup>
-</rich:toolBar>
Deleted: trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,30 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>seamIntegration</title>
- <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
-</head>
-
-<body>
-
- <ui:include src="menu.xhtml">
- <ui:param name="projectName" value="seamIntegration"/>
- </ui:include>
-
- <div class="body">
- <ui:insert name="body"/>
- </div>
-
- <div class="footer">
- Powered by <a href="http://jboss.com/products/seam">Seam</a>.
- Generated by seam-gen.
- </div>
-
-</body>
-</html>
Deleted: trunk/samples/seamIntegration/src/main/webapp/login.page.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/login.page.xml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/login.page.xml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<page xmlns="http://jboss.com/products/seam/pages"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
-
- <navigation from-action="#{identity.login}">
- <rule if="#{identity.loggedIn}">
- <redirect view-id="/home.xhtml"/>
- </rule>
- </navigation>
-
-</page>
Deleted: trunk/samples/seamIntegration/src/main/webapp/login.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/login.xhtml 2007-09-04 21:15:09 UTC (rev 2746)
+++ trunk/samples/seamIntegration/src/main/webapp/login.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -1,45 +0,0 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
-
-<ui:define name="body">
-
- <h:messages styleClass="message"/>
-
- <h:form id="login">
-
- <rich:panel>
- <f:facet name="header">Login</f:facet>
-
- <p>Please login using any username and password</p>
-
- <div class="dialog">
- <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
- <h:outputLabel for="username">Username</h:outputLabel>
- <h:inputText id="username"
- value="#{identity.username}"/>
- <h:outputLabel for="password">Password</h:outputLabel>
- <h:inputSecret id="password"
- value="#{identity.password}"/>
- <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
- <h:selectBooleanCheckbox id="rememberMe"
- value="#{identity.rememberMe}"/>
- </h:panelGrid>
- </div>
-
- </rich:panel>
-
- <div class="actionButtons">
- <h:commandButton value="Login" action="#{identity.login}"/>
- </div>
-
- </h:form>
-
- </ui:define>
-</ui:composition>
Added: trunk/samples/seamIntegration/src/main/webapp/pages/mediaOutput.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/pages/mediaOutput.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/pages/mediaOutput.xhtml 2007-09-04 22:55:44 UTC (rev 2747)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <head>
+ <title>Paint image in a4j:mediaOutput</title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <h:panelGrid columns="2">
+ Width: <h:inputText value="#{data.width}" required="true"/>
+ Height: <h:inputText value="#{data.height}" required="true"/>
+ </h:panelGrid>
+ <a4j:mediaOutput mimeType="image/jpeg" createContent="#{media.paint}" session="true" value="#{data}"
+ cacheable="false" uriAttribute="src" element="img" style="width:#{data.width};height:#{data.height}"/>
+ <h:messages/>
+ <h:commandButton value="Paint" />
+ </h:form>
+ </f:view>
+ </body>
+
+</html>
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/webapp/pages/mediaOutput.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 4 months
JBoss Rich Faces SVN: r2746 - trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common.
by richfaces-svn-commits@lists.jboss.org
Author: ishabalov
Date: 2007-09-04 17:15:09 -0400 (Tue, 04 Sep 2007)
New Revision: 2746
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
Log:
Sticky current component.
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2007-09-04 19:13:37 UTC (rev 2745)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2007-09-04 21:15:09 UTC (rev 2746)
@@ -16,6 +16,7 @@
import javax.servlet.http.HttpServletRequest;
public class ComponentNavigator {
+ private String lastCompId = null;
private List components = null;
private ComponentDescriptor currentComponent;
private List componentGroups = null;
@@ -35,6 +36,9 @@
String id = getComponentParam();
if (id!=null) {
setCurrentComponent(findComponentById(id));
+ lastCompId = id;
+ } else if (lastCompId!=null) {
+ setCurrentComponent(findComponentById(lastCompId));
} else {
String uri = getComponentUri();
setCurrentComponent(findComponentByUri(uri));
17 years, 4 months