    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.forms.TextArrayField

    java.lang.Object
       |
       +----w3c.jigsaw.forms.FormField
               |
               +----w3c.jigsaw.forms.TextArrayField

public class TextArrayField
extends FormField

##

strval

##

TextArrayField()
TextArrayField(String, String, String)
TextArrayField(String, String, String, String[])

##

computeString(Object)
  Compute the string to display for the given list of items
differs(Object, Object)
dump(HtmlGenerator)
  Dump this fieldas a form element.
getValue()
  Get this field's value.
initialize(String, String, String, Object)
parseString(String)
  Parse the given \r or \n sparated list of items into an array of items.
setValue(String)
  Set this field's value to the given String.
setValue(String[])
  Set this field's value.

##

strval

     protected String strval

##

TextArrayField

     public TextArrayField(String name,
                           String title,
                           String url)

TextArrayField

     public TextArrayField(String name,
                           String title,
                           String url,
                           String value[])

TextArrayField

     public TextArrayField()

##

getValue

     public Object getValue()

  Get this field's value.

  Overrides:
    getValue in class FormField

parseString

     protected Object parseString(String str)

  Parse the given \r or \n sparated list of items into an array of items.

  Parameters:
    str - The string to parse.
  Returns:
    An array of String.

computeString

     protected String computeString(Object val)

  Compute the string to display for the given list of items

differs

     protected boolean differs(Object v1,
                               Object v2)

setValue

     public boolean setValue(String nval) throws FormFieldException

  Set this field's value to the given String. The string is parsed, each line makes one entry in the array of text.

  Parameters:
    nval - The new value, as a single String to be parsed.
  Returns:
    A boolean, true indicates that the field's value has changed.
  Throws: FormFieldException
    If the provided value didn't match the expected type.
  Overrides:
    setValue in class FormField

setValue

     public boolean setValue(String value[])

  Set this field's value.

  Parameters:
    value - The new value for the field.

dump

     public void dump(HtmlGenerator into)

  Dump this fieldas a form element.

  Parameters:
    into - The HtmlGenerator to dump the field to.
  Overrides:
    dump in class FormField

initialize

     public void initialize(String name,
                            String title,
                            String url,
                            Object val) throws FormFieldException

  Overrides:
    initialize in class FormField

    All Packages  Class Hierarchy  This Package  Previous  Next  Index