JBoss Rich Faces SVN: r10298 - trunk/ui/dataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-09-03 10:57:19 -0400 (Wed, 03 Sep 2008)
New Revision: 10298
Modified:
trunk/ui/dataTable/src/main/config/component/dataList.xml
Log:
https://jira.jboss.org/jira/browse/RF-3143
Modified: trunk/ui/dataTable/src/main/config/component/dataList.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/dataList.xml 2008-09-03 14:34:17 UTC (rev 10297)
+++ trunk/ui/dataTable/src/main/config/component/dataList.xml 2008-09-03 14:57:19 UTC (rev 10298)
@@ -83,6 +83,21 @@
<classname>org.ajax4jsf.model.DataComponentState</classname>
<description>It defines EL-binding for a component state for saving or redefinition</description>
</property>
+
+ <property hidden="true">
+ <name>footerClass</name>
+ <classname>java.lang.String</classname>
+ </property>
+
+ <property hidden="true">
+ <name>headerClass</name>
+ <classname>java.lang.String</classname>
+ </property>
+
+ <property hidden="true">
+ <name>columnClasses</name>
+ <classname>java.lang.String</classname>
+ </property>
<!--
<property>
<name>param</name>
16 years, 3 months
JBoss Rich Faces SVN: r10297 - in trunk/ui/columns/src/main: java/org/richfaces/taglib and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-03 10:34:17 -0400 (Wed, 03 Sep 2008)
New Revision: 10297
Added:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java
Removed:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
Modified:
trunk/ui/columns/src/main/config/component/columns.xml
Log:
Revert RF-4348.
Modified: trunk/ui/columns/src/main/config/component/columns.xml
===================================================================
--- trunk/ui/columns/src/main/config/component/columns.xml 2008-09-03 14:27:22 UTC (rev 10296)
+++ trunk/ui/columns/src/main/config/component/columns.xml 2008-09-03 14:34:17 UTC (rev 10297)
@@ -20,7 +20,7 @@
<test/>
</tag>
<taghandler generate="false">
- <classname>org.richfaces.taglib.ColumnsHandler</classname>
+ <classname>org.richfaces.taglib.ComponentHandler</classname>
</taghandler>
&ui_data_attributes;
&attributes;
Deleted: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2008-09-03 14:27:22 UTC (rev 10296)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2008-09-03 14:34:17 UTC (rev 10297)
@@ -1,411 +0,0 @@
-/*
- * ColumnsHandler.java Date created: 07.12.2007
- * Last modified by: $Author$
- * $Revision$ $Date$
- */
-
-package org.richfaces.taglib;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.el.VariableMapper;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.servlet.jsp.JspTagException;
-
-import org.richfaces.iterator.ForEachIterator;
-import org.richfaces.iterator.SimpleForEachIterator;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRuleset;
-import com.sun.facelets.tag.MetaTagHandler;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-
-
-
-/**
- * TODO Class description goes here.
- *
- * @author "Andrey Markavtsov"
- *
- */
-public class ColumnsHandler extends MetaTagHandler {
-
- com.sun.facelets.tag.jsf.ComponentHandler handler;
-
- /** value attribute */
- private TagAttribute value;
-
- /** end attribute */
- private TagAttribute columns;
-
- /** begin attribute */
- private TagAttribute begin;
-
- /** var attribute */
- private TagAttribute var;
-
- /** index attribute */
- private TagAttribute index;
-
- /** end attribute */
- private TagAttribute end;
-
- /** Iterator for columns's tag value attribute */
- protected ForEachIterator items; // our 'digested' items
-
- /** Value attribute value */
- protected Object rawItems; // our 'raw' items
-
- /** Var attr - defines page variable for current item */
- private String _indexId;
-
- /** Integer value begin attr */
- private Integer _begin;
-
- /** Integer value end attr */
- private Integer _end;
-
- /** Integer value of end attr. */
- private Integer _columns;
-
- /** String value of var attr */
- private String _itemId = null;
-
- /** Current column counter */
- private Integer _index = 0;
-
- /** Expression for var item */
- private IteratedExpression iteratedExpression;
-
- /**
- * TODO Description goes here.
- *
- * @param config
- */
- public ColumnsHandler(ComponentConfig config) {
- super(config);
- handler = new ColumnTagHandler(config);
- }
-
- /**
- * Extracts tags attributes values
- */
- private void initVariables(FaceletContext ctx) {
- initColumnsCount(ctx);
- initIndex(ctx);
- initVar(ctx);
- initBegin(ctx);
- initEnd(ctx);
- }
-
- /**
- * Method prepares all we need for starting of tag rendering
- *
- * @throws JspTagException
- */
- private void prepare(FaceletContext ctx) {
-
- initVariables(ctx);
-
- try {
-
- this.value = getAttribute("value");
-
- // produce the right sort of ForEachIterator
- if (value != null) {
- // If this is a deferred expression, make a note and get
- // the 'items' instance.
-
- rawItems = value.getObject(ctx);
-
- // extract an iterator over the 'items' we've got
- items = SimpleForEachIterator
- .supportedTypeForEachIterator(rawItems);
- } else {
- // no 'items', so use 'begin' and 'end'
- items = SimpleForEachIterator
- .beginEndForEachIterator(_columns - 1);
- }
- } catch (Exception e) {
- // TODO: handle exception
- }
-
- correctFirst(ctx);
- }
-
- /**
- * Inits first iteration item
- */
- private void correctFirst(FaceletContext ctx) {
- if (items != null) {
- if (_begin > 0 && (_index < _begin)) {
- while ((_index < _begin && hasNext())) {
- next(ctx);
- }
- if (!hasNext()) {
- _index = 0;
- }
- }
- }
- }
-
- /**
- * Return true if we didn't complete column's count
- *
- * @return
- * @throws JspTagException
- */
- private boolean hasNext() {
- try {
- if (_end != 0) {
- return (_index < _end) ? items.hasNext() : false;
- } else {
- return items.hasNext();
- }
- } catch (Exception e) {
- return false;
- }
-
- }
-
- /**
- * Iterate to next column
- *
- * @return
- * @throws JspTagException
- */
- private Object next(FaceletContext ctx) {
- try {
- Object o = items.next();
- _index++;
- return o;
- } catch (Exception e) {
- return null;
- }
- }
-
- /**
- * Extracts integer value from end attr
- */
- private void initColumnsCount(FaceletContext ctx) {
- this.columns = getAttribute("columns");
- if (columns != null) {
- try {
- _columns = Integer.parseInt((String) columns.getObject(ctx));
- if (_columns < 0) {
- _columns = 0; // If end is negative set up zero
- }
- } catch (Exception e) {
- _columns = 0;
- }
- } else {
- _columns = 0;
- }
- }
-
- /**
- * Extracts integer value from begin attr
- */
- private void initBegin(FaceletContext ctx) {
- this.begin = getAttribute("begin");
- if (begin != null) {
- try {
- Object o = begin.getObject(ctx);
- if (o instanceof Number) {
- _begin = ((Number)o).intValue();
- }else if (o instanceof String) {
- _begin = Integer.parseInt((String) o);
- }
- _begin--;
- if (_begin < 0) {
- _begin = 0; // If end is negative set up zero
- }
- } catch (Exception e) {
- _begin = 0;
- }
- } else {
- _begin = 0;
- }
- }
-
- /**
- * Extracts integer value from end attr
- */
- private void initEnd(FaceletContext ctx) {
- this.end = getAttribute("end");
- if (end != null) {
- try {
- Object o = end.getObject(ctx);
- if (o instanceof Number) {
- _end = ((Number)o).intValue();
- }else if ( o instanceof String) {
- _end = Integer.parseInt((String) o);
- }
- if (_end < 0) {
- _end = 0; // If end is negative set up zero
- }
- } catch (Exception e) {
- _end = 0;
- }
- } else {
- _end = 0;
- }
- }
-
- /**
- * Extracts string value from var attr
- */
- private void initVar(FaceletContext ctx) {
- this.var = getAttribute("var");
- if (var != null) {
- try {
- _itemId = (String) var.getObject(ctx);
- } catch (ClassCastException e) {
- _itemId = null;
- }
-
- }
- }
-
- /**
- * Extracts string value from index attr
- */
- private void initIndex(FaceletContext ctx) {
- this.index = getAttribute("index");
- if (index != null) {
- try {
- _indexId = (String) index.getObject(ctx);
- } catch (ClassCastException e) {
- _indexId = null;
- }
-
- }
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.taglib.ComponentHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
- */
- //@Override
- public void apply(FaceletContext ctx, UIComponent parent)
- throws IOException, FacesException, ELException {
-
- prepare(ctx); // prepare data
-
- try {
- while (hasNext()) { // for each
- exposeVariables(ctx, _index);
- //super.apply(ctx, parent);
- handler.apply(ctx, parent);
- next(ctx);
- }
- } catch (Exception e) {
- // TODO: handle exception
- } finally {
- release();
- unExposeVariables(ctx);
- }
-
- }
-
- protected void applyNextHandler(FaceletContext ctx, UIComponent c)
- throws IOException, FacesException, ELException {
- // TODO Auto-generated method stub
- //super.applyNextHandler(ctx, c);
-
- }
-
-
- /**
- * Sets page request variables
- *
- * @throws JspTagException
- */
- private void exposeVariables(FaceletContext ctx, int k) {
-
- VariableMapper vm = ctx.getVariableMapper();
-
- if (_itemId != null) {
- if (vm != null) {
- if (value != null) {
- ValueExpression srcVE = value.getValueExpression(ctx,
- Object.class);
- ValueExpression ve = getVarExpression(ctx, srcVE, k);
- vm.setVariable(_itemId, ve);
- }
- }
-
- }
-
- // Set up index variable
-
- if (_indexId != null) {
- if (vm != null) {
- ValueExpression ve = new IteratedIndexExpression(k);
- vm.setVariable(_indexId, ve);
- }
-
- }
-
- }
-
- /**
- * Removes page attributes that we have exposed and, if applicable, restores
- * them to their prior values (and scopes).
- */
- private void unExposeVariables(FaceletContext ctx) {
- VariableMapper vm = ctx.getVariableMapper();
- // "nested" variables are now simply removed
- if (_itemId != null) {
- if (vm != null)
- vm.setVariable(_itemId, null);
- }
- if (_indexId != null) {
- if (vm != null)
- vm.setVariable(_indexId, null);
- }
- }
-
- /**
- * Return expression for page variables
- *
- * @param expr
- * @return
- */
- private ValueExpression getVarExpression(FaceletContext ctx,
- ValueExpression expr, int k) {
- Object o = expr.getValue(ctx.getFacesContext().getELContext());
- if (o.getClass().isArray() || o instanceof List) {
- return new IndexedValueExpression(expr, k);
- }
-
- if (o instanceof Collection || o instanceof Iterator
- || o instanceof Enumeration || o instanceof Map
- || o instanceof String) {
-
- if (iteratedExpression == null) {
- iteratedExpression = new IteratedExpression(expr, ",");
- }
- return new IteratedValueExpression(iteratedExpression, k);
- }
-
- throw new ELException("FOREACH_BAD_ITEMS");
- }
-
- /**
- * Release iteration variables
- */
- private void release() {
- this.items = null;
- this._index = 0;
- }
-
-}
Copied: trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java (from rev 10296, trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java)
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java (rev 0)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java 2008-09-03 14:34:17 UTC (rev 10297)
@@ -0,0 +1,411 @@
+/*
+ * ColumnsHandler.java Date created: 07.12.2007
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.taglib;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.el.VariableMapper;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.servlet.jsp.JspTagException;
+
+import org.richfaces.iterator.ForEachIterator;
+import org.richfaces.iterator.SimpleForEachIterator;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.MetaTagHandler;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+
+
+/**
+ * TODO Class description goes here.
+ *
+ * @author "Andrey Markavtsov"
+ *
+ */
+public class ComponentHandler extends MetaTagHandler {
+
+ com.sun.facelets.tag.jsf.ComponentHandler handler;
+
+ /** value attribute */
+ private TagAttribute value;
+
+ /** end attribute */
+ private TagAttribute columns;
+
+ /** begin attribute */
+ private TagAttribute begin;
+
+ /** var attribute */
+ private TagAttribute var;
+
+ /** index attribute */
+ private TagAttribute index;
+
+ /** end attribute */
+ private TagAttribute end;
+
+ /** Iterator for columns's tag value attribute */
+ protected ForEachIterator items; // our 'digested' items
+
+ /** Value attribute value */
+ protected Object rawItems; // our 'raw' items
+
+ /** Var attr - defines page variable for current item */
+ private String _indexId;
+
+ /** Integer value begin attr */
+ private Integer _begin;
+
+ /** Integer value end attr */
+ private Integer _end;
+
+ /** Integer value of end attr. */
+ private Integer _columns;
+
+ /** String value of var attr */
+ private String _itemId = null;
+
+ /** Current column counter */
+ private Integer _index = 0;
+
+ /** Expression for var item */
+ private IteratedExpression iteratedExpression;
+
+ /**
+ * TODO Description goes here.
+ *
+ * @param config
+ */
+ public ComponentHandler(ComponentConfig config) {
+ super(config);
+ handler = new ColumnTagHandler(config);
+ }
+
+ /**
+ * Extracts tags attributes values
+ */
+ private void initVariables(FaceletContext ctx) {
+ initColumnsCount(ctx);
+ initIndex(ctx);
+ initVar(ctx);
+ initBegin(ctx);
+ initEnd(ctx);
+ }
+
+ /**
+ * Method prepares all we need for starting of tag rendering
+ *
+ * @throws JspTagException
+ */
+ private void prepare(FaceletContext ctx) {
+
+ initVariables(ctx);
+
+ try {
+
+ this.value = getAttribute("value");
+
+ // produce the right sort of ForEachIterator
+ if (value != null) {
+ // If this is a deferred expression, make a note and get
+ // the 'items' instance.
+
+ rawItems = value.getObject(ctx);
+
+ // extract an iterator over the 'items' we've got
+ items = SimpleForEachIterator
+ .supportedTypeForEachIterator(rawItems);
+ } else {
+ // no 'items', so use 'begin' and 'end'
+ items = SimpleForEachIterator
+ .beginEndForEachIterator(_columns - 1);
+ }
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+
+ correctFirst(ctx);
+ }
+
+ /**
+ * Inits first iteration item
+ */
+ private void correctFirst(FaceletContext ctx) {
+ if (items != null) {
+ if (_begin > 0 && (_index < _begin)) {
+ while ((_index < _begin && hasNext())) {
+ next(ctx);
+ }
+ if (!hasNext()) {
+ _index = 0;
+ }
+ }
+ }
+ }
+
+ /**
+ * Return true if we didn't complete column's count
+ *
+ * @return
+ * @throws JspTagException
+ */
+ private boolean hasNext() {
+ try {
+ if (_end != 0) {
+ return (_index < _end) ? items.hasNext() : false;
+ } else {
+ return items.hasNext();
+ }
+ } catch (Exception e) {
+ return false;
+ }
+
+ }
+
+ /**
+ * Iterate to next column
+ *
+ * @return
+ * @throws JspTagException
+ */
+ private Object next(FaceletContext ctx) {
+ try {
+ Object o = items.next();
+ _index++;
+ return o;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /**
+ * Extracts integer value from end attr
+ */
+ private void initColumnsCount(FaceletContext ctx) {
+ this.columns = getAttribute("columns");
+ if (columns != null) {
+ try {
+ _columns = Integer.parseInt((String) columns.getObject(ctx));
+ if (_columns < 0) {
+ _columns = 0; // If end is negative set up zero
+ }
+ } catch (Exception e) {
+ _columns = 0;
+ }
+ } else {
+ _columns = 0;
+ }
+ }
+
+ /**
+ * Extracts integer value from begin attr
+ */
+ private void initBegin(FaceletContext ctx) {
+ this.begin = getAttribute("begin");
+ if (begin != null) {
+ try {
+ Object o = begin.getObject(ctx);
+ if (o instanceof Number) {
+ _begin = ((Number)o).intValue();
+ }else if (o instanceof String) {
+ _begin = Integer.parseInt((String) o);
+ }
+ _begin--;
+ if (_begin < 0) {
+ _begin = 0; // If end is negative set up zero
+ }
+ } catch (Exception e) {
+ _begin = 0;
+ }
+ } else {
+ _begin = 0;
+ }
+ }
+
+ /**
+ * Extracts integer value from end attr
+ */
+ private void initEnd(FaceletContext ctx) {
+ this.end = getAttribute("end");
+ if (end != null) {
+ try {
+ Object o = end.getObject(ctx);
+ if (o instanceof Number) {
+ _end = ((Number)o).intValue();
+ }else if ( o instanceof String) {
+ _end = Integer.parseInt((String) o);
+ }
+ if (_end < 0) {
+ _end = 0; // If end is negative set up zero
+ }
+ } catch (Exception e) {
+ _end = 0;
+ }
+ } else {
+ _end = 0;
+ }
+ }
+
+ /**
+ * Extracts string value from var attr
+ */
+ private void initVar(FaceletContext ctx) {
+ this.var = getAttribute("var");
+ if (var != null) {
+ try {
+ _itemId = (String) var.getObject(ctx);
+ } catch (ClassCastException e) {
+ _itemId = null;
+ }
+
+ }
+ }
+
+ /**
+ * Extracts string value from index attr
+ */
+ private void initIndex(FaceletContext ctx) {
+ this.index = getAttribute("index");
+ if (index != null) {
+ try {
+ _indexId = (String) index.getObject(ctx);
+ } catch (ClassCastException e) {
+ _indexId = null;
+ }
+
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.taglib.ComponentHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+ */
+ //@Override
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws IOException, FacesException, ELException {
+
+ prepare(ctx); // prepare data
+
+ try {
+ while (hasNext()) { // for each
+ exposeVariables(ctx, _index);
+ //super.apply(ctx, parent);
+ handler.apply(ctx, parent);
+ next(ctx);
+ }
+ } catch (Exception e) {
+ // TODO: handle exception
+ } finally {
+ release();
+ unExposeVariables(ctx);
+ }
+
+ }
+
+ protected void applyNextHandler(FaceletContext ctx, UIComponent c)
+ throws IOException, FacesException, ELException {
+ // TODO Auto-generated method stub
+ //super.applyNextHandler(ctx, c);
+
+ }
+
+
+ /**
+ * Sets page request variables
+ *
+ * @throws JspTagException
+ */
+ private void exposeVariables(FaceletContext ctx, int k) {
+
+ VariableMapper vm = ctx.getVariableMapper();
+
+ if (_itemId != null) {
+ if (vm != null) {
+ if (value != null) {
+ ValueExpression srcVE = value.getValueExpression(ctx,
+ Object.class);
+ ValueExpression ve = getVarExpression(ctx, srcVE, k);
+ vm.setVariable(_itemId, ve);
+ }
+ }
+
+ }
+
+ // Set up index variable
+
+ if (_indexId != null) {
+ if (vm != null) {
+ ValueExpression ve = new IteratedIndexExpression(k);
+ vm.setVariable(_indexId, ve);
+ }
+
+ }
+
+ }
+
+ /**
+ * Removes page attributes that we have exposed and, if applicable, restores
+ * them to their prior values (and scopes).
+ */
+ private void unExposeVariables(FaceletContext ctx) {
+ VariableMapper vm = ctx.getVariableMapper();
+ // "nested" variables are now simply removed
+ if (_itemId != null) {
+ if (vm != null)
+ vm.setVariable(_itemId, null);
+ }
+ if (_indexId != null) {
+ if (vm != null)
+ vm.setVariable(_indexId, null);
+ }
+ }
+
+ /**
+ * Return expression for page variables
+ *
+ * @param expr
+ * @return
+ */
+ private ValueExpression getVarExpression(FaceletContext ctx,
+ ValueExpression expr, int k) {
+ Object o = expr.getValue(ctx.getFacesContext().getELContext());
+ if (o.getClass().isArray() || o instanceof List) {
+ return new IndexedValueExpression(expr, k);
+ }
+
+ if (o instanceof Collection || o instanceof Iterator
+ || o instanceof Enumeration || o instanceof Map
+ || o instanceof String) {
+
+ if (iteratedExpression == null) {
+ iteratedExpression = new IteratedExpression(expr, ",");
+ }
+ return new IteratedValueExpression(iteratedExpression, k);
+ }
+
+ throw new ELException("FOREACH_BAD_ITEMS");
+ }
+
+ /**
+ * Release iteration variables
+ */
+ private void release() {
+ this.items = null;
+ this._index = 0;
+ }
+
+}
16 years, 3 months
JBoss Rich Faces SVN: r10296 - trunk/ui/columns.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-03 10:27:22 -0400 (Wed, 03 Sep 2008)
New Revision: 10296
Removed:
trunk/ui/columns/columns/
Log:
revert last commit
16 years, 3 months
JBoss Rich Faces SVN: r10295 - trunk/ui/columns.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-03 10:19:02 -0400 (Wed, 03 Sep 2008)
New Revision: 10295
Added:
trunk/ui/columns/columns/
Log:
Copied: trunk/ui/columns/columns (from rev 10254, trunk/ui/columns)
16 years, 3 months
JBoss Rich Faces SVN: r10294 - in trunk/ui/columns/src/main: java/org/richfaces/taglib and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-03 10:17:21 -0400 (Wed, 03 Sep 2008)
New Revision: 10294
Added:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
Removed:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java
Modified:
trunk/ui/columns/src/main/config/component/columns.xml
Log:
RF-4348
Modified: trunk/ui/columns/src/main/config/component/columns.xml
===================================================================
--- trunk/ui/columns/src/main/config/component/columns.xml 2008-09-03 13:35:19 UTC (rev 10293)
+++ trunk/ui/columns/src/main/config/component/columns.xml 2008-09-03 14:17:21 UTC (rev 10294)
@@ -20,7 +20,7 @@
<test/>
</tag>
<taghandler generate="false">
- <classname>org.richfaces.taglib.ComponentHandler</classname>
+ <classname>org.richfaces.taglib.ColumnsHandler</classname>
</taghandler>
&ui_data_attributes;
&attributes;
Copied: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java (from rev 10291, trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java)
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java (rev 0)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2008-09-03 14:17:21 UTC (rev 10294)
@@ -0,0 +1,411 @@
+/*
+ * ColumnsHandler.java Date created: 07.12.2007
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.taglib;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.el.VariableMapper;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.servlet.jsp.JspTagException;
+
+import org.richfaces.iterator.ForEachIterator;
+import org.richfaces.iterator.SimpleForEachIterator;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.MetaTagHandler;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+
+
+/**
+ * TODO Class description goes here.
+ *
+ * @author "Andrey Markavtsov"
+ *
+ */
+public class ColumnsHandler extends MetaTagHandler {
+
+ com.sun.facelets.tag.jsf.ComponentHandler handler;
+
+ /** value attribute */
+ private TagAttribute value;
+
+ /** end attribute */
+ private TagAttribute columns;
+
+ /** begin attribute */
+ private TagAttribute begin;
+
+ /** var attribute */
+ private TagAttribute var;
+
+ /** index attribute */
+ private TagAttribute index;
+
+ /** end attribute */
+ private TagAttribute end;
+
+ /** Iterator for columns's tag value attribute */
+ protected ForEachIterator items; // our 'digested' items
+
+ /** Value attribute value */
+ protected Object rawItems; // our 'raw' items
+
+ /** Var attr - defines page variable for current item */
+ private String _indexId;
+
+ /** Integer value begin attr */
+ private Integer _begin;
+
+ /** Integer value end attr */
+ private Integer _end;
+
+ /** Integer value of end attr. */
+ private Integer _columns;
+
+ /** String value of var attr */
+ private String _itemId = null;
+
+ /** Current column counter */
+ private Integer _index = 0;
+
+ /** Expression for var item */
+ private IteratedExpression iteratedExpression;
+
+ /**
+ * TODO Description goes here.
+ *
+ * @param config
+ */
+ public ColumnsHandler(ComponentConfig config) {
+ super(config);
+ handler = new ColumnTagHandler(config);
+ }
+
+ /**
+ * Extracts tags attributes values
+ */
+ private void initVariables(FaceletContext ctx) {
+ initColumnsCount(ctx);
+ initIndex(ctx);
+ initVar(ctx);
+ initBegin(ctx);
+ initEnd(ctx);
+ }
+
+ /**
+ * Method prepares all we need for starting of tag rendering
+ *
+ * @throws JspTagException
+ */
+ private void prepare(FaceletContext ctx) {
+
+ initVariables(ctx);
+
+ try {
+
+ this.value = getAttribute("value");
+
+ // produce the right sort of ForEachIterator
+ if (value != null) {
+ // If this is a deferred expression, make a note and get
+ // the 'items' instance.
+
+ rawItems = value.getObject(ctx);
+
+ // extract an iterator over the 'items' we've got
+ items = SimpleForEachIterator
+ .supportedTypeForEachIterator(rawItems);
+ } else {
+ // no 'items', so use 'begin' and 'end'
+ items = SimpleForEachIterator
+ .beginEndForEachIterator(_columns - 1);
+ }
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+
+ correctFirst(ctx);
+ }
+
+ /**
+ * Inits first iteration item
+ */
+ private void correctFirst(FaceletContext ctx) {
+ if (items != null) {
+ if (_begin > 0 && (_index < _begin)) {
+ while ((_index < _begin && hasNext())) {
+ next(ctx);
+ }
+ if (!hasNext()) {
+ _index = 0;
+ }
+ }
+ }
+ }
+
+ /**
+ * Return true if we didn't complete column's count
+ *
+ * @return
+ * @throws JspTagException
+ */
+ private boolean hasNext() {
+ try {
+ if (_end != 0) {
+ return (_index < _end) ? items.hasNext() : false;
+ } else {
+ return items.hasNext();
+ }
+ } catch (Exception e) {
+ return false;
+ }
+
+ }
+
+ /**
+ * Iterate to next column
+ *
+ * @return
+ * @throws JspTagException
+ */
+ private Object next(FaceletContext ctx) {
+ try {
+ Object o = items.next();
+ _index++;
+ return o;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /**
+ * Extracts integer value from end attr
+ */
+ private void initColumnsCount(FaceletContext ctx) {
+ this.columns = getAttribute("columns");
+ if (columns != null) {
+ try {
+ _columns = Integer.parseInt((String) columns.getObject(ctx));
+ if (_columns < 0) {
+ _columns = 0; // If end is negative set up zero
+ }
+ } catch (Exception e) {
+ _columns = 0;
+ }
+ } else {
+ _columns = 0;
+ }
+ }
+
+ /**
+ * Extracts integer value from begin attr
+ */
+ private void initBegin(FaceletContext ctx) {
+ this.begin = getAttribute("begin");
+ if (begin != null) {
+ try {
+ Object o = begin.getObject(ctx);
+ if (o instanceof Number) {
+ _begin = ((Number)o).intValue();
+ }else if (o instanceof String) {
+ _begin = Integer.parseInt((String) o);
+ }
+ _begin--;
+ if (_begin < 0) {
+ _begin = 0; // If end is negative set up zero
+ }
+ } catch (Exception e) {
+ _begin = 0;
+ }
+ } else {
+ _begin = 0;
+ }
+ }
+
+ /**
+ * Extracts integer value from end attr
+ */
+ private void initEnd(FaceletContext ctx) {
+ this.end = getAttribute("end");
+ if (end != null) {
+ try {
+ Object o = end.getObject(ctx);
+ if (o instanceof Number) {
+ _end = ((Number)o).intValue();
+ }else if ( o instanceof String) {
+ _end = Integer.parseInt((String) o);
+ }
+ if (_end < 0) {
+ _end = 0; // If end is negative set up zero
+ }
+ } catch (Exception e) {
+ _end = 0;
+ }
+ } else {
+ _end = 0;
+ }
+ }
+
+ /**
+ * Extracts string value from var attr
+ */
+ private void initVar(FaceletContext ctx) {
+ this.var = getAttribute("var");
+ if (var != null) {
+ try {
+ _itemId = (String) var.getObject(ctx);
+ } catch (ClassCastException e) {
+ _itemId = null;
+ }
+
+ }
+ }
+
+ /**
+ * Extracts string value from index attr
+ */
+ private void initIndex(FaceletContext ctx) {
+ this.index = getAttribute("index");
+ if (index != null) {
+ try {
+ _indexId = (String) index.getObject(ctx);
+ } catch (ClassCastException e) {
+ _indexId = null;
+ }
+
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.taglib.ComponentHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+ */
+ //@Override
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws IOException, FacesException, ELException {
+
+ prepare(ctx); // prepare data
+
+ try {
+ while (hasNext()) { // for each
+ exposeVariables(ctx, _index);
+ //super.apply(ctx, parent);
+ handler.apply(ctx, parent);
+ next(ctx);
+ }
+ } catch (Exception e) {
+ // TODO: handle exception
+ } finally {
+ release();
+ unExposeVariables(ctx);
+ }
+
+ }
+
+ protected void applyNextHandler(FaceletContext ctx, UIComponent c)
+ throws IOException, FacesException, ELException {
+ // TODO Auto-generated method stub
+ //super.applyNextHandler(ctx, c);
+
+ }
+
+
+ /**
+ * Sets page request variables
+ *
+ * @throws JspTagException
+ */
+ private void exposeVariables(FaceletContext ctx, int k) {
+
+ VariableMapper vm = ctx.getVariableMapper();
+
+ if (_itemId != null) {
+ if (vm != null) {
+ if (value != null) {
+ ValueExpression srcVE = value.getValueExpression(ctx,
+ Object.class);
+ ValueExpression ve = getVarExpression(ctx, srcVE, k);
+ vm.setVariable(_itemId, ve);
+ }
+ }
+
+ }
+
+ // Set up index variable
+
+ if (_indexId != null) {
+ if (vm != null) {
+ ValueExpression ve = new IteratedIndexExpression(k);
+ vm.setVariable(_indexId, ve);
+ }
+
+ }
+
+ }
+
+ /**
+ * Removes page attributes that we have exposed and, if applicable, restores
+ * them to their prior values (and scopes).
+ */
+ private void unExposeVariables(FaceletContext ctx) {
+ VariableMapper vm = ctx.getVariableMapper();
+ // "nested" variables are now simply removed
+ if (_itemId != null) {
+ if (vm != null)
+ vm.setVariable(_itemId, null);
+ }
+ if (_indexId != null) {
+ if (vm != null)
+ vm.setVariable(_indexId, null);
+ }
+ }
+
+ /**
+ * Return expression for page variables
+ *
+ * @param expr
+ * @return
+ */
+ private ValueExpression getVarExpression(FaceletContext ctx,
+ ValueExpression expr, int k) {
+ Object o = expr.getValue(ctx.getFacesContext().getELContext());
+ if (o.getClass().isArray() || o instanceof List) {
+ return new IndexedValueExpression(expr, k);
+ }
+
+ if (o instanceof Collection || o instanceof Iterator
+ || o instanceof Enumeration || o instanceof Map
+ || o instanceof String) {
+
+ if (iteratedExpression == null) {
+ iteratedExpression = new IteratedExpression(expr, ",");
+ }
+ return new IteratedValueExpression(iteratedExpression, k);
+ }
+
+ throw new ELException("FOREACH_BAD_ITEMS");
+ }
+
+ /**
+ * Release iteration variables
+ */
+ private void release() {
+ this.items = null;
+ this._index = 0;
+ }
+
+}
Deleted: trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java 2008-09-03 13:35:19 UTC (rev 10293)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java 2008-09-03 14:17:21 UTC (rev 10294)
@@ -1,411 +0,0 @@
-/*
- * ColumnsHandler.java Date created: 07.12.2007
- * Last modified by: $Author$
- * $Revision$ $Date$
- */
-
-package org.richfaces.taglib;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.el.VariableMapper;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.servlet.jsp.JspTagException;
-
-import org.richfaces.iterator.ForEachIterator;
-import org.richfaces.iterator.SimpleForEachIterator;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRuleset;
-import com.sun.facelets.tag.MetaTagHandler;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-
-
-
-/**
- * TODO Class description goes here.
- *
- * @author "Andrey Markavtsov"
- *
- */
-public class ComponentHandler extends MetaTagHandler {
-
- com.sun.facelets.tag.jsf.ComponentHandler handler;
-
- /** value attribute */
- private TagAttribute value;
-
- /** end attribute */
- private TagAttribute columns;
-
- /** begin attribute */
- private TagAttribute begin;
-
- /** var attribute */
- private TagAttribute var;
-
- /** index attribute */
- private TagAttribute index;
-
- /** end attribute */
- private TagAttribute end;
-
- /** Iterator for columns's tag value attribute */
- protected ForEachIterator items; // our 'digested' items
-
- /** Value attribute value */
- protected Object rawItems; // our 'raw' items
-
- /** Var attr - defines page variable for current item */
- private String _indexId;
-
- /** Integer value begin attr */
- private Integer _begin;
-
- /** Integer value end attr */
- private Integer _end;
-
- /** Integer value of end attr. */
- private Integer _columns;
-
- /** String value of var attr */
- private String _itemId = null;
-
- /** Current column counter */
- private Integer _index = 0;
-
- /** Expression for var item */
- private IteratedExpression iteratedExpression;
-
- /**
- * TODO Description goes here.
- *
- * @param config
- */
- public ComponentHandler(ComponentConfig config) {
- super(config);
- handler = new ColumnTagHandler(config);
- }
-
- /**
- * Extracts tags attributes values
- */
- private void initVariables(FaceletContext ctx) {
- initColumnsCount(ctx);
- initIndex(ctx);
- initVar(ctx);
- initBegin(ctx);
- initEnd(ctx);
- }
-
- /**
- * Method prepares all we need for starting of tag rendering
- *
- * @throws JspTagException
- */
- private void prepare(FaceletContext ctx) {
-
- initVariables(ctx);
-
- try {
-
- this.value = getAttribute("value");
-
- // produce the right sort of ForEachIterator
- if (value != null) {
- // If this is a deferred expression, make a note and get
- // the 'items' instance.
-
- rawItems = value.getObject(ctx);
-
- // extract an iterator over the 'items' we've got
- items = SimpleForEachIterator
- .supportedTypeForEachIterator(rawItems);
- } else {
- // no 'items', so use 'begin' and 'end'
- items = SimpleForEachIterator
- .beginEndForEachIterator(_columns - 1);
- }
- } catch (Exception e) {
- // TODO: handle exception
- }
-
- correctFirst(ctx);
- }
-
- /**
- * Inits first iteration item
- */
- private void correctFirst(FaceletContext ctx) {
- if (items != null) {
- if (_begin > 0 && (_index < _begin)) {
- while ((_index < _begin && hasNext())) {
- next(ctx);
- }
- if (!hasNext()) {
- _index = 0;
- }
- }
- }
- }
-
- /**
- * Return true if we didn't complete column's count
- *
- * @return
- * @throws JspTagException
- */
- private boolean hasNext() {
- try {
- if (_end != 0) {
- return (_index < _end) ? items.hasNext() : false;
- } else {
- return items.hasNext();
- }
- } catch (Exception e) {
- return false;
- }
-
- }
-
- /**
- * Iterate to next column
- *
- * @return
- * @throws JspTagException
- */
- private Object next(FaceletContext ctx) {
- try {
- Object o = items.next();
- _index++;
- return o;
- } catch (Exception e) {
- return null;
- }
- }
-
- /**
- * Extracts integer value from end attr
- */
- private void initColumnsCount(FaceletContext ctx) {
- this.columns = getAttribute("columns");
- if (columns != null) {
- try {
- _columns = Integer.parseInt((String) columns.getObject(ctx));
- if (_columns < 0) {
- _columns = 0; // If end is negative set up zero
- }
- } catch (Exception e) {
- _columns = 0;
- }
- } else {
- _columns = 0;
- }
- }
-
- /**
- * Extracts integer value from begin attr
- */
- private void initBegin(FaceletContext ctx) {
- this.begin = getAttribute("begin");
- if (begin != null) {
- try {
- Object o = begin.getObject(ctx);
- if (o instanceof Number) {
- _begin = ((Number)o).intValue();
- }else if (o instanceof String) {
- _begin = Integer.parseInt((String) o);
- }
- _begin--;
- if (_begin < 0) {
- _begin = 0; // If end is negative set up zero
- }
- } catch (Exception e) {
- _begin = 0;
- }
- } else {
- _begin = 0;
- }
- }
-
- /**
- * Extracts integer value from end attr
- */
- private void initEnd(FaceletContext ctx) {
- this.end = getAttribute("end");
- if (end != null) {
- try {
- Object o = end.getObject(ctx);
- if (o instanceof Number) {
- _end = ((Number)o).intValue();
- }else if ( o instanceof String) {
- _end = Integer.parseInt((String) o);
- }
- if (_end < 0) {
- _end = 0; // If end is negative set up zero
- }
- } catch (Exception e) {
- _end = 0;
- }
- } else {
- _end = 0;
- }
- }
-
- /**
- * Extracts string value from var attr
- */
- private void initVar(FaceletContext ctx) {
- this.var = getAttribute("var");
- if (var != null) {
- try {
- _itemId = (String) var.getObject(ctx);
- } catch (ClassCastException e) {
- _itemId = null;
- }
-
- }
- }
-
- /**
- * Extracts string value from index attr
- */
- private void initIndex(FaceletContext ctx) {
- this.index = getAttribute("index");
- if (index != null) {
- try {
- _indexId = (String) index.getObject(ctx);
- } catch (ClassCastException e) {
- _indexId = null;
- }
-
- }
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.taglib.ComponentHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
- */
- //@Override
- public void apply(FaceletContext ctx, UIComponent parent)
- throws IOException, FacesException, ELException {
-
- prepare(ctx); // prepare data
-
- try {
- while (hasNext()) { // for each
- exposeVariables(ctx, _index);
- //super.apply(ctx, parent);
- handler.apply(ctx, parent);
- next(ctx);
- }
- } catch (Exception e) {
- // TODO: handle exception
- } finally {
- release();
- unExposeVariables(ctx);
- }
-
- }
-
- protected void applyNextHandler(FaceletContext ctx, UIComponent c)
- throws IOException, FacesException, ELException {
- // TODO Auto-generated method stub
- //super.applyNextHandler(ctx, c);
-
- }
-
-
- /**
- * Sets page request variables
- *
- * @throws JspTagException
- */
- private void exposeVariables(FaceletContext ctx, int k) {
-
- VariableMapper vm = ctx.getVariableMapper();
-
- if (_itemId != null) {
- if (vm != null) {
- if (value != null) {
- ValueExpression srcVE = value.getValueExpression(ctx,
- Object.class);
- ValueExpression ve = getVarExpression(ctx, srcVE, k);
- vm.setVariable(_itemId, ve);
- }
- }
-
- }
-
- // Set up index variable
-
- if (_indexId != null) {
- if (vm != null) {
- ValueExpression ve = new IteratedIndexExpression(k);
- vm.setVariable(_indexId, ve);
- }
-
- }
-
- }
-
- /**
- * Removes page attributes that we have exposed and, if applicable, restores
- * them to their prior values (and scopes).
- */
- private void unExposeVariables(FaceletContext ctx) {
- VariableMapper vm = ctx.getVariableMapper();
- // "nested" variables are now simply removed
- if (_itemId != null) {
- if (vm != null)
- vm.setVariable(_itemId, null);
- }
- if (_indexId != null) {
- if (vm != null)
- vm.setVariable(_indexId, null);
- }
- }
-
- /**
- * Return expression for page variables
- *
- * @param expr
- * @return
- */
- private ValueExpression getVarExpression(FaceletContext ctx,
- ValueExpression expr, int k) {
- Object o = expr.getValue(ctx.getFacesContext().getELContext());
- if (o.getClass().isArray() || o instanceof List) {
- return new IndexedValueExpression(expr, k);
- }
-
- if (o instanceof Collection || o instanceof Iterator
- || o instanceof Enumeration || o instanceof Map
- || o instanceof String) {
-
- if (iteratedExpression == null) {
- iteratedExpression = new IteratedExpression(expr, ",");
- }
- return new IteratedValueExpression(iteratedExpression, k);
- }
-
- throw new ELException("FOREACH_BAD_ITEMS");
- }
-
- /**
- * Release iteration variables
- */
- private void release() {
- this.items = null;
- this._index = 0;
- }
-
-}
16 years, 3 months
JBoss Rich Faces SVN: r10293 - trunk/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-09-03 09:35:19 -0400 (Wed, 03 Sep 2008)
New Revision: 10293
Modified:
trunk/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/jquery.hotkeys.js
Log:
https://jira.jboss.org/jira/browse/RF-4382
Modified: trunk/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/jquery.hotkeys.js
===================================================================
--- trunk/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/jquery.hotkeys.js 2008-09-03 13:03:03 UTC (rev 10292)
+++ trunk/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/jquery.hotkeys.js 2008-09-03 13:35:19 UTC (rev 10293)
@@ -90,13 +90,13 @@
return;
}
} else {
- if ('inputs' == types) {
+ if ('texts' == types) {
return;
}
}
}
} else if (target.is("textarea")) {
- if ('inputs' == types || 'all' == types) {
+ if ('texts' == types || 'all' == types) {
return;
}
} else if (target.is("button")) {
16 years, 3 months
JBoss Rich Faces SVN: r10292 - in trunk/samples: glassX/src/main/resources/org/richfaces/skins/glassx/css and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-09-03 09:03:03 -0400 (Wed, 03 Sep 2008)
New Revision: 10292
Modified:
trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/dataFilterSlider.xcss
trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/panelMenu.xcss
trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/toolBar.xcss
trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/data-filter-slider.xcss
trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/tool-bar.xcss
trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/dataFilterSlider.xcss
trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/panelMenu.xcss
trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/toolBar.xcss
Log:
https://jira.jboss.org/jira/browse/RF-4157
https://jira.jboss.org/jira/browse/RF-4273
Modified: trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/dataFilterSlider.xcss
===================================================================
--- trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/dataFilterSlider.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/dataFilterSlider.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -4,20 +4,27 @@
xmlns="http://www.w3.org/1999/xhtml" >
<u:selector name=".rich-dataFilterSlider-range">
- <u:style name="border" value="0px" />
- </u:selector>
+ <u:style name="border-width" value="1px" />
+ <u:style name="border-style" value="solid" />
+ <u:style name="border-color" skin="newBorder" />
+
+ <u:style name="background-position" value="0% 50%" />
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
+ <f:attribute name="valign" value="middle" />
+
+ <f:attribute name="gradientHeight" value="12px" />
+ <f:attribute name="baseColor" skin="newBorder" />
+ </f:resource>
+ </u:style>
+</u:selector>
- <u:selector name=".rich-dataFilterSlider-trailer">
- <u:style name="border" value="0px" />
- </u:selector>
<u:selector name=".rich-dataFilterSlider-input-field">
</u:selector>
- <u:selector name=".rich-dataFilterSlider-track">
- <u:style name="border-width" value="1px" />
- <u:style name="border-style" value="solid" />
- <u:style name="border-color" skin="newBorder" />
+ <u:selector name=".rich-dataFilterSlider-trailer">
+ <u:style name="border" value="0px" />
<u:style name="background-position" value="0% 50%" />
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
@@ -28,6 +35,9 @@
</f:resource>
</u:style>
</u:selector>
+
+ <u:selector name=".rich-dataFilterSlider-track">
+ </u:selector>
<u:selector name=".rich-dataFilterSlider-range-decor">
<u:style name="border" value="0px" />
Modified: trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/panelMenu.xcss
===================================================================
--- trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/panelMenu.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/panelMenu.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -45,6 +45,39 @@
+ <u:selector name=".rich-pmenu-group.rich-pmenu-hovered-element">
+ <u:style name="border-color" skin="newBorder" />
+ <u:style name="background-position" value="0% 50%" />
+ <u:style name="padding" value="6px 2px 6px 2px " />
+
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
+ <f:attribute name="valign" value="middle" />
+
+ <f:attribute name="gradientHeight" value="36px" />
+ <f:attribute name="baseColor" skin="additionalBackgroundColor" />
+ </f:resource>
+ </u:style>
+ </u:selector>
+
+
+ <u:selector name=".rich-pmenu-top-group.rich-pmenu-hovered-element">
+ <u:style name="border" value="0px" />
+ <u:style name="background-position" value="0% 50%" />
+ <u:style name="padding" value="6px 2px 6px 2px " />
+
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
+ <f:attribute name="valign" value="middle" />
+
+ <f:attribute name="gradientHeight" value="36px" />
+ <f:attribute name="baseColor" skin="headerBackgroundColor" />
+ </f:resource>
+ </u:style>
+ </u:selector>
+
+
+
<u:selector name=".rich-pmenu-item">
<u:style name="margin" value="0px" />
Modified: trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/toolBar.xcss
===================================================================
--- trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/toolBar.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/darkX/src/main/resources/org/richfaces/skins/darkx/css/toolBar.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -6,6 +6,7 @@
<u:selector name=".rich-toolbar">
<u:style name="padding" value="0px 5px 0px 5px" />
+ <u:style name="height" value="0px" />
<u:style name="border-color" skin="newBorder" />
<u:style name="background-position" value="0% 50%" />
Modified: trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/data-filter-slider.xcss
===================================================================
--- trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/data-filter-slider.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/data-filter-slider.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -4,18 +4,22 @@
xmlns="http://www.w3.org/1999/xhtml" >
<u:selector name=".rich-dataFilterSlider-range">
- <u:style name="border" value="0px" />
+ <u:style name="border-width" value="1px" />
+ <u:style name="border-style" value="solid" />
+ <u:style name="border-color" skin="newBorder" />
+ <u:style name="background-position" value="0% 50%" />
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
+ <f:attribute name="valign" value="middle" />
+
+ <f:attribute name="gradientHeight" value="12px" />
+ <f:attribute name="baseColor" skin="additionalBackgroundColor" />
+ </f:resource>
+ </u:style>
</u:selector>
<u:selector name=".rich-dataFilterSlider-trailer">
- <u:style name="border" value="0px" />
- </u:selector>
-
- <u:selector name=".rich-dataFilterSlider-input-field">
- </u:selector>
-
- <u:selector name=".rich-dataFilterSlider-track">
- <u:style name="border-width" value="1px" />
+ <u:style name="border-width" value="0px" />
<u:style name="border-style" value="solid" />
<u:style name="border-color" skin="newBorder" />
<u:style name="background-position" value="0% 50%" />
@@ -29,6 +33,12 @@
</u:style>
</u:selector>
+ <u:selector name=".rich-dataFilterSlider-input-field">
+ </u:selector>
+
+ <u:selector name=".rich-dataFilterSlider-track">
+ </u:selector>
+
<u:selector name=".rich-dataFilterSlider-range-decor">
<u:style name="border" value="0px" />
</u:selector>
Modified: trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/tool-bar.xcss
===================================================================
--- trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/tool-bar.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/glassX/src/main/resources/org/richfaces/skins/glassx/css/tool-bar.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -6,6 +6,7 @@
<u:selector name=".rich-toolbar">
<u:style name="padding" value="0px 5px 0px 5px" />
+ <u:style name="height" value="0px" />
<u:style name="border-color" skin="newBorder" />
<u:style name="background-position" value="0% 50%" />
Modified: trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/dataFilterSlider.xcss
===================================================================
--- trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/dataFilterSlider.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/dataFilterSlider.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -4,17 +4,6 @@
xmlns="http://www.w3.org/1999/xhtml" >
<u:selector name=".rich-dataFilterSlider-range">
- <u:style name="border" value="0px" />
- </u:selector>
-
- <u:selector name=".rich-dataFilterSlider-trailer">
- <u:style name="border" value="0px" />
- </u:selector>
-
- <u:selector name=".rich-dataFilterSlider-input-field">
- </u:selector>
-
- <u:selector name=".rich-dataFilterSlider-track">
<u:style name="border-width" value="1px" />
<u:style name="border-style" value="solid" />
<u:style name="border-color" skin="newBorder" />
@@ -30,6 +19,26 @@
</u:style>
</u:selector>
+ <u:selector name=".rich-dataFilterSlider-trailer">
+ <u:style name="border" value="0px" />
+ <u:style name="background-position" value="0% 50%" />
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
+ <f:attribute name="valign" value="middle " />
+ <f:attribute name="gradientHeight" value="10px" />
+ <f:attribute name="gradientType" value="plain" />
+ <f:attribute name="baseColor" skin="generalBackgroundColor" />
+ <f:attribute name="gradientColor" skin="tableSubfooterBackgroundColor" />
+ </f:resource>
+ </u:style>
+ </u:selector>
+
+ <u:selector name=".rich-dataFilterSlider-input-field">
+ </u:selector>
+
+ <u:selector name=".rich-dataFilterSlider-track">
+ </u:selector>
+
<u:selector name=".rich-dataFilterSlider-range-decor">
<u:style name="border" value="0px" />
</u:selector>
Modified: trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/panelMenu.xcss
===================================================================
--- trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/panelMenu.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/panelMenu.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -27,6 +27,7 @@
</u:selector>
+
<u:selector name=".rich-pmenu-top-group">
<u:style name="border" value="0px" />
<u:style name="background-position" value="0% 50%" />
@@ -42,7 +43,37 @@
</u:selector>
+ <u:selector name=".rich-pmenu-group.rich-pmenu-hovered-element">
+ <u:style name="border-color" skin="newBorder" />
+ <u:style name="background-position" value="0% 50%" />
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
+ <f:attribute name="valign" value="middle" />
+
+ <f:attribute name="gradientHeight" value="22px" />
+ <f:attribute name="baseColor" skin="additionalBackgroundColor" />
+ </f:resource>
+ </u:style>
+ </u:selector>
+
+
+ <u:selector name=".rich-pmenu-top-group.rich-pmenu-hovered-element">
+ <u:style name="border" value="0px" />
+ <u:style name="background-position" value="0% 50%" />
+
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.CustomizeableGradient">
+ <f:attribute name="valign" value="middle" />
+
+ <f:attribute name="gradientHeight" value="22px" />
+ <f:attribute name="baseColor" skin="headerBackgroundColor" />
+ </f:resource>
+ </u:style>
+ </u:selector>
+
+
+
<u:selector name=".rich-pmenu-item">
<u:style name="margin" value="0px" />
Modified: trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/toolBar.xcss
===================================================================
--- trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/toolBar.xcss 2008-09-03 10:53:40 UTC (rev 10291)
+++ trunk/samples/laguna/src/main/resources/org/richfaces/skins/laguna/css/toolBar.xcss 2008-09-03 13:03:03 UTC (rev 10292)
@@ -6,7 +6,8 @@
<u:selector name=".rich-toolbar">
<u:style name="padding" value="0px 5px 0px 5px" />
- <u:style name="border-color" skin="newBorder" />
+ <u:style name="height" value="0px" />
+ <u:style name="border-color" skin="newBorder" />
<u:style name="background-position" value="0% 50%" />
<u:style name="background-image">
16 years, 3 months
JBoss Rich Faces SVN: r10291 - in trunk/ui/dataFilterSlider/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-09-03 06:53:40 -0400 (Wed, 03 Sep 2008)
New Revision: 10291
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js
Log:
https://jira.jboss.org/jira/browse/RF-4322
and bug
https://jira.jboss.org/jira/browse/RF-4053
Modified: trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
===================================================================
--- trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2008-09-03 09:51:44 UTC (rev 10290)
+++ trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2008-09-03 10:53:40 UTC (rev 10291)
@@ -31,6 +31,7 @@
import javax.faces.context.FacesContext;
import javax.faces.convert.ConverterException;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
@@ -71,7 +72,7 @@
}
public String renderSliderJs1(FacesContext context, UIDataFltrSlider slider) throws IOException {
-
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
StringBuffer script = new StringBuffer();
String clientId = slider.getClientId(context);
script.append("var dataFilterSlider = ");
@@ -83,6 +84,7 @@
options.append(",values: [" + slider.getSliderRange() + "]");
options.append(",startSpan: '"+ clientId +"slider-trailer'");
options.append(",sliderInputId: '" + clientId + "slider_val'");
+ options.append(",isAjax: " + ajaxContext.isAjaxRequest());
options.append(",sliderValue:$('"+ clientId +"slider_val').value");
String onslide = getEventHandlerFunction(slider, "onslide");
Modified: trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js
===================================================================
--- trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js 2008-09-03 09:51:44 UTC (rev 10290)
+++ trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/datafilterslider.js 2008-09-03 10:53:40 UTC (rev 10291)
@@ -11,10 +11,6 @@
Richfaces.DFSControl = {};
Richfaces.DFSControl.Slider = Class.create();
-if (!window.RichShuttleUtils) {
- window.RichShuttleUtils = {};
-}
-
Richfaces.DFSControl.execOnLoad = function(func, condition, timeout) {
if (condition()) {
@@ -97,16 +93,24 @@
// Initialize handles in reverse (make sure first handle is active)
this.handles[0].style.visibility="hidden";
- Richfaces.DFSControl.execOnLoad(
- function() {
- this.initHandles();
- }.bind(this),
- function() {
- return this.handles[0].offsetHeight > 0;
- }.bind(this),
- 100);
-
- //Event.observe(window, "load", this.loadEventHandler);
+ // This is workaround for bug
+ // https://jira.jboss.org/jira/browse/RF-4322 and bug
+ // https://jira.jboss.org/jira/browse/RF-4053
+ // Safari load css style files too slow, so when full page loaded and DOM already calculated,
+ // can be happened that not all style classes applied to elements
+ if (this.options.isAjax) {
+ Richfaces.DFSControl.execOnLoad(
+ function() {
+ this.initHandles();
+ }.bind(this),
+ function() {
+ return this.handles && this.handles.length > 0 && this.handles[0].offsetHeight > 0;
+ }.bind(this),
+ 100);
+ } else {
+ Event.observe(window, "load", this.loadEventHandler);
+ }
+
this.initialized = true;
},
@@ -123,7 +127,7 @@
slider.setValue(parseFloat(
(slider.options.sliderValue instanceof Array ?
slider.options.sliderValue[i] : slider.options.sliderValue) ||
- slider.range.start), i);
+ slider.range.start), i);
Element.makePositioned(h); // fix IE
Event.observe(h, "mousedown", slider.eventMouseDown);
});
16 years, 3 months
JBoss Rich Faces SVN: r10290 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-09-03 05:51:44 -0400 (Wed, 03 Sep 2008)
New Revision: 10290
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
RF-4069 - updated information
RF-4306 - updated code example and added code for "web.xml"
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-09-03 09:51:09 UTC (rev 10289)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-09-03 09:51:44 UTC (rev 10290)
@@ -768,53 +768,53 @@
</emphasis>, <emphasis>
<property>"onmouseover"</property>
</emphasis>, etc. </para>
- <!--para>Most important attributes of components that provide Ajax request calling features are:</para>
- <itemizedlist>
- <listitem>
- <emphasis>
- <property>"reRender"</property>
- </emphasis>attribute as it was mentioned <link linkend="SendAnAJAXRequest">before</link>
- specifies components to be reRendered after Ajax response. The attribute can be specified
- using EL expression and formed dynamicaly on the server side (see <ulink
- url="index.html#FAQ">FAQ chapter</ulink>). </listitem>
- <listitem>
- <emphasis>
- <property>"RequestDelay"</property>
- </emphasis> attribute is used for a requests frequency regulation. </listitem>
- </itemizedlist>
- <programlisting role="XML"><![CDATA[<h:inputText size="50" value="#{bean.text}">
- <a4j:support event="onkeyup" RequestDelay="3"/>
- </h:inputText>]]></programlisting>
- <para>So every next request from the frequent keyboard events will be delayed on 3 ms to
- reduce the number of requests. </para>
- <itemizedlist>
- <listitem>
- <emphasis>
- <property>"EventsQueue"</property>
- </emphasis> is a queue that stores the next request. </listitem>
- <listitem>
- <emphasis>
- <property>"LimitToList"</property>
- </emphasis> attribute is used to regulate updatable regions. Setting it to true limits the
- updatable areas only to ones specified in a reRender list, in other case all Output Panels
- of the region are updated. </listitem>
- <listitem>
- <emphasis>
- <property>"ajaxSingle"</property>
- </emphasis> attributes specify regions to be sent with a request, if
- "false" it is a full region, in other case it's is only a
- control caused event. </listitem>
-
- <listitem>
- <emphasis>
- <property>"timeout"</property>
- </emphasis>attribute is used for response waiting time on a particular request. If a
- response is not received during this time, the request is aborted. </listitem>
-
- <listitem>
- <emphasis>
- <property>"ignoreDupResponses"</property>
- </emphasis> is used to abort unfinished request on new event. </listitem>
+ <!--para>Most important attributes of components that provide Ajax request calling features are:</para>
+ <itemizedlist>
+ <listitem>
+ <emphasis>
+ <property>"reRender"</property>
+ </emphasis>attribute as it was mentioned <link linkend="SendAnAJAXRequest">before</link>
+ specifies components to be reRendered after Ajax response. The attribute can be specified
+ using EL expression and formed dynamicaly on the server side (see <ulink
+ url="index.html#FAQ">FAQ chapter</ulink>). </listitem>
+ <listitem>
+ <emphasis>
+ <property>"RequestDelay"</property>
+ </emphasis> attribute is used for a requests frequency regulation. </listitem>
+ </itemizedlist>
+ <programlisting role="XML"><![CDATA[<h:inputText size="50" value="#{bean.text}">
+ <a4j:support event="onkeyup" RequestDelay="3"/>
+ </h:inputText>]]></programlisting>
+ <para>So every next request from the frequent keyboard events will be delayed on 3 ms to
+ reduce the number of requests. </para>
+ <itemizedlist>
+ <listitem>
+ <emphasis>
+ <property>"EventsQueue"</property>
+ </emphasis> is a queue that stores the next request. </listitem>
+ <listitem>
+ <emphasis>
+ <property>"LimitToList"</property>
+ </emphasis> attribute is used to regulate updatable regions. Setting it to true limits the
+ updatable areas only to ones specified in a reRender list, in other case all Output Panels
+ of the region are updated. </listitem>
+ <listitem>
+ <emphasis>
+ <property>"ajaxSingle"</property>
+ </emphasis> attributes specify regions to be sent with a request, if
+ "false" it is a full region, in other case it's is only a
+ control caused event. </listitem>
+
+ <listitem>
+ <emphasis>
+ <property>"timeout"</property>
+ </emphasis>attribute is used for response waiting time on a particular request. If a
+ response is not received during this time, the request is aborted. </listitem>
+
+ <listitem>
+ <emphasis>
+ <property>"ignoreDupResponses"</property>
+ </emphasis> is used to abort unfinished request on new event. </listitem>
</itemizedlist-->
@@ -920,74 +920,74 @@
decoding, conversion/validation, value applying phases are executed. The input field
with the <code>id="email"</code> is handled the same way on blur
event. </para>
- <!--para>
- The
- <emphasis>
- <property>"process"</property>
- </emphasis>
- attribute has two limitations:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- it works only if
- <emphasis>
- <property>"ajaxSingle"</property>
- </emphasis>
- equals to "true" for given command component
- </para>
- </listitem>
- <listitem>
- <para>
- you do not have to point this attribute to one
- of the own parent components to avoid processing
- of command component twice
- </para>
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<h:form>
- <h:inputText id="oneA" value="#{bean.width}"/>
- <br/>
- <h:inputText id="oneB" value="#{bean.text}"/>
- <br/>
- <a4j:commandButton value="Submit2" process="oneB" ajaxSingle="true" reRender=":three1, :three2"/>
-</h:form>
-<h:outputText id="three1" value="#{bean.width}"/>
- <br/>
-<h:outputText id="three2" value="#{bean.text}"/>
-...]]></programlisting>
- <para>
- In the example above after you click on the
- <emphasis role="bold">
- <property><a4j:commandButton></property>
- </emphasis>
- <property>only</property>
- <emphasis role="bold">
- <property><h:inputText></property>
- </emphasis>
- with
- <code>"oneB"</code>
- id is processed and entered data appears into the
- <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis>
- with
- <code>"three2"</code>
- id. If you doesn't use this attribute
- <property>both</property>
- <emphasis role="bold">
- <property><h:inputText></property>
- </emphasis>
- is processed and entered data appears into the
- <property>both</property>
- <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis>
- .
+ <!--para>
+ The
+ <emphasis>
+ <property>"process"</property>
+ </emphasis>
+ attribute has two limitations:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ it works only if
+ <emphasis>
+ <property>"ajaxSingle"</property>
+ </emphasis>
+ equals to "true" for given command component
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ you do not have to point this attribute to one
+ of the own parent components to avoid processing
+ of command component twice
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form>
+ <h:inputText id="oneA" value="#{bean.width}"/>
+ <br/>
+ <h:inputText id="oneB" value="#{bean.text}"/>
+ <br/>
+ <a4j:commandButton value="Submit2" process="oneB" ajaxSingle="true" reRender=":three1, :three2"/>
+</h:form>
+<h:outputText id="three1" value="#{bean.width}"/>
+ <br/>
+<h:outputText id="three2" value="#{bean.text}"/>
+...]]></programlisting>
+ <para>
+ In the example above after you click on the
+ <emphasis role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis>
+ <property>only</property>
+ <emphasis role="bold">
+ <property><h:inputText></property>
+ </emphasis>
+ with
+ <code>"oneB"</code>
+ id is processed and entered data appears into the
+ <emphasis role="bold">
+ <property><h:outputText></property>
+ </emphasis>
+ with
+ <code>"three2"</code>
+ id. If you doesn't use this attribute
+ <property>both</property>
+ <emphasis role="bold">
+ <property><h:inputText></property>
+ </emphasis>
+ is processed and entered data appears into the
+ <property>both</property>
+ <emphasis role="bold">
+ <property><h:outputText></property>
+ </emphasis>
+ .
</para-->
</section>
</section>
@@ -1157,12 +1157,12 @@
<title>Note:</title>
<para> If you use <property>ALL</property> value of Scripts Load Strategy, the
JavaScript files compression turns off! </para>
- <!--programlisting role="XML"><![CDATA[...
- <context-param>
- <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
- <param-value>false</param-value>
- </context-param>
- ...
+ <!--programlisting role="XML"><![CDATA[...
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ ...
]]></programlisting-->
</note>
@@ -1196,15 +1196,23 @@
<para> RichFaces allows to redefine standard handlers responsible for processing of
different exceptional situations. It helps to define own JavaScript, which is executed
when these situations occur. </para>
+ <para>
+ Add the following code to web.xml:
+ </para>
+ <programlisting role="XML"><![CDATA[<context-param>
+ <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
+ <param-value>true</param-value>
+</context-param>]]>
+ </programlisting>
<section id="RequestErrorsHandling">
<?dbhtml filename="RequestErrorsHandling.html"?>
<title>Request Errors Handling</title>
<para> To execute your own code on the client in case of an error during Ajax request,
it's necessary to redefine the standard
<code>"A4J.AJAX.onError"</code> method: </para>
- <programlisting role="JAVA"><![CDATA[A4J.AJAX.onError = function(req,status,message) {
- // Custom Developer Code
-};]]></programlisting>
+ <programlisting role="JAVA"><![CDATA[ A4J.AJAX.onError = function(req,status,message){
+ window.alert("Custom onError handler "+message);
+}]]></programlisting>
<para> The function defined this way accepts as parameters: </para>
<itemizedlist>
<listitem>
@@ -1236,10 +1244,14 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[A4J.AJAX.onExpired = function(loc,expiredMsg){
- // Custom Developer Code
-};
-]]></programlisting>
+ <programlisting role="JAVA">
+<![CDATA[A4J.AJAX.onExpired = function(loc,expiredMsg){
+ if(window.confirm("Custom onExpired handler "+expiredMsg+" for a location: "+loc)){
+ return loc;
+ } else {
+ return false;
+ }
+}]]></programlisting>
<para>Here the function receives in params:</para>
<itemizedlist>
@@ -1255,11 +1267,11 @@
</emphasis> event. </para>
</listitem>
</itemizedlist>
- <!--note>
- <title>Note:</title>
- Until the version 1.0.5 the method can't be redefined on <emphasis >
- <property>"Session Expiration"</property>,
- </emphasis> a confirmation dialog with a request for view reloading was always called.
+ <!--note>
+ <title>Note:</title>
+ Until the version 1.0.5 the method can't be redefined on <emphasis >
+ <property>"Session Expiration"</property>,
+ </emphasis> a confirmation dialog with a request for view reloading was always called.
</note-->
</section>
</section>
@@ -1370,8 +1382,8 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <rich:panel> ... </rich:panel>
+ <programlisting role="XML">
+ <rich:panel> ... </rich:panel>
</programlisting>
<para> The code generates a panel component on a page, which consists of two elements: a
@@ -1388,8 +1400,8 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <div class="dr-pnl rich-panel"> ... </div>
+ <programlisting role="XML">
+ <div class="dr-pnl rich-panel"> ... </div>
</programlisting>
<para> dr-pnl is a CSS class specified in the framework via skin parameters: </para>
@@ -1425,9 +1437,9 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <rich:panel styleClass="customClass"> ...
- </rich:panel>
+ <programlisting role="XML">
+ <rich:panel styleClass="customClass"> ...
+ </rich:panel>
</programlisting>
<para> Could add some style properties from customClass to one particular panel, as a
@@ -1437,9 +1449,9 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <div class="dr_pnl rich-panel customClass"> ...
- </div>
+ <programlisting role="XML">
+ <div class="dr_pnl rich-panel customClass"> ...
+ </div>
</programlisting>
</section>
@@ -3039,8 +3051,10 @@
]]></programlisting>
<note>
- <para> Now necessary to use resources prefix <code>a4j/version</code>
- instead of <code>a4j_version</code>. </para>
+ <para>
+ Now necessary to use resources prefix <code>a4j/versionXXX</code> instead of <code>a4j_versionXXX</code>.
+ Base64 encoder changed to use '<code>!</code>' instead of '<code>.</code>'.
+ </para>
</note>
@@ -3323,7 +3337,7 @@
<para>For example </para>
- <programlisting role="XML">
+ <programlisting role="XML">
<![CDATA[...
.rich-calendar-cell {
background: #537df8;
@@ -3342,7 +3356,7 @@
<code><f:verbatim> <![CDATA[ ...]]>
</f:verbatim></code> tags. </para>
- <programlisting role="XML">
+ <programlisting role="XML">
<![CDATA[...
<u:selector name=".rich-calendar-cell">
<u:style name="border-bottom-color" skin="panelBorderColor"/>
16 years, 3 months
JBoss Rich Faces SVN: r10289 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-09-03 05:51:09 -0400 (Wed, 03 Sep 2008)
New Revision: 10289
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
Log:
RF-4060 - added new link and information
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2008-09-03 08:43:58 UTC (rev 10288)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2008-09-03 09:51:09 UTC (rev 10289)
@@ -43,7 +43,15 @@
</ulink>
</member>
</simplelist>
-
+ <para>
+ Additional information how to get
+ <code>
+ ViewExpiredExceptions
+ </code>
+ when using <property>RichFaces</property>
+ with <property>JSF 1.2</property>
+ you can find <ulink url="http://wiki.jboss.org/auth/wiki//RichFacesCookbook/ViewExpiredException">here</ulink>.
+ </para>
</section>
<section id="ApacheMyFaces">
<?dbhtml filename="ApacheMyFaces.html"?>
@@ -314,7 +322,7 @@
<property>Seam</property>
with MyFaces. Look at myFaces part of this section.
</para>
- <para>Detailed information on how to integrate Richfaces and Trinidad and how to hide ".seam" postfix in the URL you can find
+ <para>Detailed information on how to integrate Richfaces and Trinidad and how to hide ".seam" postfix in the URL you can find
<ulink url="http://wiki.jboss.org/auth/wiki/RichFacesWithTrinidad">here</ulink></para>
</section>
<section id="PortletSupport">
@@ -365,7 +373,7 @@
<programlisting role="XML"><![CDATA[...
<imported-shared-libraries>
<remove-inherited name="oracle.xml"/>
- <remove-inherited name="oracle.xml.security"/>
+ <remove-inherited name="oracle.xml.security"/>
</imported-shared-libraries>
...
]]></programlisting>
16 years, 3 months