Author: andrei_exadel
Date: 2009-01-05 05:18:50 -0500 (Mon, 05 Jan 2009)
New Revision: 12090
Added:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsAttributes.java
Modified:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
Log:
RF-5517
Added: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsAttributes.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsAttributes.java
(rev 0)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsAttributes.java 2009-01-05
10:18:50 UTC (rev 12090)
@@ -0,0 +1,30 @@
+/**
+ *
+ */
+package org.richfaces.taglib;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Andrey Markavtsov
+ */
+public class ColumnsAttributes {
+
+ /** Filter attributes */
+ public static final List<String> FILTER_ATTRIBUTES = new
ArrayList<String>();
+
+ static {
+ FILTER_ATTRIBUTES.add("filterBy");
+ FILTER_ATTRIBUTES.add("filterExpression");
+ FILTER_ATTRIBUTES.add("filterValue");
+ FILTER_ATTRIBUTES.add("filterEvent");
+ }
+
+ /** Sort attributes */
+ public static final List<String> SORT_ATTRIBUTES = new ArrayList<String>();
+
+ static {
+ SORT_ATTRIBUTES.add("sortExpression");
+ }
+}
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2009-01-05
10:01:39 UTC (rev 12089)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsHandler.java 2009-01-05
10:18:50 UTC (rev 12090)
@@ -28,7 +28,6 @@
package org.richfaces.taglib;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
@@ -66,18 +65,7 @@
public class ColumnsHandler extends MetaTagHandler {
com.sun.facelets.tag.jsf.ComponentHandler handler;
-
- public final static List<String> filterAttributes = new
ArrayList<String>();
- public final static List<String> sortAttributes = new
ArrayList<String>();
- static {
- filterAttributes.add("filterBy");
- filterAttributes.add("filterExpression");
- filterAttributes.add("filterValue");
- filterAttributes.add("filterEvent");
-
- sortAttributes.add("sortExpression");
- }
-
+
/** value attribute */
private TagAttribute value;
@@ -166,7 +154,7 @@
@Override
public Metadata applyRule(final String name,
final TagAttribute attribute, MetadataTarget meta) {
- if (filterAttributes.indexOf(name) != -1) {
+ if (ColumnsAttributes.FILTER_ATTRIBUTES.indexOf(name) != -1) {
return new Metadata() {
@Override
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2009-01-05
10:01:39 UTC (rev 12089)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2009-01-05
10:18:50 UTC (rev 12090)
@@ -20,7 +20,6 @@
*/
package org.richfaces.taglib;
-import java.beans.FeatureDescriptor;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
@@ -28,14 +27,12 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.regex.Pattern;
import javax.el.ELContext;
import javax.el.ELException;
import javax.el.ELResolver;
import javax.el.FunctionMapper;
import javax.el.MethodExpression;
-import javax.el.MethodInfo;
import javax.el.ValueExpression;
import javax.el.VariableMapper;
import javax.faces.component.UIComponent;
@@ -53,8 +50,6 @@
import org.richfaces.iterator.SimpleForEachIterator;
import org.richfaces.renderkit.CellRenderer;
-import sun.security.provider.certpath.Builder;
-
@SuppressWarnings("unused")
public class ColumnsTag extends UIComponentClassicTagBase implements
IterationTag {
@@ -386,8 +381,8 @@
String fieldName = field.getName();
if (fieldName != null && fieldName.startsWith("_")) {
String attributeName = fieldName.replace("_", "");
- if (ColumnsHandler.filterAttributes.indexOf(attributeName) == -1 &&
- ColumnsHandler.sortAttributes.indexOf(attributeName) == -1) {
+ if (ColumnsAttributes.FILTER_ATTRIBUTES.indexOf(attributeName) == -1 &&
+ ColumnsAttributes.SORT_ATTRIBUTES.indexOf(attributeName) == -1) {
ValueExpression ex = (ValueExpression) o;
ex = createValueExpression(elContext, ex);
component.setValueExpression(attributeName, ex);
Show replies by date