JBoss Rich Faces SVN: r9934 - in trunk/docs/userguide/en/src/main/resources: script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-06 06:36:46 -0400 (Wed, 06 Aug 2008)
New Revision: 9934
Modified:
trunk/docs/userguide/en/src/main/resources/css/html.css
trunk/docs/userguide/en/src/main/resources/script/toggle.js
Log:
https://jira.jboss.org/jira/browse/RF-4065 - banner was added
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2008-08-06 10:15:54 UTC (rev 9933)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2008-08-06 10:36:46 UTC (rev 9934)
@@ -13,8 +13,11 @@
}
body {
-background-image:url(../images/community/bkg_gradient.gif);
-background-repeat:repeat-x;
+background-image:url(../images/richfaces_label2.png);
+background-repeat:no-repeat;
+background-attachment:fixed;
+background-position:top left;
+z-index:1;
color:#333333;
font-family:'Lucida Grande',Geneva,Verdana,Arial,sans-serif;
font-size:12px;
@@ -24,6 +27,16 @@
text-align:center;
}
+div#overlay{
+background-image:url(../images/community/bkg_gradient.gif);
+background-repeat:repeat-x;
+width:100%;
+height:100%;
+position:absolute;
+top:0px;
+left:0px;
+z-index:-1;
+}
div.book, div.chapter, div.section{
width:1000px;
margin:0 auto;
Modified: trunk/docs/userguide/en/src/main/resources/script/toggle.js
===================================================================
--- trunk/docs/userguide/en/src/main/resources/script/toggle.js 2008-08-06 10:15:54 UTC (rev 9933)
+++ trunk/docs/userguide/en/src/main/resources/script/toggle.js 2008-08-06 10:36:46 UTC (rev 9934)
@@ -1,3 +1,5 @@
+document.write('<div id="overlay"> </div>');
+
function dbToggle(node, expandText, collapseText) {
var dt = node.parentNode;
if (dt.nodeName.toLowerCase() == 'dt') {
16 years, 3 months
JBoss Rich Faces SVN: r9933 - trunk/ui/dataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-08-06 06:15:54 -0400 (Wed, 06 Aug 2008)
New Revision: 9933
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
RF-4094
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-08-06 09:12:10 UTC (rev 9932)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-08-06 10:15:54 UTC (rev 9933)
@@ -42,6 +42,7 @@
import org.richfaces.component.Column;
import org.richfaces.component.Row;
import org.richfaces.component.UIDataTable;
+import org.richfaces.component.util.ViewUtil;
import org.richfaces.model.Ordering;
import org.richfaces.renderkit.html.iconimages.DataTableIconSortAsc;
import org.richfaces.renderkit.html.iconimages.DataTableIconSortDesc;
@@ -704,19 +705,19 @@
String imageUrl = null;
if (Ordering.ASCENDING.equals(col.getSortOrder())) {
if (null != col.getSortIconAscending()) {
- imageUrl = col.getSortIconAscending();
+ imageUrl = ViewUtil.getResourceURL(col.getSortIconAscending(), context);
} else {
imageUrl = getResource(DataTableIconSortAsc.class.getName()).getUri(context, null);
}
} else if (Ordering.DESCENDING.equals(col.getSortOrder())) {
if (null != col.getSortIconDescending()) {
- imageUrl = col.getSortIconDescending();
+ imageUrl = ViewUtil.getResourceURL(col.getSortIconDescending(), context);
} else {
imageUrl = getResource(DataTableIconSortDesc.class.getName()).getUri(context, null);
}
} else if (col.isSelfSorted()) {
if (null != col.getSortIcon()) {
- imageUrl = col.getSortIcon();
+ imageUrl = ViewUtil.getResourceURL(col.getSortIcon(), context);
} else {
imageUrl = getResource(DataTableIconSortNone.class.getName()).getUri(context, null);
}
16 years, 3 months
JBoss Rich Faces SVN: r9932 - in trunk/sandbox/ui/extendedDataTable: design and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: piotr.buda
Date: 2008-08-06 05:12:10 -0400 (Wed, 06 Aug 2008)
New Revision: 9932
Added:
trunk/sandbox/ui/extendedDataTable/design/
trunk/sandbox/ui/extendedDataTable/design/FuncSpec - Extended Data Table Component.doc
Log:
Functional specification
Added: trunk/sandbox/ui/extendedDataTable/design/FuncSpec - Extended Data Table Component.doc
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/extendedDataTable/design/FuncSpec - Extended Data Table Component.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 3 months
JBoss Rich Faces SVN: r9931 - trunk/test-applications/jsp/src/main/webapp/Validator.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-06 03:33:54 -0400 (Wed, 06 Aug 2008)
New Revision: 9931
Modified:
trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp 2008-08-06 07:33:38 UTC (rev 9930)
+++ trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorStraightforward.jsp 2008-08-06 07:33:54 UTC (rev 9931)
@@ -60,7 +60,7 @@
</a4j:region>
<br />
<a4j:region>
- <h:outputText value="Enter quantity of lines [data]" />
+ <h:outputText value="Enter quantity of lines [2-8]" />
<h:panelGroup>
<h:inputText value="#{data.length}"/>
<a4j:commandButton action="#{data.addNewItem}" value="ok"
@@ -70,9 +70,11 @@
<br/>
<a4j:region>
<h:panelGrid columns="2">
- <h:inputText value="enter some value" required="true" id="beanValidatorInputID">
- <rich:beanValidator></rich:beanValidator>
+
+ <h:inputText value="#{validator.newValue}" id="beanValidatorInputID">
+ <rich:beanValidator></rich:beanValidator>
</h:inputText>
+
<a4j:commandButton value="reRender" onclick="submit();" reRender="beanValidatorInputID"></a4j:commandButton>
</h:panelGrid>
</a4j:region>
16 years, 3 months
JBoss Rich Faces SVN: r9930 - trunk/test-applications/jsp/src/main/java/validator.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-06 03:33:38 -0400 (Wed, 06 Aug 2008)
New Revision: 9930
Modified:
trunk/test-applications/jsp/src/main/java/validator/DataBean.java
trunk/test-applications/jsp/src/main/java/validator/LengthBean.java
trunk/test-applications/jsp/src/main/java/validator/MaxBean.java
trunk/test-applications/jsp/src/main/java/validator/MinBean.java
trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java
trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java
trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/validator/DataBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/DataBean.java 2008-08-06 00:16:23 UTC (rev 9929)
+++ trunk/test-applications/jsp/src/main/java/validator/DataBean.java 2008-08-06 07:33:38 UTC (rev 9930)
@@ -24,7 +24,7 @@
private UIGraphValidator graphValidatorComponent = null;
private String bindLabel;
private boolean rendered;
- @Size(min=2,max=5,message="Size validation failed!!!!")
+ @Size(min=2,max=8,message="Size validation failed!!!!")
private ArrayList<Data> data;
private int length;
@@ -112,7 +112,7 @@
this.rendered = true;
this.data = new ArrayList<Data>();
Random r = new Random();
- for(int i = 0; i < 10; i++)
+ for(int i = 0; i < 7; i++)
data.add(new Data(i, r.nextInt(1000), Data.Random(6), r.nextInt(10000) + 98389, Data.Random(r.nextInt(10) + 1), r.nextInt(500000), Data.statusIcon[i % 5], Data.Random(3), false)); //new Data(i, Data.Random(5), Data.statusIcon[i % 5], Data.Random(6), false));
}
Modified: trunk/test-applications/jsp/src/main/java/validator/LengthBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/LengthBean.java 2008-08-06 00:16:23 UTC (rev 9929)
+++ trunk/test-applications/jsp/src/main/java/validator/LengthBean.java 2008-08-06 07:33:38 UTC (rev 9930)
@@ -21,6 +21,10 @@
/**
* @return the text
*/
+ public LengthBean(){
+ this.text = "12345";
+ }
+
public String getText() {
return text;
}
Modified: trunk/test-applications/jsp/src/main/java/validator/MaxBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/MaxBean.java 2008-08-06 00:16:23 UTC (rev 9929)
+++ trunk/test-applications/jsp/src/main/java/validator/MaxBean.java 2008-08-06 07:33:38 UTC (rev 9930)
@@ -20,9 +20,13 @@
@Max(10)
private int intValue;
+ public MaxBean(){
+ this.intValue = 5;
+ }
+
/**
* @return the text
- */
+ */
public String getText() {
return text;
}
Modified: trunk/test-applications/jsp/src/main/java/validator/MinBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/MinBean.java 2008-08-06 00:16:23 UTC (rev 9929)
+++ trunk/test-applications/jsp/src/main/java/validator/MinBean.java 2008-08-06 07:33:38 UTC (rev 9930)
@@ -19,6 +19,10 @@
@Min(2)
private int intValue;
+ public MinBean(){
+ this.intValue = 4;
+ }
+
/**
* @return the text
*/
Modified: trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java 2008-08-06 00:16:23 UTC (rev 9929)
+++ trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java 2008-08-06 07:33:38 UTC (rev 9930)
@@ -21,6 +21,10 @@
@Max(10)
private int intValue;
+ public MinMaxBean(){
+ this.intValue = 4;
+ }
+
/**
* @return the text
*/
Modified: trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java 2008-08-06 00:16:23 UTC (rev 9929)
+++ trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java 2008-08-06 07:33:38 UTC (rev 9930)
@@ -17,6 +17,10 @@
private int intValue;
+ public NotEmptyBean(){
+ text = "not empty";
+ }
+
/**
* @return the text
*/
Modified: trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2008-08-06 00:16:23 UTC (rev 9929)
+++ trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2008-08-06 07:33:38 UTC (rev 9930)
@@ -254,6 +254,7 @@
this.ean = "97 81550 41198 0";
this.creditValue = "visa maestro";
this.assertTrue = true;
+ this.rangeValue = "3.14159265";
this.sizeValues = new ArrayList<SelectItem>();
for(int i=0;i<6;i++){
sizeValues.add(new SelectItem("value_"+i,"label_"+i));
16 years, 3 months
JBoss Rich Faces SVN: r9929 - in trunk: samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-08-05 20:16:23 -0400 (Tue, 05 Aug 2008)
New Revision: 9929
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
Log:
Fix validator examples.
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml 2008-08-05 22:39:55 UTC (rev 9928)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml 2008-08-06 00:16:23 UTC (rev 9929)
@@ -13,17 +13,17 @@
<h:panelGrid columns="3">
<h:outputText value="Name:" />
<h:inputText value="#{validationBean.name}" id="name" required="true">
- <rich:ajaxValidator event="onblur" ajaxSingle="true" />
+ <rich:ajaxValidator event="onblur" />
</h:inputText>
<rich:message for="name" />
<h:outputText value="Email:" />
<h:inputText value="#{validationBean.email}" id="email">
- <rich:ajaxValidator event="onblur" ajaxSingle="true" />
+ <rich:ajaxValidator event="onblur" />
</h:inputText>
<rich:message for="email" />
<h:outputText value="Age:" />
<h:inputText value="#{validationBean.age}" id="age">
- <rich:ajaxValidator event="onblur" ajaxSingle="true" />
+ <rich:ajaxValidator event="onblur" />
</h:inputText>
<rich:message for="age" />
</h:panelGrid>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-08-05 22:39:55 UTC (rev 9928)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-08-06 00:16:23 UTC (rev 9929)
@@ -13,21 +13,22 @@
<h:panelGrid columns="3">
<h:outputText value="Name:" />
<h:inputText value="#{validationBean.name}" id="name">
- <rich:beanValidator/>
+ <rich:beanValidator summary="Invalid name"/>
</h:inputText>
<rich:message for="name" />
<h:outputText value="Email:" />
<h:inputText value="#{validationBean.email}" id="email">
- <rich:beanValidator/>
+ <rich:beanValidator summary="Invalid email"/>
</h:inputText>
<rich:message for="email" />
<h:outputText value="Age:" />
<h:inputText value="#{validationBean.age}" id="age">
- <rich:beanValidator/>
+ <rich:beanValidator summary="Wrong age"/>
</h:inputText>
<rich:message for="age" />
</h:panelGrid>
<a4j:commandButton value="Submit"/>
+ <rich:messages />
</rich:panel>
</h:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-05 22:39:55 UTC (rev 9928)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-06 00:16:23 UTC (rev 9929)
@@ -22,6 +22,7 @@
<rich:message for="time" />
</rich:column>
</rich:dataTable>
+ <rich:messages />
</rich:graphValidator>
<a4j:commandButton value="Store my details" action="#{pt.store}"/>
</h:form>
Modified: trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-08-05 22:39:55 UTC (rev 9928)
+++ trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-08-06 00:16:23 UTC (rev 9929)
@@ -50,7 +50,7 @@
event
</description>
</property>
- <property>
+ <property disabled="true">
<name>ajaxSingle</name>
<classname>boolean</classname>
<description>
16 years, 3 months
JBoss Rich Faces SVN: r9928 - trunk/ui/beanValidator/src/main/java/org/richfaces/validator.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-05 18:39:55 -0400 (Tue, 05 Aug 2008)
New Revision: 9928
Modified:
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/ELContextWrapper.java
Log:
https://jira.jboss.org/jira/browse/RF-4034
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java 2008-08-05 18:00:31 UTC (rev 9927)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java 2008-08-05 22:39:55 UTC (rev 9928)
@@ -111,11 +111,9 @@
if (null != target) {
ELContext elContext = context.getELContext();
ValidationResolver validationResolver = new ValidationResolver(
- elContext.getELResolver());
+ elContext.getELResolver(), calculateLocale(context));
ELContextWrapper wrappedElContext = new ELContextWrapper(elContext,
validationResolver);
- Locale locale = calculateLocale(context);
- wrappedElContext.setLocale(locale);
// TODO - handle ELExceptions ?
try {
target.setValue(wrappedElContext, value);
@@ -304,11 +302,14 @@
private String[] validationMessages = null;
+ private Locale locale = null;
+
/**
* @param parent
*/
- public ValidationResolver(ELResolver parent) {
+ public ValidationResolver(ELResolver parent, Locale locale) {
this.parent = parent;
+ this.locale = locale;
}
public boolean isValid() {
@@ -388,8 +389,10 @@
Object value) {
if (null != base && null != property) {
context.setPropertyResolved(true);
- validationMessages = validate(base, property.toString(), value,
- context.getLocale());
+ //https://jira.jboss.org/jira/browse/RF-4034
+ //apache el looses locale information during value resolution,
+ //so we use our own
+ validationMessages = validate(base, property.toString(), value, locale);
valid = null == validationMessages
|| 0 == validationMessages.length;
}
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/ELContextWrapper.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/validator/ELContextWrapper.java 2008-08-05 18:00:31 UTC (rev 9927)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/validator/ELContextWrapper.java 2008-08-05 22:39:55 UTC (rev 9928)
@@ -3,6 +3,8 @@
*/
package org.richfaces.validator;
+import java.util.Locale;
+
import javax.el.ELContext;
import javax.el.ELResolver;
import javax.el.FunctionMapper;
@@ -69,4 +71,11 @@
parent.putContext(key, contextObject);
}
+ public Locale getLocale() {
+ return parent.getLocale();
+ }
+
+ public void setLocale(Locale locale) {
+ parent.setLocale(locale);
+ }
}
16 years, 3 months
JBoss Rich Faces SVN: r9927 - trunk/framework/api/src/main/java/org/ajax4jsf/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-05 14:00:31 -0400 (Tue, 05 Aug 2008)
New Revision: 9927
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2.java
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2State.java
Log:
AjaxChildrenEncoder2 & state added
Added: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2.java 2008-08-05 18:00:31 UTC (rev 9927)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Marker interface for components, have ability to manipulate rendering in case of Ajax responses.
+ * Such as ajax-enabled iterator, menus etc
+ * @author shura
+ *
+ */
+public interface AjaxChildrenEncoder2 {
+
+ public AjaxChildrenEncoder2State getEncodeAjaxChildState(FacesContext context,
+ String path,Set<String> ids,Set<String> renderedAreas);
+
+ /**
+ * Iterate over all childs of components. If component id contains in list ,
+ * or, if list is empty, compotents is submitted form - render it.
+ * TODO - Instead of calculate full path for every component, build current Path
+ * for componet and send as parameter.
+ *
+ * @param context -
+ * current context
+ * @param component -
+ * curent faces component.
+ * @param ids -
+ * list of Id to render.
+ * @throws IOException
+ */
+ public void encodeAjaxChild(FacesContext context,
+ String path,Set<String> ids,Set<String> renderedAreas, AjaxChildrenEncoder2State state) throws IOException ;
+
+
+}
Added: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2State.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2State.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder2State.java 2008-08-05 18:00:31 UTC (rev 9927)
@@ -0,0 +1,49 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+/**
+ * Created 05.08.2008
+ * @author Nick Belaevski
+ * @since 3.2.2
+ */
+
+public interface AjaxChildrenEncoder2State {
+
+ public boolean shouldEncode();
+
+ public static final AjaxChildrenEncoder2State SHOULD_ENCODE = new AjaxChildrenEncoder2State() {
+
+ public boolean shouldEncode() {
+ return true;
+ }
+
+ };
+
+ public static final AjaxChildrenEncoder2State SHOULD_NOT_ENCODE = new AjaxChildrenEncoder2State() {
+
+ public boolean shouldEncode() {
+ return false;
+ }
+
+ };
+}
16 years, 3 months
JBoss Rich Faces SVN: r9925 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-05 13:08:39 -0400 (Tue, 05 Aug 2008)
New Revision: 9925
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-3892 - State Manager API section fixed
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-05 16:37:45 UTC (rev 9924)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-05 17:08:39 UTC (rev 9925)
@@ -3773,85 +3773,6 @@
</section>
-
-
- <section>
- <title>Client-side script for extended skinning support</title>
-
- <para>As it was mentioned earlier in the Guide,
- extended skinning of standard HTML controls is applied automatically:
- the browser type is detected and if a browser doesn't fully support
- extended skinning feature, only basic skinning is applied.
- </para>
-
- <para>
- However, if a develop doesn't want to
- the rich components and standard HTML
- controls to be skinned automatically and
- perform the skinnability implementation himself,
- he might encounter with a problem, i.e. standard
- HTML controls in such browsers as Opera and Safari are
- affected by standard controls skinning featured.
- (Here you can get more details on how to disable skinnability.)
- </para>
-
- <para>
- In brief, to disable the skinnability mechanism of RichFaces you need to
- set the "org.richfaces.LoadStyleStrategy" parameter to "NONE" in web.xml.
-
- </para>
-
-<programlisting role="XML"><![CDATA[...
-<context-param>
- <param-name>org.richfaces.LoadStyleStrategy</param-name>
- <param-value>NONE</param-value>
-</context-param>
-...
-]]></programlisting>
-
- <para>
- Additionally, you should include the style sheets that perform skinning
- of the rich component and standard HTML controls.
- </para>
-
- <para>
- In order to resolve the problem with extended skinning in Opera and Safari a client script (skinning.js) is added to the RichFaces library.
- The script detects the browser type and enables extended skinning only for those browsers that fully support it.
-
- </para>
-
- <para>
- The script can be activated by inserting this JavaScript code to the page:
- </para>
-
-<programlisting role="XML"><![CDATA[
-<script type="text/javascript">
-window.RICH_FACES_EXTENDED_SKINNING_ON = true;
-</script>
-]]></programlisting>
-
-
- <para>
- You also need to specify "media" attribute in the
- <link> tag which includes the "extended_both.xcss" style sheet with "rich-extended-skinning".
-
- </para>
- <para>
- This is how you can include the style sheets to the page,
- in case automatic skinnability implementation is disabled.
-
- </para>
-
-<programlisting role="XML"><![CDATA[
-<link href='/YOUR_PROJECT_NAME/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
-<link media='rich-extended-skinning' href='/ YOUR_PROJECT_NAME /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
-<link href='/ YOUR_PROJECT_NAME /a4j_3_2_2-SNAPSHOT/org/richfaces/skin.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
-]]></programlisting>
-
-
-
- </section>
-
<section id="XCSSfileformat">
<title>XCSS file format</title>
<para>
@@ -4511,12 +4432,13 @@
<para>
Actually States is a <property>map</property> where the entry key is name of the State and the value is a State map.
Concrete State map has entries with some names as keys and any objects as values.
- So any values, method bindings, or just simple state constants could be saved in the State map.
+ So any values, method bindings, or just some simple state varialbes (constants) could be saved in the State map.
</para>
<para>
One of the most convenience features of the <property>RichFaces State API</property> is a navigation between states.
The <property>RichFaces State API</property> implements states change as the standard JSF navigation.
- Action component just returns outcome and the <property>RichFaces State API</property> extension for the JSF navigation handler
+ Action component just returns outcome and the RichFaces State API
+ <property>extension for the JSF navigation handler</property>
checks if this outcome registered as a <property>state change outcome</property>.
If the <property>state change outcome</property> is found corresponding state is activated.
Otherwise the standard navigation handling is called.
@@ -4568,8 +4490,77 @@
</managed-bean>
...]]></programlisting>
<para>
- One bean ("config") defines and stores states.
+ One bean ("config") defines and stores states as it is shown in the following example:
</para>
+ <programlisting role="JAVA"><![CDATA[...
+public class Config {
+
+ /**
+ * @return States
+ */
+ public States getStates() {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ States states = new States();
+
+ // Registering new User State definition
+ states.setCurrentState("register"); // Name of the new state
+
+ // Text labels, properties and Labels for controls in "register" state
+ states.put("showConfirm", Boolean.TRUE); // confirm field rendering
+ states.put("link", "(To login)"); // Switch State link label
+ states.put("okBtn", "Register"); // Login/Register button label
+ states.put("stateTitle", "Register New User"); // Panel title
+
+ ExpressionFactory expressionFactory = facesContext.getApplication()
+ .getExpressionFactory();
+
+ // Define "registerbean" available under "bean" EL binding on the page
+ ValueExpression beanExpression = expressionFactory
+ .createValueExpression(facesContext.getELContext(),
+ "#{registerbean}", Bean.class);
+ states.put("bean", beanExpression);
+
+ // Define "registeraction" available under "action" EL binding on the
+ // page
+ beanExpression = expressionFactory.createValueExpression(facesContext
+ .getELContext(), "#{registeraction}", RegisterAction.class);
+ states.put("action", beanExpression);
+
+ // Define method expression inside registeraction binding for this state
+ MethodExpression methodExpression = expressionFactory.createMethodExpression(
+ facesContext.getELContext(), "#{registeraction.ok}",
+ String.class, new Class[] {});
+ states.put("ok", methodExpression);
+
+ // Outcome for switching to login state definition
+ states.setNavigation("switch", "login");
+
+ // Login Existent User State analogous definition
+ states.setCurrentState("login");
+ states.put("showConfirm", Boolean.FALSE);
+ states.put("link", "(To register)");
+ states.put("okBtn", "Login");
+ states.put("stateTitle", "Login Existing User");
+
+ beanExpression = expressionFactory.createValueExpression(facesContext
+ .getELContext(), "#{loginbean}", Bean.class);
+ states.put("bean", beanExpression);
+
+ beanExpression = expressionFactory.createValueExpression(facesContext
+ .getELContext(), "#{loginaction}", LoginAction.class);
+ states.put("action", beanExpression);
+
+ methodExpression = expressionFactory.createMethodExpression(
+ facesContext.getELContext(), "#{loginaction.ok}",
+ String.class, new Class[] {});
+ states.put("ok", methodExpression);
+
+ states.setNavigation("switch", "register");
+
+ return states;
+ }
+}
+...]]></programlisting>
<para>
The other bean ("state") with the type <code>org.richfaces.ui.model.States</code> has
the "states" managed property that is bound to the "config" bean which defines states.
@@ -4577,13 +4568,24 @@
</listitem>
<listitem>
<para>
- Use <property>state</property> bindings on the pages.
+ Use <property>state</property> bindings on the page. See the following example:
</para>
+ <programlisting role="XML"><![CDATA[...
+<h:panelGrid columns="3">
+ <h:outputText value="username" />
+ <h:inputText value="#{state.bean.name}" id="name" required="true" />
+ <h:outputText value="password" />
+ <h:inputSecret value="#{state.bean.password}" id="password" required="true" />
+ <h:outputText value="confirm" rendered="#{state.showConfirm}" />
+ <h:inputSecret value="#{state.bean.confirmPassword}" rendered="#{state.showConfirm}" id="confirm" required="true" />
+</h:panelGrid>
+<a4j:commandButton actionListener="#{state.action.listener}" action="#{state.ok}" value="#{state.okBtn}" id="action"/>
+...]]></programlisting>
</listitem>
</itemizedlist>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/stateAPI.jsf?c=stateAPI">Here</ulink>
- you could find the <property>Login/Register dialog</property> example and sources for the given example.
+ To get full <property>Login/Register dialog</property> example, please,
+ click <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/stateAPI.jsf?c=stateAPI">here</ulink>.
</para>
</section>
</chapter>
16 years, 3 months