Author: nbelaevski
Date: 2009-03-12 15:38:26 -0400 (Thu, 12 Mar 2009)
New Revision: 12945
Modified:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
Log:
https://jira.jboss.org/jira/browse/RF-6040
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2009-03-12
17:59:09 UTC (rev 12944)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2009-03-12
19:38:26 UTC (rev 12945)
@@ -214,35 +214,35 @@
*/
private void prepare(FaceletContext ctx) {
- initVariables(ctx);
-
- IterationContext itContext = getIterationContext();
+ initVariables(ctx);
- try {
+ IterationContext itContext = getIterationContext();
- this.value = getAttribute("value");
- itContext.valueExpr = ELBuilder.getVarReplacement(this.value.getValue());
+ try {
- // produce the right sort of ForEachIterator
- if (value != null) {
- // If this is a deferred expression, make a note and get
- // the 'items' instance.
+ this.value = getAttribute("value");
- itContext.rawItems = value.getObject(ctx);
+ // produce the right sort of ForEachIterator
+ if (this.value != null) {
+ itContext.valueExpr = ELBuilder.getVarReplacement(this.value.getValue());
- // extract an iterator over the 'items' we've got
- itContext.items = SimpleForEachIterator
- .supportedTypeForEachIterator(itContext.rawItems);
- } else {
- // no 'items', so use 'begin' and 'end'
- itContext.items = SimpleForEachIterator
- .beginEndForEachIterator(itContext._columns - 1);
- }
- } catch (Exception e) {
- // TODO: handle exception
- }
+ // If this is a deferred expression, make a note and get
+ // the 'items' instance.
- correctFirst(ctx);
+ itContext.rawItems = this.value.getObject(ctx);
+
+ // extract an iterator over the 'items' we've got
+ itContext.items = SimpleForEachIterator
+ .supportedTypeForEachIterator(itContext.rawItems);
+ } else {
+ // no 'items', so use 'begin' and 'end'
+ itContext.items = SimpleForEachIterator.beginEndForEachIterator(itContext._columns
- 1);
+ }
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+
+ correctFirst(ctx);
}
/**