net.jakubholy.jeeutils.jsfelcheck.expressionfinder.impl.jasper.variables
Class DataTableVariableResolver

java.lang.Object
  extended by net.jakubholy.jeeutils.jsfelcheck.expressionfinder.impl.jasper.variables.DataTableVariableResolver
All Implemented Interfaces:
TagJsfVariableResolver

public class DataTableVariableResolver
extends Object
implements TagJsfVariableResolver

Extract JSF EL variable defined in a h:dataTable and resolve its type.

It is not possible to derive the type (for element type of collections is not known or only at the compile time) and therefore the type of the dataTable value's elements must be declared up-front via declareTypeFor(String, Class).

We know that the name of the variable produced is stored in the attribute 'var' and that its values will be set based on the value of the attribute 'value'. We know that 'value' must be of a particular type (DataModel, Collection, array (?)).


Constructor Summary
DataTableVariableResolver()
           
 
Method Summary
 DataTableVariableResolver declareTypeFor(String jsfExpression, Class<?> type)
           
 VariableInfo extractContextVariables(Map<String,String> attributes, AttributesValidationResult resolvedJsfExpressions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTableVariableResolver

public DataTableVariableResolver()
Method Detail

declareTypeFor

public DataTableVariableResolver declareTypeFor(String jsfExpression,
                                                Class<?> type)

extractContextVariables

public VariableInfo extractContextVariables(Map<String,String> attributes,
                                            AttributesValidationResult resolvedJsfExpressions)
                                     throws DeclareTypeOfVariableException
Specified by:
extractContextVariables in interface TagJsfVariableResolver
Throws:
DeclareTypeOfVariableException


Copyright © 2011. All Rights Reserved.