JBoss Rich Faces SVN: r2005 - in trunk/ui/gmap/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-08-02 09:16:21 -0400 (Thu, 02 Aug 2007)
New Revision: 2005
Modified:
trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js
trunk/ui/gmap/src/main/templates/gmap.jspx
Log:
http://jira.jboss.com/jira/browse/RF-530
Modified: trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js
===================================================================
--- trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js 2007-08-02 11:52:49 UTC (rev 2004)
+++ trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js 2007-08-02 13:16:21 UTC (rev 2005)
@@ -1,11 +1,11 @@
function __addLoadEvent(func) {
-Event.observe(window, "load", func );
+Event.observe(window, "load", func );
}
+function __addUnLoadEvent(func) {
+Event.observe(window, "unload", func );
+}
-
-
-
function __initGmapdiv(mapVar, clid,warningMessage ) {
var mapdiv = document.getElementById(clid);
if (GBrowserIsCompatible()) {
@@ -23,7 +23,7 @@
window[gmapVar].setCenter(new GLatLng(lat, lng), zoom, mapType);
-if (enableDragging)
+if (enableDragging)
window[gmapVar].enableDragging();
else
window[gmapVar].disableDragging();
Modified: trunk/ui/gmap/src/main/templates/gmap.jspx
===================================================================
--- trunk/ui/gmap/src/main/templates/gmap.jspx 2007-08-02 11:52:49 UTC (rev 2004)
+++ trunk/ui/gmap/src/main/templates/gmap.jspx 2007-08-02 13:16:21 UTC (rev 2005)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
xmlns:ui=" http://ajax4jsf.org/cdk/ui"
xmlns:u=" http://ajax4jsf.org/cdk/u"
xmlns:x=" http://ajax4jsf.org/cdk/x"
@@ -9,8 +9,8 @@
baseclass="org.ajax4jsf.renderkit.HeaderResourcesRendererBase"
component="org.richfaces.component.UIGmap">
<f:clientid var="clientId"/>
-
+
<c:set var="key" value="#{component.attributes['gmapKey']}"/>
<c:set var="zoom" value="#{component.attributes['zoom']}"/>
<c:set var="map" value="#{component.attributes['gmapVar']}"/>
@@ -33,12 +33,12 @@
x:passThruWithExclusions="id, styleClass"
>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=#{key}" />
-<script type="text/javascript">
+<script type="text/javascript">
//<![CDATA[
function __initGMap() { __initGmapdiv("#{map}","#{clientId}", "#{warningMessage}");
__applyGmapparam("#{map}",#{lat}, #{lng},#{zoom},#{mapType},#{enableDragging},#{enableInfoWindow},#{enableDoubleClickZoom},#{enableContinuousZoom},#{isGMapType},#{isGScale},#{isGLarge});
- var userfunc = new Function('event', '#{oninit}'); userfunc();};__addLoadEvent(__initGMap);
+ var userfunc = new Function('event', '#{oninit}'); userfunc();};__addLoadEvent(__initGMap);__addUnLoadEvent(GUnload);
//]]>
</script>
</div>
16 years, 8 months
JBoss Rich Faces SVN: r2004 - trunk/samples/inputNumberSliderDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-08-02 07:52:49 -0400 (Thu, 02 Aug 2007)
New Revision: 2004
Modified:
trunk/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-455
Modified: trunk/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp 2007-08-02 11:52:18 UTC (rev 2003)
+++ trunk/samples/inputNumberSliderDemo/src/main/webapp/pages/index.jsp 2007-08-02 11:52:49 UTC (rev 2004)
@@ -82,7 +82,7 @@
<br/>
</f:verbatim>
- <rich:inputNumberSlider id="SliderId" showInput="#{bean.showInput}" showBoundaryValues="#{bean.showBoundaryValues}"
+ <rich:inputNumberSlider id="SliderId" inputPosition="left" showInput="#{bean.showInput}" showBoundaryValues="#{bean.showBoundaryValues}"
showToolTip="true" disabled="#{bean.disabled}"
value="1.4" step="0.1" minValue="1.2"
maxValue="2.2"/>
16 years, 8 months
JBoss Rich Faces SVN: r2003 - in trunk/ui/inputnumber-slider/src/main: resources/org/richfaces/renderkit/html/css and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-08-02 07:52:18 -0400 (Thu, 02 Aug 2007)
New Revision: 2003
Modified:
trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
Log:
http://jira.jboss.com/jira/browse/RF-455
Modified: trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-08-02 08:43:27 UTC (rev 2002)
+++ trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-08-02 11:52:18 UTC (rev 2003)
@@ -216,8 +216,14 @@
<description>
A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator
</description>
- </property>
- &ui_component_attributes;
+ </property>
+ <property>
+ <name>inputPosition</name>
+ <classname>java.lang.String</classname>
+ <description>If "right" the InputText Box would be rendered on the right side of the ruler</description>
+ <defaultvalue><![CDATA["right"]]></defaultvalue>
+ </property>
+ &ui_component_attributes;
&html_input_attributes;
&html_input_events;
&ui_input_attributes;
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2007-08-02 08:43:27 UTC (rev 2002)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss 2007-08-02 11:52:18 UTC (rev 2003)
@@ -65,11 +65,19 @@
.dr-insldr-field {
border: 1px solid;
padding: 0px 0px 0px 3px;
- margin: 0px 0px 0px 10px;
+ margin-top: 0px;
+ margin-bottom: 0px;
background-position: left top;
background-repeat: repeat-x;
}
- ]]>
+.dr-insldr-field-left {
+ margin-right: 10px;
+}
+.dr-insldr-field-right {
+ margin-left: 10px;
+}
+
+ ]]>
</f:verbatim>
<u:selector name=".dr-insldr-tip">
@@ -105,7 +113,7 @@
<u:selector name=".dr-insldr-track-decor-1">
<u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
-
+
<u:selector name=".dr-insldr-handler">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.SliderArrowImage" />
Modified: trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
===================================================================
--- trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-08-02 08:43:27 UTC (rev 2002)
+++ trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-08-02 11:52:18 UTC (rev 2003)
@@ -17,11 +17,69 @@
<f:resource name="org.richfaces.renderkit.html.images.SliderArrowImage" var="arrow" />
<f:resource name="org.richfaces.renderkit.html.images.SliderArrowSelectedImage" var="arrowSelected" />
- <table id="#{clientId}" border="0" cellpadding="0" cellspacing="0" class="rich-slider #{component.attributes['styleClass']}"
+ <jsp:scriptlet><![CDATA[
+ String inputPosition = (String)component.getAttributes().get("inputPosition");
+
+ boolean disabled = attributeToBoolean(component, "disabled");
+ boolean showInput = attributeToBoolean(component, "showInput");
+ boolean manualInput = attributeToBoolean(component, "enableManualInput");
+
+ variables.setVariable("inputReadOnly",new Boolean(!manualInput));
+ variables.setVariable("inputDisabled",new Boolean(disabled));
+
+ if (!manualInput || disabled){
+ variables.setVariable("color", "color: gray;");
+ }
+ else{
+ variables.setVariable("color", "");
+ }
+
+ variables.setVariable("inputSize", component.getAttributes().get("inputSize"));
+ ]]></jsp:scriptlet>
+
+ <table id="#{clientId}" border="0" cellpadding="0" cellspacing="0" class="rich-slider #{component.attributes['styleClass']}"
style="width:#{component.attributes['width']};#{component.attributes['style']}" x:passThruWithExclusions="id,boundClass,tipClass">
<tbody>
<tr>
- <td class="dr-insldr-left-num rich-inslider-left-num #{component.attributes['boundClass']}">
+ <jsp:scriptlet><![CDATA[
+ if ("left".equalsIgnoreCase(inputPosition)) {
+ ]]></jsp:scriptlet>
+ <td rowspan="2" style="text-align: right; vertical-align: bottom">
+ <jsp:scriptlet><![CDATA[
+ if (showInput) {
+ ]]></jsp:scriptlet>
+ <input id="#{clientId}Input"
+ name="#{clientId}"
+ value="#{this:getInputValue(context,component)}"
+ type="text"
+ class="dr-insldr-field dr-insldr-field-left rich-inslider-field #{component.attributes['inputClass']}"
+ style="#{component.attributes['inputStyle']}; #{color}"
+ readonly="#{inputReadOnly}"
+ disabled="#{disabled}"
+ onselect="#{component.attributes['onselect']}"
+ onfocus="#{component.attributes['onfocus']}"
+ onblur="#{component.attributes['onblur']}"
+ accesskey="#{component.attributes['accesskey']}"
+ size="#{inputSize}"
+ maxlength="#{component.attributes['maxlength']}"
+ />
+ <jsp:scriptlet><![CDATA[
+ } else {
+ ]]></jsp:scriptlet>
+ <input id="#{clientId}Input"
+ name="#{clientId}"
+ value="#{this:getInputValue(context,component)}"
+ type="hidden"
+ />
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
+
+ <td class="dr-insldr-left-num rich-inslider-left-num #{component.attributes['boundClass']}">
<jsp:scriptlet><![CDATA[
if (attributeToBoolean(component, "showBoundaryValues")){
]]></jsp:scriptlet>
@@ -39,32 +97,19 @@
}
]]></jsp:scriptlet>
</td>
- <td rowspan="2" style="vertical-align : bottom">
+
+ <jsp:scriptlet><![CDATA[
+ if ("right".equalsIgnoreCase(inputPosition)) {
+ ]]></jsp:scriptlet>
+ <td rowspan="2" style="text-align: left; vertical-align: bottom">
<jsp:scriptlet><![CDATA[
- boolean disabled = attributeToBoolean(component, "disabled");
- boolean showInput = attributeToBoolean(component, "showInput");
- boolean manualInput = attributeToBoolean(component, "enableManualInput");
-
- variables.setVariable("inputReadOnly",new Boolean(!manualInput));
- variables.setVariable("inputDisabled",new Boolean(disabled));
-
- if (!manualInput || disabled){
- variables.setVariable("color", "color: gray;");
- }
- else{
- variables.setVariable("color", "");
- }
-
- variables.setVariable("inputSize", component.getAttributes().get("inputSize"));
-
- //if (showInput || manualInput) {
- if (showInput) {
+ if (showInput) {
]]></jsp:scriptlet>
<input id="#{clientId}Input"
name="#{clientId}"
value="#{this:getInputValue(context,component)}"
type="text"
- class="dr-insldr-field rich-inslider-field #{component.attributes['inputClass']}"
+ class="dr-insldr-field dr-insldr-field-right rich-inslider-field #{component.attributes['inputClass']}"
style="#{component.attributes['inputStyle']}; #{color}"
readonly="#{inputReadOnly}"
disabled="#{disabled}"
@@ -84,10 +129,13 @@
type="hidden"
/>
<jsp:scriptlet><![CDATA[
- }
+ }
]]></jsp:scriptlet>
</td>
- </tr>
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
+ </tr>
<tr>
<td colspan="2" class="dr-insldr-size dr-insldr-vert-spacer">
<table border="0" cellpadding="0" cellspacing="0" class="dr-insldr-size">
16 years, 8 months
JBoss Rich Faces SVN: r2002 - trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-08-02 04:43:27 -0400 (Thu, 02 Aug 2007)
New Revision: 2002
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-528
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-08-02 03:14:49 UTC (rev 2001)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-08-02 08:43:27 UTC (rev 2002)
@@ -92,10 +92,10 @@
this.onScrollListener = this.onScroll.bindAsEventListener(this);
- if (options.popupClass)
+ if (options.popupClass)
Element.addClassName(document.getElementsByClassName("dr-sb-ext-decor-3",
this.update)[0], options.popupClass);
-
+
this.onNothingLabelClick = this.hideNLabel.bindAsEventListener(this);
},
@@ -164,7 +164,7 @@
if (Element.getStyle(this.update, 'display')
== 'none') this.options.onShow(this.element, this.update, this.options);
this.disableSubmit();
-
+
},
hide: function() {
@@ -182,7 +182,7 @@
this.hasFocus = false;
this.active = false;
},
-
+
hideNLabel: function(event) {
var nothingLabel = $(this.update.id + "NothingLabel");
if (nothingLabel) {
@@ -283,7 +283,7 @@
this.prevOnKeyPress = this.element.onkeypress;
this.element.onkeypress
= this.onBoxKeyPress.bindAsEventListener(this);
- }
+ }
return;
case 34:
this.keyEvent = true;
@@ -296,7 +296,7 @@
this.prevOnKeyPress = this.element.onkeypress;
this.element.onkeypress
= this.onBoxKeyPress.bindAsEventListener(this);
- }
+ }
return;
}
} else if (event.keyCode == Event.KEY_TAB
@@ -430,9 +430,9 @@
var entry = this.getEntry(this.index);
var scroll = document.getElementsByClassName("_suggestion_size_", this.update)[0]
|| this.update;
-
+
var entryPosition = this.calcEntryPosition(entry,scroll);
-
+
var countAll = Math.round(scroll.clientHeight/entryPosition.entryOffsetHeight);
var current = Math.round((entryPosition.realOffset-scroll.scrollTop)/entryPosition.entryOffsetHeight);
return {current:current,all:countAll};
@@ -446,17 +446,17 @@
var entry = this.getEntry(this.index);
for (var i = 0; i < this.options.selectedClasses.length; i++)
Element.addClassName(entry, this.options.selectedClasses[i]);
-
+
var cells = document.getElementsByClassName("dr-sb-cell-padding" , entry);
for (var i = 0; i < cells.length; i++) {
Element.addClassName(cells[i], this.options.selectValueClass);
}
-
+
// Calc scroll position :
if (this.keyEvent) {
var scroll = document.getElementsByClassName("_suggestion_size_", this.update)[0]
|| this.update;
-
+
var entryPosition = this.calcEntryPosition(entry,scroll);
var oldScrollTop = scroll.scrollTop;
@@ -483,9 +483,9 @@
}
}
}
-
+
this.prevIndex = this.index;
- if (this.hasFocus) {
+ if (this.hasFocus && !this.wasBlur) {
this.show();
this.active = true;
}
16 years, 8 months
JBoss Rich Faces SVN: r2001 - trunk/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ishabalov
Date: 2007-08-01 23:14:49 -0400 (Wed, 01 Aug 2007)
New Revision: 2001
Modified:
trunk/samples/pom.xml
Log:
Added sample for local value
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-08-02 03:10:37 UTC (rev 2000)
+++ trunk/samples/pom.xml 2007-08-02 03:14:49 UTC (rev 2001)
@@ -438,6 +438,7 @@
<module>tooltip-sample</module>
<module>calendar-sample</module>
<module>treeModelDemo</module>
+ <module>local-value-demo</module>
<!--
<module>ajaxPortlet</module>
-->
16 years, 8 months
JBoss Rich Faces SVN: r2000 - in trunk/samples: local-value-demo and 13 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ishabalov
Date: 2007-08-01 23:10:37 -0400 (Wed, 01 Aug 2007)
New Revision: 2000
Added:
trunk/samples/local-value-demo/
trunk/samples/local-value-demo/pom.xml
trunk/samples/local-value-demo/src/
trunk/samples/local-value-demo/src/main/
trunk/samples/local-value-demo/src/main/java/
trunk/samples/local-value-demo/src/main/java/org/
trunk/samples/local-value-demo/src/main/java/org/richfaces/
trunk/samples/local-value-demo/src/main/java/org/richfaces/demo/
trunk/samples/local-value-demo/src/main/java/org/richfaces/demo/localvalue/
trunk/samples/local-value-demo/src/main/java/org/richfaces/demo/localvalue/Data.java
trunk/samples/local-value-demo/src/main/resources/
trunk/samples/local-value-demo/src/main/webapp/
trunk/samples/local-value-demo/src/main/webapp/META-INF/
trunk/samples/local-value-demo/src/main/webapp/META-INF/MANIFEST.MF
trunk/samples/local-value-demo/src/main/webapp/WEB-INF/
trunk/samples/local-value-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/local-value-demo/src/main/webapp/WEB-INF/lib/
trunk/samples/local-value-demo/src/main/webapp/WEB-INF/web.xml
trunk/samples/local-value-demo/src/main/webapp/css/
trunk/samples/local-value-demo/src/main/webapp/css/common.css
trunk/samples/local-value-demo/src/main/webapp/images/
trunk/samples/local-value-demo/src/main/webapp/index.jsp
trunk/samples/local-value-demo/src/main/webapp/pages/
trunk/samples/local-value-demo/src/main/webapp/pages/local-value-demo.xhtml
trunk/samples/local-value-demo/src/test/
trunk/samples/local-value-demo/src/test/java/
Log:
Added sample for local value
Property changes on: trunk/samples/local-value-demo
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.classpath
.project
Added: trunk/samples/local-value-demo/pom.xml
===================================================================
--- trunk/samples/local-value-demo/pom.xml (rev 0)
+++ trunk/samples/local-value-demo/pom.xml 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,22 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>local-value-demo</artifactId>
+ <packaging>war</packaging>
+ <name>local-value-demo Maven Webapp</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>local-value-demo</finalName>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/samples/local-value-demo/src/main/java/org/richfaces/demo/localvalue/Data.java
===================================================================
--- trunk/samples/local-value-demo/src/main/java/org/richfaces/demo/localvalue/Data.java (rev 0)
+++ trunk/samples/local-value-demo/src/main/java/org/richfaces/demo/localvalue/Data.java 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,44 @@
+package org.richfaces.demo.localvalue;
+
+import javax.faces.component.UIInput;
+
+public class Data {
+ private UIInput component;
+ private String creditCard;
+ private String myCreadtCard = "1234567887654321";
+ private String myCreditCardName = "Visa";
+ public String getMyCreditCardName() {
+ return myCreditCardName;
+ }
+ public void setMyCreditCardName(String myCreditCardName) {
+ this.myCreditCardName = myCreditCardName;
+ }
+ public UIInput getComponent() {
+ return component;
+ }
+ public void setComponent(UIInput component) {
+ this.component = component;
+ }
+ public String getCreditCard() {
+ return creditCard;
+ }
+ public void setCreditCard(String creditCard) {
+ this.creditCard = creditCard;
+ }
+ public String getMyCreadtCard() {
+ return myCreadtCard;
+ }
+ public void setMyCreadtCard(String myCreadtCard) {
+ this.myCreadtCard = myCreadtCard;
+ }
+ public String useMyCreditCard_incorrect() {
+ setCreditCard(getMyCreadtCard());
+ return null;
+ }
+ public String useMyCreditCard_correct() {
+ setCreditCard(getMyCreadtCard());
+ getComponent().setSubmittedValue(null);
+ getComponent().setValue(null);
+ return null;
+ }
+}
Added: trunk/samples/local-value-demo/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/samples/local-value-demo/src/main/webapp/META-INF/MANIFEST.MF (rev 0)
+++ trunk/samples/local-value-demo/src/main/webapp/META-INF/MANIFEST.MF 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/samples/local-value-demo/src/main/webapp/WEB-INF
___________________________________________________________________
Name: svn:ignore
+ .faces-config.xml.jsfdia
Added: trunk/samples/local-value-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/local-value-demo/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ trunk/samples/local-value-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>data</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.localvalue.Data</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Added: trunk/samples/local-value-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/local-value-demo/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/samples/local-value-demo/src/main/webapp/WEB-INF/web.xml 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" 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">
+ <description>Local Value demo</description>
+ <display-name>local-value-demo</display-name>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+ <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.COMPRESS_SCRIPT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.FastFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <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>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/samples/local-value-demo/src/main/webapp/css/common.css
===================================================================
--- trunk/samples/local-value-demo/src/main/webapp/css/common.css (rev 0)
+++ trunk/samples/local-value-demo/src/main/webapp/css/common.css 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,66 @@
+.samples {
+ vertical-align: top;
+}
+.source {
+ text-align: left;
+ font-family: monospace;
+ font-size: 12px;
+ font-weight: normal;
+ border-width: 1px;
+ border-style: solid;
+ margin-left: 30px;
+ margin-right: 30px;
+ padding: 10px;
+ background-color: #FFFF92;
+ border-color: #A7A700;
+}
+.legend {
+ text-align: justify;
+ font-family: Arial;
+ font-weight: normal;
+ font-size: 12px;
+ vertical-align: top;
+ padding-left: 20px;
+ padding-top: 0px;
+}
+.legend H3 {
+ text-decoration: underline;
+}
+
+.sample-panel {
+ width:500px;
+ height:150px
+}
+.grid {
+ width: 100%;
+}
+.formLeft {
+ padding-bottom: 5px;
+ padding-top: 5px;
+ padding-right: 5px;
+ font-size: 12px;
+ text-align: right;
+ width: 250px;
+}
+.formRight {
+ text-align: left;
+}
+.input {
+ font-size: 12px;
+ font-weight: bold;
+ border: none;
+ border-bottom-width: 2px;
+ border-bottom-style: solid;
+ font-family: Arial;
+}
+.output {
+ font-size: 12px;
+ font-weight: bold;
+ font-family: Arial;
+}
+.command {
+ text-decoration: none;
+ font-size: 12px;
+ font-weight: bold;
+ cursor: pointer;
+}
Added: trunk/samples/local-value-demo/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/local-value-demo/src/main/webapp/index.jsp (rev 0)
+++ trunk/samples/local-value-demo/src/main/webapp/index.jsp 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="/pages/local-value-demo.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: trunk/samples/local-value-demo/src/main/webapp/pages/local-value-demo.xhtml
===================================================================
--- trunk/samples/local-value-demo/src/main/webapp/pages/local-value-demo.xhtml (rev 0)
+++ trunk/samples/local-value-demo/src/main/webapp/pages/local-value-demo.xhtml 2007-08-02 03:10:37 UTC (rev 2000)
@@ -0,0 +1,131 @@
+<!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.ajax4jsf.org/rich">
+
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8"/>
+<title>
+ Local Value demo
+</title>
+<style type="text/css">
+.input {
+ border-bottom-color: #{a4jSkin.panelBorderColor};
+}
+</style>
+</head>
+<body>
+<a4j:loadStyle src="/css/common.css" />
+<span style="display:none">${a4j.version}</span>
+<h:panelGrid columns="2" columnClasses="samples,legend">
+<h:panelGroup>
+<rich:panel id="bad" styleClass="sample-panel">
+ <f:facet name="header">
+ Example of INCORRECT approach to the problem
+ </f:facet>
+ <h:form>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:message for="bad_input" />
+ </a4j:outputPanel>
+ <h:panelGrid columns="2" styleClass="grid" columnClasses="formLeft,formRight">
+ <h:outputText value="Enter credit card number:"/>
+ <h:inputText id="bad_input" value="#{data.creditCard}" styleClass="input"/>
+ <h:outputText value="Or use your pre-defined credit card:"/>
+ <a4j:commandLink immediate="true" action="#{data.useMyCreditCard_incorrect}" reRender="bad" styleClass="command" value="#{data.myCreditCardName}"/>
+ <h:outputText value="Your entered credit card number:"/>
+ <h:outputText value="#{data.creditCard}" styleClass="output"/>
+ </h:panelGrid>
+ </h:form>
+</rich:panel>
+<rich:spacer height="5px"/>
+<rich:panel id="good" styleClass="sample-panel">
+ <f:facet name="header">
+ Example of CORRECT approach to the problem
+ </f:facet>
+ <h:form>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:message for="good_input" />
+ </a4j:outputPanel>
+ <h:panelGrid columns="2" columnClasses="formLeft,formRight">
+ <h:outputText value="Enter credit card number:"/>
+ <h:inputText id="good_input" value="#{data.creditCard}" binding="#{data.component}" styleClass="input"/>
+ <h:outputText value="Or use your pre-defined credit card:"/>
+ <a4j:commandLink immediate="true" action="#{data.useMyCreditCard_correct}" reRender="good" styleClass="command" value="#{data.myCreditCardName}"/>
+ <h:outputText value="Your entered credit card number:"/>
+ <h:outputText value="#{data.creditCard}" styleClass="output"/>
+ </h:panelGrid>
+ </h:form>
+</rich:panel>
+</h:panelGroup>
+<h:panelGroup styleClass="legend">
+<h3>Use case</h3>
+<p>
+I have an input field where I can enter Credit Card Number. At the same time I have some pre-defined CC in a system, which I can choose. When I click on command link with id of pre-defined CC, it value propagated to input.
+</p>
+<h3>Simple solution</h3>
+<p>
+So my first solution is simple. The idea is to have an action behind command link and assign pre-defined value to CC Number.
+</p>
+<h3>Page Sources</h3>
+<p class="source">
+<h:outputText value="Enter credit card number:"/><br/>
+<h:inputText value="+{data.creditCard}"/><br/>
+<h:outputText value="Or use your pre-defined credit card:"/><br/>
+<a4j:commandLink immediate="true" action="+{data.useMyCreditCard}" reRender="..." value="+{data.myCreditCardName}"/><br/>
+<h:outputText value="Your entered credit card number:"/><br/>
+<h:outputText value="+{data.creditCard}" styleClass="output"/><br/>
+</p>
+<h3>Bean Source (getters/setters removed)</h3>
+<p class="source">
+public String useMyCreditCard() {<br/>
+<rich:spacer width="20px"/>setCreditCard(getMyCreadtCard());<br/>
+<rich:spacer width="20px"/>return null;<br/>
+}<br/>
+</p>
+</h:panelGroup>
+</h:panelGrid>
+<h:panelGroup styleClass="legend">
+<h3>Problem</h3>
+<p>
+However, soon I discover that my simple solution does not works. The reason is simple: inputText is a little bit more complicated than you think. In addition to value binding it has two more values inside: submittedValue and localValue. Both are used during a request processing. The goal is simple – whenever feasible inputText display value that was entered by user, not value from model. The most obvious case – when validation error occurs. The general rule is – submitted value is what come from http request. After conversion and validation submittedValue is cleared and localValue assigned. After update model localValue is cleared also. During rendering component looks for submittedValue first, if any exists, than it used for rendering. If no submittedValue present – that localValue will be considered. If no localValue exists – than value binding will be evaluated to obtain value from model.
+</p>
+<p>
+So, valid solution is simple – you need to reset submitted and local value in component. There are many different ways to do so. In my example I'm using the most straightforward approach – use component binding and API to reset values.
+</p>
+<h3>Valid Page Sources</h3>
+<p class="source">
+<h:outputText <b>binding="+{data.component}"</b> value="Enter credit card number:"/><br/>
+<h:inputText value="+{data.creditCard}"/><br/>
+<h:outputText value="Or use your pre-defined credit card:"/><br/>
+<a4j:commandLink immediate="true" action="+{data.useMyCreditCard}" reRender="..." value="+{data.myCreditCardName}"/><br/>
+<h:outputText value="Your entered credit card number:"/><br/>
+<h:outputText value="+{data.creditCard}" styleClass="output"/><br/>
+</p>
+<h3>Valid Bean Source (getters/setters removed)</h3>
+<p class="source">
+public String useMyCreditCard() {<br/>
+<rich:spacer width="20px"/>setCreditCard(getMyCreadtCard());<br/>
+<b>
+<rich:spacer width="20px"/>getComponent().setSubmittedValue(null);<br/>
+<rich:spacer width="20px"/>getComponent().setValue(null); //This is actually the local value!<br/>
+</b>
+<rich:spacer width="20px"/>return null;<br/>
+}<br/>
+</p>
+<h3>Success</h3>
+<p>
+Hopefully now my solution works!
+</p>
+<h3>Conclusion</h3>
+<p>
+You need to be careful with input components. In some cases you have to be aware of their complex internal structures.
+</p>
+<p>
+My example is based on <b>JSF 1.2 RI</b> and <b>Facelets</b>. You can download it from <a href="#">here</a>.
+</p>
+</h:panelGroup>
+</body>
+</html>
16 years, 8 months
JBoss Rich Faces SVN: r1999 - in trunk/samples/seamIntegration: src/main/java/org/ajax4jsf and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-08-01 21:22:29 -0400 (Wed, 01 Aug 2007)
New Revision: 1999
Added:
trunk/samples/seamIntegration/hibernate-console.properties
trunk/samples/seamIntegration/seamIntegration.launch
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Authenticator.java
trunk/samples/seamIntegration/src/main/resources/META-INF/
trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml
trunk/samples/seamIntegration/src/main/resources/import.sql
trunk/samples/seamIntegration/src/main/resources/messages_en.properties
trunk/samples/seamIntegration/src/main/resources/seam.properties
trunk/samples/seamIntegration/src/main/resources/seamIntegration-ds.xml
trunk/samples/seamIntegration/src/main/resources/security.drl
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/jboss-web.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml
trunk/samples/seamIntegration/src/main/webapp/error.xhtml
trunk/samples/seamIntegration/src/main/webapp/home.xhtml
trunk/samples/seamIntegration/src/main/webapp/img/
trunk/samples/seamIntegration/src/main/webapp/img/cal-next.png
trunk/samples/seamIntegration/src/main/webapp/img/cal-prev.png
trunk/samples/seamIntegration/src/main/webapp/img/dtpick.gif
trunk/samples/seamIntegration/src/main/webapp/index.html
trunk/samples/seamIntegration/src/main/webapp/layout/
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
trunk/samples/seamIntegration/src/main/webapp/stylesheet/
trunk/samples/seamIntegration/src/main/webapp/stylesheet/theme.css
Removed:
trunk/samples/seamIntegration/src/main/resources/import.sql
trunk/samples/seamIntegration/src/main/resources/seam.properties
Modified:
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
Log:
extend seam sample
Added: trunk/samples/seamIntegration/hibernate-console.properties
===================================================================
--- trunk/samples/seamIntegration/hibernate-console.properties (rev 0)
+++ trunk/samples/seamIntegration/hibernate-console.properties 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,10 @@
+#File used by hibernate tools to override <datasource> and other container specific settings in persistence.xml
+hibernate.connection.password=password
+hibernate.connection.username=username
+hibernate.connection.driver_class=org.hsqldb.jdbcDriver
+hibernate.dialect=org.hibernate.dialect.HSQLDialect
+hibernate.connection.url=jdbc:hsqldb:hsql://host
+
+hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider
+hibernate.datasource=
+hibernate.transaction.manager_lookup_class=
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/hibernate-console.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/seamIntegration.launch
===================================================================
--- trunk/samples/seamIntegration/seamIntegration.launch (rev 0)
+++ trunk/samples/seamIntegration/seamIntegration.launch 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Hibernate Console launch configuration -->
+<launchConfiguration type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="seamIntegration"/>
+<stringAttribute key="org.hibernate.eclipse.launch.PROPERTY_FILE" value="/seamIntegration/hibernate-console.properties"/>
+<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="JPA"/>
+</launchConfiguration>
Property changes on: trunk/samples/seamIntegration/seamIntegration.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Authenticator.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Authenticator.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Authenticator.java 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,26 @@
+package org.ajax4jsf;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+
+
+@Name("authenticator")
+public class Authenticator
+{
+ @Logger Log log;
+
+ @In Identity identity;
+
+ public boolean authenticate()
+ {
+ log.info("authenticating #0", identity.getUsername());
+ //write your authentication logic here,
+ //return true if the authentication was
+ //successful, false otherwise
+ identity.addRole("admin");
+ return true;
+ }
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Authenticator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml (rev 0)
+++ trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="seamIntegration" transaction-type="JTA">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/seamIntegrationDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="${hibernate.hbm2ddl.auto}"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ </properties>
+ </persistence-unit>
+
+</persistence>
Property changes on: trunk/samples/seamIntegration/src/main/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/samples/seamIntegration/src/main/resources/import.sql
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/import.sql 2007-08-02 00:30:50 UTC (rev 1998)
+++ trunk/samples/seamIntegration/src/main/resources/import.sql 2007-08-02 01:22:29 UTC (rev 1999)
@@ -1,22 +0,0 @@
-insert into Customer (username, password, name) values ('gavin', 'foobar', 'Gavin King')
-insert into Customer (username, password, name) values ('demo', 'demo', 'Demo User')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 450, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (4, 450, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (5, 250, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (6, 300, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 160, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (15, 130, 'Hotel Beaulac', ' Esplanade L�opold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (16, 140, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (17, 230, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 250, 'Meli� White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
Added: trunk/samples/seamIntegration/src/main/resources/import.sql
===================================================================
Added: trunk/samples/seamIntegration/src/main/resources/messages_en.properties
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/messages_en.properties (rev 0)
+++ trunk/samples/seamIntegration/src/main/resources/messages_en.properties 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,90 @@
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validation failed
+validator.assertTrue=validation failed
+validator.future=must be a future date
+validator.length=length must be between {min} and {max}
+validator.max=must be less than or equal to {value}
+validator.min=must be greater than or equal to {value}
+validator.notNull=may not be null
+validator.past=must be a past date
+validator.pattern=must match "{regex}"
+validator.range=must be between {min} and {max}
+validator.size=size must be between {min} and {max}
+validator.email=must be a well-formed email address
+
+org.jboss.seam.loginFailed=Login failed
+org.jboss.seam.loginSuccessful=Welcome, #0
+
+org.jboss.seam.TransactionFailed=Transaction failed
+org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request
+org.jboss.seam.IllegalNavigation=Illegal navigation
+org.jboss.seam.ProcessEnded=Process #0 already ended
+org.jboss.seam.ProcessNotFound=Process #0 not found
+org.jboss.seam.TaskEnded=Task #0 already ended
+org.jboss.seam.TaskNotFound=Task #0 not found
+org.jboss.seam.NotLoggedIn=Please log in first
+
+javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type
+javax.faces.component.UIInput.REQUIRED=value is required
+javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information
+javax.faces.component.UISelectOne.INVALID=value is not valid
+javax.faces.component.UISelectMany.INVALID=value is not valid
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits
+javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false)
+javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255
+javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255
+javax.faces.converter.CharacterConverter.CHARACTER=value must be a character
+javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character
+javax.faces.converter.DateTimeConverter.DATE=value must be a date
+javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1}
+javax.faces.converter.DateTimeConverter.TIME=value must be a time
+javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time
+javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value
+javax.faces.converter.DoubleConverter.DOUBLE=value must be a number
+javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum
+javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.FloatConverter.FLOAT=value must be a number
+javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=value must be an integer
+javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647
+javax.faces.converter.LongConverter.LONG=value must be an integer
+javax.faces.converter.LongConverter.LONG_detail=must be an integer number between -9223372036854775808 and 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount
+javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1}
+javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount
+javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1}
+javax.faces.converter.NumberConverter.NUMBER=value must be a number
+javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number
+javax.faces.converter.NumberConverter.PATTERN=value must be a number
+javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number
+javax.faces.converter.ShortConverter.SHORT=value must be an integer
+javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type
+javax.faces.validator.LengthValidator.MAXIMUM=value is must be shorter than or equal to {0} characters
+javax.faces.validator.LengthValidator.MINIMUM=value is must be longer than or equal to {0} characters
+javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type
+
+javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.converter.STRING=value could not be converted to a string
+
Property changes on: trunk/samples/seamIntegration/src/main/resources/messages_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/samples/seamIntegration/src/main/resources/seam.properties
===================================================================
Added: trunk/samples/seamIntegration/src/main/resources/seam.properties
===================================================================
Property changes on: trunk/samples/seamIntegration/src/main/resources/seam.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/resources/seamIntegration-ds.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/seamIntegration-ds.xml (rev 0)
+++ trunk/samples/seamIntegration/src/main/resources/seamIntegration-ds.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>seamIntegrationDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:hsql://host</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>username</user-name>
+ <password>password</password>
+<!--
+ <exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+ </exception-sorter-class-name>
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+-->
+ </local-tx-datasource>
+
+</datasources>
+
Property changes on: trunk/samples/seamIntegration/src/main/resources/seamIntegration-ds.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/resources/security.drl
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/security.drl (rev 0)
+++ trunk/samples/seamIntegration/src/main/resources/security.drl 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,6 @@
+package Permissions;
+
+import java.security.Principal;
+
+import org.jboss.seam.security.PermissionCheck;
+import org.jboss.seam.security.Role;
\ No newline at end of file
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-08-02 00:30:50 UTC (rev 1998)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -1,35 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
- xmlns:core="http://jboss.com/products/seam/core"
- xmlns:persistence="http://jboss.com/products/seam/persistence"
- xmlns:transaction="http://jboss.com/products/seam/transaction"
- xmlns:security="http://jboss.com/products/seam/security"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
- http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:persistence="http://jboss.com/products/seam/persistence"
+ xmlns:drools="http://jboss.com/products/seam/drools"
+ xmlns:bpm="http://jboss.com/products/seam/bpm"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:mail="http://jboss.com/products/seam/mail"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
+ http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
+ http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
+ http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
- http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
+ http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
+ <core:init debug="@debug@" jndi-pattern="seamIntegration/#{ejbName}/local"/>
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"/>
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+ entity-manager-factory="#{seamIntegrationEntityManagerFactory}"/>
- <core:init debug="false" />
+ <persistence:entity-manager-factory name="seamIntegrationEntityManagerFactory"
+ persistence-unit-name="seamIntegration"/>
+
+ <drools:rule-base name="securityRules">
+ <drools:rule-files><value>/security.drl</value></drools:rule-files>
+ </drools:rule-base>
-
- <core:manager conversation-timeout="120000"
- concurrent-request-timeout="500" conversation-id-parameter="cid" />
-
- <!--
-
- <core:microcontainer installed="false" />
- <persistence:hibernate-session-factory name="hibernateSessionFactory"/>
-
- <persistence:managed-hibernate-session name="seamDatabase"
- session-factory="#{hibernateSessionFactory}"
- auto-create="true"/>
-
-
- <transaction:hibernate-transaction session="#{seamDatabase}"/>
-
-
- -->
+ <security:identity authenticate-method="#{authenticator.authenticate}"
+ security-rules="#{securityRules}"
+ remember-me="true"/>
+
+ <event type="org.jboss.seam.notLoggedIn">
+ <action expression="#{redirect.captureCurrentView}"/>
+ </event>
+ <event type="org.jboss.seam.postAuthenticate">
+ <action expression="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <mail:mail-session host="localhost" port="2525" username="test" password="test" />
+
+ <!-- For use with jBPM pageflow or process management -->
+ <!--
+ <bpm:jbpm>
+ <bpm:process-definitions></bpm:process-definitions>
+ <bpm:pageflow-definitions></bpm:pageflow-definitions>
+ </bpm:jbpm>
+ -->
+
</components>
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 00:30:50 UTC (rev 1998)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -1,14 +1,18 @@
-<?xml version="1.0"?>
-<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-<faces-config>
- <lifecycle>
- <phase-listener>
- org.jboss.seam.jsf.SeamPhaseListener
- </phase-listener>
- </lifecycle>
- <application>
- <!-- el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver-->
- </application>
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
-</faces-config>
+ <application>
+ <message-bundle>messages</message-bundle>
+ <locale-config>
+ <default-locale>en</default-locale>
+ </locale-config>
+ <!-- Disabled when using Ajax4JSF -->
+ <!--
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ -->
+ </application>
+
+</faces-config>
Added: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/jboss-web.xml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/jboss-web.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,12 @@
+ <!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
+
+<jboss-web>
+ <class-loading java2ClassLoadingCompliance="false">
+ <loader-repository>
+ seam.jboss.org:loader=seamIntegration
+ <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+ </loader-repository>
+ </class-loading>
+</jboss-web>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.EntityNotFoundException">
+ <redirect view-id="/error.xhtml">
+ <message>Not found</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.OptimisticLockException">
+ <end-conversation/>
+ <redirect view-id="/error.xhtml">
+ <message>Another user changed the same data, please try again</message>
+ </redirect>
+ </exception>
+
+ <exception class="org.jboss.seam.security.AuthorizationException">
+ <redirect>
+ <message>You don't have permission to do this</message>
+ </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">
+ <message>Unexpected error, please try again</message>
+ </redirect>
+ </exception>
+
+</pages>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/pages.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml 2007-08-02 00:30:50 UTC (rev 1998)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -1,84 +1,81 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" 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">
- <display-name>Archetype Created Web Application</display-name>
- <context-param>
- <param-name>facelets.REFRESH_PERIOD</param-name>
- <param-value>2</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.verifyObjects</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
- <context-param>
- <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
- <param-value>com.sun.facelets.FaceletViewHandler</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.VIEW_MAPPINGS</param-name>
- <param-value>*.xhtml</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>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>
- -->
- <!-- Seam -->
+<?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">
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
-
+ <!-- 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-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-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>/faces/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <login-config>
- <auth-method>BASIC</auth-method>
- </login-config>
+ <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>
+
</web-app>
Added: trunk/samples/seamIntegration/src/main/webapp/error.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/error.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/error.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,18 @@
+<!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"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h1>Error</h1>
+ <p>Something bad happened :-(</p>
+
+ <h:messages styleClass="message"/>
+
+</ui:define>
+</ui:composition>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/error.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/home.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/home.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/home.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,31 @@
+<!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.ajax4jsf.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>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/home.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/img/cal-next.png
===================================================================
(Binary files differ)
Property changes on: trunk/samples/seamIntegration/src/main/webapp/img/cal-next.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/seamIntegration/src/main/webapp/img/cal-prev.png
===================================================================
(Binary files differ)
Property changes on: trunk/samples/seamIntegration/src/main/webapp/img/cal-prev.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/seamIntegration/src/main/webapp/img/dtpick.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/seamIntegration/src/main/webapp/img/dtpick.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/seamIntegration/src/main/webapp/index.html
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/index.html (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/index.html 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,5 @@
+<html>
+<head>
+ <meta http-equiv="Refresh" content="0; URL=home.seam">
+</head>
+</html>
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/webapp/index.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,16 @@
+<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
Property changes on: trunk/samples/seamIntegration/src/main/webapp/layout/display.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,24 @@
+<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
Property changes on: trunk/samples/seamIntegration/src/main/webapp/layout/edit.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,12 @@
+<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>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/layout/loginout.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,17 @@
+<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.ajax4jsf.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>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/layout/menu.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,30 @@
+<!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>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/layout/template.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/login.page.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/login.page.xml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/login.page.xml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,12 @@
+<?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>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/login.page.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/login.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/login.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/login.xhtml 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,45 @@
+<!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.ajax4jsf.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>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/login.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/stylesheet/theme.css
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/stylesheet/theme.css (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/stylesheet/theme.css 2007-08-02 01:22:29 UTC (rev 1999)
@@ -0,0 +1,289 @@
+a:active, a:link, a:visited {
+ color: #0D5798;
+}
+a:hover {
+ color: #8CAFCD;
+}
+
+input, textarea {
+ border: 1px solid #BBBBBB;
+ font-size: 10px;
+ background: #F0F8FF;
+ color: black;
+}
+
+input[type='submit'], input[type='button'] {
+ background: #4477AA;
+ color: white;
+ margin: 5px;
+ border-color: gray;
+}
+
+.tableControl, .actionButtons {
+ width: 100%;
+}
+
+.tableControl {
+ text-align: right;
+}
+
+.footer {
+ text-align: center;
+ font-size: 10px;
+}
+
+.rich-table {
+ width:100%;
+}
+
+h1 {
+ font-family: Arial,sans-serif;
+ color: #578BB8;
+ font-size: 1.6em;
+ margin-top: 0;
+}
+
+body {
+ margin: 0px;
+ font-family: Arial,sans-serif;
+ color: #616161;
+}
+
+.body {
+ padding: 30px;
+}
+
+.columnHeader:hover
+{
+ color: #FF6600;
+}
+
+.message {
+ border: 1px solid #FFCC00;
+ padding: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ background-color: #F0F8FF;
+ font-size: 12px;
+}
+
+.name {
+ vertical-align: top;
+ font-weight: bold;
+ width: 115px;
+ float: left;
+ padding: 5px;
+ margin-top: 3px;
+ clear: left;
+}
+.value {
+ float: left;
+ padding: 5px;
+}
+.error {
+ margin-left: 20px;
+ margin-top: 5px;
+ float: left;
+ padding: 5px;
+ border: 1px solid red;
+}
+
+.errors {
+ color: red;
+}
+.errors input {
+ border: 1px solid red;
+}
+.errors textarea {
+ border: 1px solid red;
+}
+.required {
+ color: red;
+ padding-left: 2px;
+}
+
+/* date picker style */
+div.seam-date
+{
+ margin-top: 5px;
+ border: 1px solid #AAAAAA;
+ background-color: #FFFFFF;
+ color: #505050;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+
+table.seam-date td {
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: 12px;
+}
+
+.seam-date-monthNames
+{
+ width: 70px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+}
+
+a.seam-date-monthNameLink, a.seam-date-monthNameLink:visited
+{
+ text-align: center;
+ display: block;
+ color: #555555;
+}
+
+a.seam-date-monthNameLink:hover
+{
+ background-color: #CCCCCC;
+ color: red;
+}
+
+.seam-date-years
+{
+ height: 10em;
+ overflow: auto;
+ width: 60px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+}
+
+a.seam-date-yearLink, a.seam-date-yearLink:visited
+{
+ text-align: center;
+ display: block;
+ color: #555555;
+}
+
+a.seam-date-yearLink:hover
+{
+ background-color: #CCCCCC;
+ color: red;
+}
+
+tr.seam-date-header
+{
+ padding: 2px 0px 2px 0px;
+}
+
+td.seam-date-header
+{
+ padding: 0px 8px 0px 8px;
+ text-align: center;
+ color: gray;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 12px;
+}
+
+td.seam-date-header-prevMonth
+{
+ background-image: url("../img/cal-prev.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-left: 2px;
+}
+
+td.seam-date-header-nextMonth
+{
+ background-image: url("../img/cal-next.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-right: 2px;
+}
+
+tr.seam-date-headerDays
+{
+ color: white;
+ font-weight: normal;
+}
+
+tr.seam-date-headerDays > td
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: white;
+ text-align: center;
+ width: 26px;
+}
+
+tr.seam-date-footer
+{
+ background-color: white;
+ color: #505050;
+ font-weight: bold;
+}
+
+tr.seam-date-footer > td
+{
+ text-align: center;
+}
+
+td.seam-date-inMonth
+{
+ background-color: white;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-outMonth
+{
+ background-color: white;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-selected
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: black;
+ font-weight: normal;
+}
+
+td.seam-date-dayOff-inMonth
+{
+ background-color: #efefef;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-dayOff-outMonth
+{
+ background-color: #efefef;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-hover
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ cursor: pointer;
+ color: red;
+}
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/webapp/stylesheet/theme.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 8 months
JBoss Rich Faces SVN: r1998 - in trunk: cdk/generator/src/main/java/org/ajax4jsf/builder/config and 15 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-08-01 20:30:50 -0400 (Wed, 01 Aug 2007)
New Revision: 1998
Added:
trunk/cdk/AJSF-113.patch
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DummyTransaction.java
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/TestController.java
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
trunk/samples/seamIntegration/src/main/webapp/pages/AJSF86.xhtml
trunk/samples/useCases/src/main/java/org/ajax4jsf/ObjectNotFoundException.java
trunk/samples/useCases/src/main/java/org/ajax4jsf/TestBean.java
trunk/samples/useCases/src/main/webapp/pages/messages.xhtml
trunk/sandbox/samples/calendar-sample/
trunk/sandbox/ui/calendar/
Modified:
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java
trunk/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm
trunk/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm
trunk/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
trunk/samples/seamIntegration/pom.xml
trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
trunk/ui/core/pom.xml
trunk/ui/core/src/main/config/component/repeat.xml
trunk/ui/core/src/main/config/component/support.xml
Log:
Fixed :
http://jira.jboss.org/jira/browse/AJSF-113
http://jira.jboss.org/jira/browse/AJSF-85
http://jira.jboss.org/jira/browse/AJSF-84
http://jira.jboss.org/jira/browse/AJSF-83
http://jira.jboss.org/jira/browse/AJSF-80
Added: trunk/cdk/AJSF-113.patch
===================================================================
--- trunk/cdk/AJSF-113.patch (rev 0)
+++ trunk/cdk/AJSF-113.patch 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,52 @@
+Index: generator/src/main/resources/META-INF/templates/converterTag.vm
+===================================================================
+--- generator/src/main/resources/META-INF/templates/converterTag.vm (revision 313)
++++ generator/src/main/resources/META-INF/templates/converterTag.vm (working copy)
+@@ -59,7 +59,7 @@
+
+ protected Converter createConverter() throws JspException
+ {
+- ${converter.simpleClassName} converter = new ${converter.simpleClassName}();
++ ${converter.simpleClassName} converter = (${converter.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createConverter("${converter.id}");
+ _setProperties(converter);
+ return converter;
+ }
+Index: generator/src/main/resources/META-INF/templates/validatorTag.vm
+===================================================================
+--- generator/src/main/resources/META-INF/templates/validatorTag.vm (revision 313)
++++ generator/src/main/resources/META-INF/templates/validatorTag.vm (working copy)
+@@ -61,7 +61,7 @@
+
+ protected Validator createValidator() throws JspException
+ {
+- ${validator.simpleClassName} validator = new ${validator.simpleClassName}();
++ ${validator.simpleClassName} validator = (${validator.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createValidator("${validator.id}");
+ _setProperties(validator);
+ return validator;
+ }
+Index: generator/src/main/resources/META-INF/templates12/converterTag.vm
+===================================================================
+--- generator/src/main/resources/META-INF/templates12/converterTag.vm (revision 313)
++++ generator/src/main/resources/META-INF/templates12/converterTag.vm (working copy)
+@@ -59,7 +59,7 @@
+
+ protected Converter createConverter() throws JspException
+ {
+- ${converter.simpleClassName} converter = new ${converter.simpleClassName}();
++ ${converter.simpleClassName} converter = (${converter.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createConverter("${converter.id}");
+ _setProperties(converter);
+ return converter;
+ }
+Index: generator/src/main/resources/META-INF/templates12/validatorTag.vm
+===================================================================
+--- generator/src/main/resources/META-INF/templates12/validatorTag.vm (revision 313)
++++ generator/src/main/resources/META-INF/templates12/validatorTag.vm (working copy)
+@@ -58,7 +58,7 @@
+
+ protected Validator createValidator() throws JspException
+ {
+- ${validator.simpleClassName} validator = new ${validator.simpleClassName}();
++ ${validator.simpleClassName} validator = (${validator.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createValidator("${validator.id}");
+ _setProperties(validator);
+ return validator;
+ }
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/BuilderConfig.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -381,7 +381,7 @@
// Set this config as root.
digester.push(this);
try {
- digester.parse(configFile.toString());
+ digester.parse(configFile);
} catch (IOException e) {
// TODO Auto-generated catch block
throw new ParsingException("I/O error on parsing config file ", e);
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/componentTag.vm 2007-08-02 00:30:50 UTC (rev 1998)
@@ -79,7 +79,7 @@
#if( !$prop.existintag )
#if(!$prop.el)
if(isValueReference(this._${prop.name})){
- throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext() +" not allowed EL expression for property ${prop.name}")
+ throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext()) +" not allowed EL expression for property ${prop.name}");
}
#end
#if($prop.name == "action")
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/converterTag.vm 2007-08-02 00:30:50 UTC (rev 1998)
@@ -59,7 +59,7 @@
protected Converter createConverter() throws JspException
{
- ${converter.simpleClassName} converter = new ${converter.simpleClassName}();
+ ${converter.simpleClassName} converter = (${converter.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createConverter("${converter.id}");
_setProperties(converter);
return converter;
}
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/validatorTag.vm 2007-08-02 00:30:50 UTC (rev 1998)
@@ -61,7 +61,7 @@
protected Validator createValidator() throws JspException
{
- ${validator.simpleClassName} validator = new ${validator.simpleClassName}();
+ ${validator.simpleClassName} validator = (${validator.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createValidator("${validator.id}");
_setProperties(validator);
return validator;
}
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm 2007-08-02 00:30:50 UTC (rev 1998)
@@ -79,7 +79,7 @@
#if( !$prop.existintag )
#if(!$prop.el)
if(isValueReference(this._${prop.name})){
- throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext() +" not allowed EL expression for property ${prop.name}")
+ throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext()) +" not allowed EL expression for property ${prop.name}");
}
#end
#if($prop.name == "action")
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/converterTag.vm 2007-08-02 00:30:50 UTC (rev 1998)
@@ -1,95 +1,95 @@
-/**
- * GENERATED FILE - DO NOT EDIT
- *
- */
-package ${tag.packageName};
-
-#foreach($import in $imports)
-import $import ;
-#end
-import javax.faces.component.UIComponent;
-import javax.faces.convert.Converter;
-import javax.faces.webapp.UIComponentTag;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import org.apache.commons.beanutils.ConvertUtils;
-import javax.servlet.jsp.JspException;
-import ${converter.classname};
-
-public class $tag.simpleClassName extends $tag.superclass
-{
-
-// Fields
-#foreach( $prop in $converter.properties )
-#if( !$prop.existintag )
- /*
- * $prop.name
- * ${prop.xmlEncodedDescription}
- */
- private String _$prop.name = null;
-
-#end
-#end
-// Setters
-#foreach( $prop in $converter.properties )
-#if( !$prop.existintag )
- /*
- * $prop.description
- * Setter for $prop.name
- * @param $prop.name - new value
- */
- public void ${prop.setterName}(String __${prop.name})
- {
- this._${prop.name} = __${prop.name};
- }
-
-#end
-#if( $prop.alias)
- /*
- * ${prop.xmlEncodedDescription}
- * Setter for alias of $prop.name as $prop.alias
- * @param $prop.name - new value
- */
- public void set${prop.upperFirstChar($prop.alias)}(String __${prop.alias})
- {
- this.${prop.setterName}(__${prop.alias});
- }
-#end
-#end
-
- protected Converter createConverter() throws JspException
- {
- ${converter.simpleClassName} converter = new ${converter.simpleClassName}();
- _setProperties(converter);
- return converter;
- }
-
- // Support method to wire in attributes
- private void _setProperties(${converter.simpleClassName} converter) throws JspException
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
-#foreach( $prop in $converter.properties )
-#if( !$prop.existintag )
- if (_${prop.name} != null)
- {
-#if( ${prop.el} )
- if (UIComponentTag.isValueReference(_${prop.name}))
- {
- ValueBinding vb = facesContext.getApplication().createValueBinding(_${prop.name});
- converter.${prop.setterName}((${prop.simpleClassName}) vb.getValue(facesContext));
- }
-#if (!${prop.elonly})
- else
- {
- converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
- }
-#end
- }
-#else
- converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
-#end
-#end
-#end
- }
-
-}
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package ${tag.packageName};
+
+#foreach($import in $imports)
+import $import ;
+#end
+import javax.faces.component.UIComponent;
+import javax.faces.convert.Converter;
+import javax.faces.webapp.UIComponentTag;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import org.apache.commons.beanutils.ConvertUtils;
+import javax.servlet.jsp.JspException;
+import ${converter.classname};
+
+public class $tag.simpleClassName extends $tag.superclass
+{
+
+// Fields
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+ /*
+ * $prop.name
+ * ${prop.xmlEncodedDescription}
+ */
+ private String _$prop.name = null;
+
+#end
+#end
+// Setters
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+ /*
+ * $prop.description
+ * Setter for $prop.name
+ * @param $prop.name - new value
+ */
+ public void ${prop.setterName}(String __${prop.name})
+ {
+ this._${prop.name} = __${prop.name};
+ }
+
+#end
+#if( $prop.alias)
+ /*
+ * ${prop.xmlEncodedDescription}
+ * Setter for alias of $prop.name as $prop.alias
+ * @param $prop.name - new value
+ */
+ public void set${prop.upperFirstChar($prop.alias)}(String __${prop.alias})
+ {
+ this.${prop.setterName}(__${prop.alias});
+ }
+#end
+#end
+
+ protected Converter createConverter() throws JspException
+ {
+ ${converter.simpleClassName} converter = (${converter.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createConverter("${converter.id}");
+ _setProperties(converter);
+ return converter;
+ }
+
+ // Support method to wire in attributes
+ private void _setProperties(${converter.simpleClassName} converter) throws JspException
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+#foreach( $prop in $converter.properties )
+#if( !$prop.existintag )
+ if (_${prop.name} != null)
+ {
+#if( ${prop.el} )
+ if (UIComponentTag.isValueReference(_${prop.name}))
+ {
+ ValueBinding vb = facesContext.getApplication().createValueBinding(_${prop.name});
+ converter.${prop.setterName}((${prop.simpleClassName}) vb.getValue(facesContext));
+ }
+#if (!${prop.elonly})
+ else
+ {
+ converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+ }
+#end
+ }
+#else
+ converter.${prop.setterName}((${prop.simpleClassName}) ConvertUtils.convert(_${prop.name}, ${prop.simpleClassName}.class));
+#end
+#end
+#end
+ }
+
+}
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm 2007-08-02 00:30:50 UTC (rev 1998)
@@ -58,7 +58,7 @@
protected Validator createValidator() throws JspException
{
- ${validator.simpleClassName} validator = new ${validator.simpleClassName}();
+ ${validator.simpleClassName} validator = (${validator.simpleClassName}) FacesContext.getCurrentInstance().getApplication().createValidator("${validator.id}");
_setProperties(validator);
return validator;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -175,6 +175,8 @@
public static final String nowrap_ATTRIBUTE = "nowrap";
+ public static final String src_ATTRIBUTE = "src";
+
//public static final String onreset_ATTRIBUTE = "onreset";
// attributes sets.
public static final String[] PASS_THRU = {
@@ -307,6 +309,7 @@
public static final String CAPTION_ELEMENT = "caption";
public static final String THEAD_ELEMENT = "thead";
public static final String TFOOT_ELEMENT = "tfoot";
+ public static final String IMG_ELEMENT = "img";
}
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -71,6 +71,8 @@
static final String RESOURCE_URI_PREFIX_WITH_SLASH = "/"
+ RESOURCE_URI_PREFIX;
+ public static final String RESOURCE_URI_PREFIX_PARAM = "org.ajax4jsf.RESOURCE_URI_PREFIX";
+
/**
* Prefix for Resourse-Ajax filter, in common must be same as for
* {@link javax.faces.webapp.FacesServlet}
@@ -158,7 +160,7 @@
dig.push(this);
try {
dig.parse(webXml);
- this.setFilterName(filterName);
+ this.setFilterName(filterName, context);
// Store Instance to context attribute.
context.setAttribute(CONTEXT_ATTRIBUTE,this);
} catch (IOException e) {
@@ -357,8 +359,9 @@
*
* @param filterName
* The filterName to set.
+ * @param context TODO
*/
- void setFilterName(String filterName) {
+ void setFilterName(String filterName, ServletContext context) {
if (null == filterName) {
_log.warn(Messages.getMessage(Messages.NULL_FILTER_NAME_WARNING));
return;
@@ -386,16 +389,20 @@
}
}
}
+ String resourcePrefix = (String) context.getAttribute(RESOURCE_URI_PREFIX_PARAM);
+ if(null == resourcePrefix){
+ resourcePrefix = RESOURCE_URI_PREFIX;
+ }
if (null != _facesFilterPrefix) {
_prefixMapping = true;
if (_facesFilterPrefix.endsWith("/")) {
- setResourcePrefix(RESOURCE_URI_PREFIX);
+ setResourcePrefix(resourcePrefix);
} else {
- setResourcePrefix(RESOURCE_URI_PREFIX_WITH_SLASH);
+ setResourcePrefix("/"+resourcePrefix);
}
} else if (null != _facesFilterSuffix) {
_prefixMapping = false;
- setResourcePrefix(RESOURCE_URI_PREFIX_WITH_SLASH);
+ setResourcePrefix("/"+resourcePrefix);
} else {
throw new IllegalStateException(Messages.getMessage(
Messages.NO_PREFIX_OR_SUFFIX_IN_FILTER_MAPPING_ERROR,
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/samples/seamIntegration/pom.xml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -30,6 +30,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
+ <scope>provided</scope>
</dependency>
<!--
<dependency>
@@ -47,6 +48,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.0.0.ga</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
@@ -89,6 +91,7 @@
<groupId>jboss</groupId>
<artifactId>javassist</artifactId>
<version>3.4.ga</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
Modified: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/Bean.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -44,6 +44,7 @@
*/
private static final long serialVersionUID = -4209339000953631111L;
private String text;
+ private String text2;
/**
* @return the text
@@ -77,4 +78,18 @@
}
return null;
}
+
+ /**
+ * @return the text2
+ */
+ public String getText2() {
+ return text2;
+ }
+
+ /**
+ * @param text2 the text2 to set
+ */
+ public void setText2(String text2) {
+ this.text2 = text2;
+ }
}
\ No newline at end of file
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DummyTransaction.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DummyTransaction.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DummyTransaction.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,93 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import static org.jboss.seam.annotations.Install.FRAMEWORK;
+
+import javax.transaction.HeuristicMixedException;
+import javax.transaction.HeuristicRollbackException;
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+import javax.transaction.SystemException;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.transaction.AbstractUserTransaction;
+
+/**
+ * @author asmirnov
+ *
+ */
+@Name("org.jboss.seam.transaction.transaction")
+(a)Scope(ScopeType.EVENT)
+@Install(value=false, precedence=FRAMEWORK)
+@BypassInterceptors
+public class DummyTransaction extends AbstractUserTransaction {
+
+ /* (non-Javadoc)
+ * @see org.jboss.seam.transaction.AbstractUserTransaction#registerSynchronization(javax.transaction.Synchronization)
+ */
+ @Override
+ public void registerSynchronization(Synchronization arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.UserTransaction#begin()
+ */
+ public void begin() throws NotSupportedException, SystemException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.UserTransaction#commit()
+ */
+ public void commit() throws HeuristicMixedException,
+ HeuristicRollbackException, IllegalStateException,
+ RollbackException, SecurityException, SystemException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.UserTransaction#getStatus()
+ */
+ public int getStatus() throws SystemException {
+ // TODO Auto-generated method stub
+ return Status.STATUS_NO_TRANSACTION;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.UserTransaction#rollback()
+ */
+ public void rollback() throws IllegalStateException, SecurityException,
+ SystemException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.UserTransaction#setRollbackOnly()
+ */
+ public void setRollbackOnly() throws IllegalStateException, SystemException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.transaction.UserTransaction#setTransactionTimeout(int)
+ */
+ public void setTransactionTimeout(int arg0) throws SystemException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/DummyTransaction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/TestController.java
===================================================================
--- trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/TestController.java (rev 0)
+++ trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/TestController.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,26 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.faces.FacesMessages;
+
+import javax.faces.component.UIInput;
+
+@Name("testController")
+public class TestController {
+ @In
+ FacesMessages facesMessages;
+ private UIInput input;
+ private String value;
+
+ public UIInput getInput() { return input; }
+
+ public void setInput(UIInput input) { this.input = input; }
+
+ public String getValue() { return value; }
+
+ public void setValue(String value) { this.value = value; }
+}
\ No newline at end of file
Property changes on: trunk/samples/seamIntegration/src/main/java/org/ajax4jsf/TestController.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -8,19 +8,19 @@
xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
+ http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
<core:init debug="false" />
- <core:microcontainer installed="false" />
<core:manager conversation-timeout="120000"
concurrent-request-timeout="500" conversation-id-parameter="cid" />
- <transaction:no-transaction/>
<!--
+ <core:microcontainer installed="false" />
<persistence:hibernate-session-factory name="hibernateSessionFactory"/>
<persistence:managed-hibernate-session name="seamDatabase"
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -2,11 +2,6 @@
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
- <managed-bean>
- <managed-bean-name>bean</managed-bean-name>
- <managed-bean-class>org.ajax4jsf.Bean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
<lifecycle>
<phase-listener>
org.jboss.seam.jsf.SeamPhaseListener
Added: trunk/samples/seamIntegration/src/main/webapp/pages/AJSF86.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/pages/AJSF86.xhtml (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/pages/AJSF86.xhtml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a4j="http://richfaces.org/a4j">
+<head><title>Seam + ajax4jsf + binding</title></head>
+<body>
+<h:form>
+ Input:
+ <h:inputText binding="#{testController.input}"
+ value="#{testController.value}">
+ <a4j:support event="onkeyup" reRender="repeater"/>
+ </h:inputText>
+ <h:commandButton value="Ok" />
+ <br/>
+ Repeat:
+ <h:outputText id="repeater" value="#{testController.value}"/>
+</h:form>
+</body>
+</html>
Property changes on: trunk/samples/seamIntegration/src/main/webapp/pages/AJSF86.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/samples/seamIntegration/src/main/webapp/pages/repeater.xhtml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -13,10 +13,10 @@
</h:inputText>
<h:outputText id="out" value="#{seamBean.text}"></h:outputText>
<h:outputText value="All form submit."></h:outputText>
- <h:inputText value="#{bean.text}">
+ <h:inputText value="#{seamBean.text2}">
<a4j:support reRender="out,outs,conversation" event="onkeyup"></a4j:support>
</h:inputText>
- <h:outputText id="outs" value="#{bean.text}"></h:outputText>
+ <h:outputText id="outs" value="#{seamBean.text2}"></h:outputText>
<h:outputText value="AJAX Single submit."></h:outputText>
<h:outputText id="conversation" value="Conversation ID: #{conversation.id}"></h:outputText>
<a4j:commandButton action="#{seamBean.start}" value="Start conversation" reRender="out,conversation"></a4j:commandButton>
Added: trunk/samples/useCases/src/main/java/org/ajax4jsf/ObjectNotFoundException.java
===================================================================
--- trunk/samples/useCases/src/main/java/org/ajax4jsf/ObjectNotFoundException.java (rev 0)
+++ trunk/samples/useCases/src/main/java/org/ajax4jsf/ObjectNotFoundException.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.ajax4jsf;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ObjectNotFoundException extends Exception {
+
+}
Property changes on: trunk/samples/useCases/src/main/java/org/ajax4jsf/ObjectNotFoundException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/samples/useCases/src/main/java/org/ajax4jsf/TestBean.java
===================================================================
--- trunk/samples/useCases/src/main/java/org/ajax4jsf/TestBean.java (rev 0)
+++ trunk/samples/useCases/src/main/java/org/ajax4jsf/TestBean.java 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,64 @@
+package org.ajax4jsf;
+
+
+
+import java.util.logging.Logger;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author krasi
+ *
+ */
+public class TestBean {
+ String id = "";
+ static final Logger LOGGER = Logger.getLogger(TestBean.class.getName());
+
+ public TestBean() {
+ }
+
+ public String getId() {
+
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Message 1.",
+ ""));
+
+ System.out.println("GET 1 ------" + id);
+ if (!id.equals("")) {
+ System.out.println("GET 2 ------" + id);
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Message 2.",
+ "11"));
+
+ try {
+ System.out.println("GET 3 ------" + id);
+ throw new ObjectNotFoundException();
+
+ } catch (ObjectNotFoundException e) {
+ System.out.println("GET 4 ------" + id);
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Message 3.",
+ "11"));
+ }
+
+ }
+
+ return id;
+ }
+
+ public void setId(String id) {
+ System.out.println("SET 1-" + id);
+ this.id = id;
+ }
+
+ public String searchByID() {
+ System.out.println("searchByID");
+ return null;
+
+ }
+
+}
Property changes on: trunk/samples/useCases/src/main/java/org/ajax4jsf/TestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/samples/useCases/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -37,6 +37,11 @@
<managed-bean-class>control.test.ControlBackingBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>delme</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.TestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
<navigation-rule>
<navigation-case>
Modified: trunk/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml
===================================================================
--- trunk/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/samples/useCases/src/main/webapp/pages/ajaxSingle.xhtml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -56,6 +56,9 @@
<a4j:commandButton value="Ajax Button"></a4j:commandButton>
<a4j:commandButton value="Ajax Single Button" ajaxSingle="true"></a4j:commandButton>
</h:form>
+ <a4j:status>
+ <f:facet name="start"><h:panelGroup layout="block" id="loading">Loading</h:panelGroup></f:facet>
+</a4j:status>
<a4j:log hotkey="M"></a4j:log>
</f:view>
</html>
Added: trunk/samples/useCases/src/main/webapp/pages/messages.xhtml
===================================================================
--- trunk/samples/useCases/src/main/webapp/pages/messages.xhtml (rev 0)
+++ trunk/samples/useCases/src/main/webapp/pages/messages.xhtml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!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:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:t="http://myfaces.apache.org/tomahawk"
+ xmlns:ft="http://sourceforge.net/projects/facestrace">
+
+<head>
+<title></title>
+
+</head>
+<body>
+<ui:debug hotkey="q" />
+<f:view>
+
+<a4j:outputPanel id="myMessageanel" ajaxRendered="true">
+<h:messages />
+</a4j:outputPanel>
+
+<h:form>
+<h:panelGroup id="a123">
+<h:inputText value="#{delme.id}"></h:inputText>
+
+<a4j:commandButton action="#{delme.searchByID}" value="Ajax" reRender="a123"></a4j:commandButton>
+<h:commandButton action="#{delme.searchByID}" value="Ok"></h:commandButton>
+</h:panelGroup>
+</h:form>
+
+</f:view>
+</body>
+
+</html>
\ No newline at end of file
Property changes on: trunk/samples/useCases/src/main/webapp/pages/messages.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/core/pom.xml
===================================================================
--- trunk/ui/core/pom.xml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/ui/core/pom.xml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
Modified: trunk/ui/core/src/main/config/component/repeat.xml
===================================================================
--- trunk/ui/core/src/main/config/component/repeat.xml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/ui/core/src/main/config/component/repeat.xml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -47,7 +47,7 @@
<classname>java.lang.String</classname>
<description>It defines EL-binding for a component state for saving or redefinition.</description>
</property>
- <property>
+ <property el="false">
<name>stateVar</name>
<classname>java.lang.String</classname>
<description>The attribute provides access to a component state on the client side.</description>
@@ -62,7 +62,7 @@
<classname>java.lang.String</classname>
<description>This attribute defines strings that are updated after an AJAX request.</description>
</property>
- <property>
+ <property el="false">
<name>rowKeyVar</name>
<classname>java.lang.String</classname>
<description>The attribute provides access to a row key in a Request scope.</description>
Modified: trunk/ui/core/src/main/config/component/support.xml
===================================================================
--- trunk/ui/core/src/main/config/component/support.xml 2007-08-02 00:21:45 UTC (rev 1997)
+++ trunk/ui/core/src/main/config/component/support.xml 2007-08-02 00:30:50 UTC (rev 1998)
@@ -88,7 +88,7 @@
event
</description>
</property>
- <property>
+ <property el="false">
<name>event</name>
<classname>java.lang.String</classname>
<description>
16 years, 8 months
JBoss Rich Faces SVN: r1997 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-08-01 20:21:45 -0400 (Wed, 01 Aug 2007)
New Revision: 1997
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml
Log:
update demo
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml 2007-08-02 00:01:04 UTC (rev 1996)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml 2007-08-02 00:21:45 UTC (rev 1997)
@@ -37,6 +37,8 @@
it will be re-created as a regular request scope bean when a non-Ajax request
will send from this page.
</p>
+
+ <rich:separator height="1" />
<div class="sample-container" >
<h:panelGrid columns="2" width="100%" columnClasses="pcolumn">
@@ -106,6 +108,7 @@
</h:panelGrid>
+ <rich:separator height="1" style="padding-top:10px" />
</div>
</ui:define>
<ui:define name="sources">
16 years, 8 months
JBoss Rich Faces SVN: r1996 - in trunk/samples/richfaces-demo/src/main: java/org/richfaces/demo/ajaxSamples and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-08-01 20:01:04 -0400 (Wed, 01 Aug 2007)
New Revision: 1996
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle1.properties
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle2.properties
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
KeepAlive
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java 2007-08-02 00:01:04 UTC (rev 1996)
@@ -0,0 +1,31 @@
+package org.richfaces.demo.ajaxSamples;
+
+public class rsBean {
+ private Integer addent1;
+ private Integer addent2;
+ private Integer sum;
+
+ public Integer getSum() {
+ return sum;
+ }
+ public void setSum(Integer sum) {
+ this.sum = sum;
+ }
+ public Integer getAddent1() {
+ return addent1;
+ }
+ public void setAddent1(Integer addent1) {
+ this.addent1 = addent1;
+ }
+ public Integer getAddent2() {
+ return addent2;
+ }
+ public void setAddent2(Integer addent2) {
+ this.addent2 = addent2;
+ }
+ public String doSum() {
+ sum = addent1 + addent2;
+ return null;
+ }
+
+}
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle1.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle1.properties (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle1.properties 2007-08-02 00:01:04 UTC (rev 1996)
@@ -0,0 +1 @@
+text1=This bundle message is loading with f\:loadBundle. It will disappear during the Ajax re-rendering
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle2.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle2.properties (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/bundle2.properties 2007-08-02 00:01:04 UTC (rev 1996)
@@ -0,0 +1 @@
+text2=This bundle message is loading with a4j\:loadBundle.
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-08-01 23:59:53 UTC (rev 1995)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-08-02 00:01:04 UTC (rev 1996)
@@ -174,4 +174,14 @@
<managed-bean-class>org.richfaces.demo.tooltip.ToolTipData</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>rsBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.ajaxSamples.rsBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>rsBean2</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.ajaxSamples.rsBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
</faces-config>
16 years, 8 months