org.jreform.internal
Class MultiInputImpl<T>

java.lang.Object
  extended by org.jreform.internal.AbstractInputControl<T>
      extended by org.jreform.internal.MultiInputImpl<T>
All Implemented Interfaces:
InputControl<T>, MessageOnError, MultiInput<T>
Direct Known Subclasses:
MultiCheckboxImpl, MultiSelectImpl

 class MultiInputImpl<T>
extends AbstractInputControl<T>
implements MultiInput<T>

Author:
armandino (at) gmail.com

Field Summary
private static String[] EMPTY_ARRAY
           
private  String[] valueAttributes
           
private  List<T> values
           
 
Constructor Summary
MultiInputImpl(InputDataType<T> type, String name, Criterion<T>... criteria)
           
 
Method Summary
 String getStringValue()
          Returns a string representation of this input's value as returned by the #toString() method.
 String[] getValueAttributes()
          Returns an array of value attributes or an empty array if none.
 List<T> getValues()
          Returns a list of parsed values or an empty list if none.
 void setValueAttributes(String[] input)
          Sets this input's value attributes.
 void setValues(List<T> value)
          Sets this input's values.
 String toString()
           
(package private)  boolean validate(javax.servlet.http.HttpServletRequest req)
          Validates this input's value attribute(s).
 
Methods inherited from class org.jreform.internal.AbstractInputControl
getCriteria, getInputName, getOnError, getType, isGroupInput, isRequired, isValid, setGroupInput, setOnError, setRequired, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jreform.InputControl
getInputName, getType, isRequired, isValid
 
Methods inherited from interface org.jreform.MessageOnError
getOnError, setOnError
 

Field Detail

EMPTY_ARRAY

private static final String[] EMPTY_ARRAY

values

private List<T> values

valueAttributes

private String[] valueAttributes
Constructor Detail

MultiInputImpl

MultiInputImpl(InputDataType<T> type,
               String name,
               Criterion<T>... criteria)
Method Detail

getValues

public final List<T> getValues()
Returns a list of parsed values or an empty list if none.

Specified by:
getValues in interface MultiInput<T>

setValues

public final void setValues(List<T> value)
Description copied from interface: MultiInput
Sets this input's values.

Specified by:
setValues in interface MultiInput<T>

getValueAttributes

public final String[] getValueAttributes()
Returns an array of value attributes or an empty array if none.

Specified by:
getValueAttributes in interface MultiInput<T>

setValueAttributes

public final void setValueAttributes(String[] input)
Description copied from interface: MultiInput
Sets this input's value attributes.

Specified by:
setValueAttributes in interface MultiInput<T>

getStringValue

public String getStringValue()
Description copied from interface: InputControl
Returns a string representation of this input's value as returned by the #toString() method.

Specified by:
getStringValue in interface InputControl<T>

validate

boolean validate(javax.servlet.http.HttpServletRequest req)
Description copied from class: AbstractInputControl
Validates this input's value attribute(s).

Specified by:
validate in class AbstractInputControl<T>

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2007-2008 jReform