com.arsdigita.search.ui
Class FilterWidget

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.search.ui.FilterComponent
              extended bycom.arsdigita.search.ui.FilterWidget
All Implemented Interfaces:
Cloneable, Component, FilterGenerator, Lockable
Direct Known Subclasses:
CategoryFilterWidget, DateRangeFilterWidget, ObjectTypeFilterWidget, PartyFilterWidget

public abstract class FilterWidget
extends FilterComponent

This class provides a base class with infrastruture for generating XML for the filter & managing a state parameter in a form. Subclasses need only override the generateBodyXML method.

See Also:
FilterComponent

Field Summary
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr, versionId
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
FilterWidget(FilterType type, ParameterModel param)
          Creates a filter component
FilterWidget(FilterType type, String name)
          Creates a filter component
 
Method Summary
protected  void generateBodyXML(PageState state, Element parent)
          The impl of this methods adds information about any validation errors to the output.
protected  void generateErrorXML(PageState state, Element parent)
           
 Form getForm()
          Returns the current form to which this component belongs
 ParameterModel getParameter()
          Returns the component's state parameter
 Object getValue(PageState state)
          Gets the current value of the state parameter
 void register(Form form, FormModel model)
          Registers form parameters with the form model for this form.
 
Methods inherited from class com.arsdigita.search.ui.FilterComponent
generateXML
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
children, clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, respond, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible
 
Methods inherited from class com.arsdigita.bebop.Completable
addCompletionListener, fireCompletionEvent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arsdigita.search.ui.FilterGenerator
getFilter
 

Constructor Detail

FilterWidget

public FilterWidget(FilterType type,
                    String name)
Creates a filter component

Parameters:
type - the filter type
name - the state parameter name

FilterWidget

public FilterWidget(FilterType type,
                    ParameterModel param)
Creates a filter component

Parameters:
type - the filter type
param - the state parameter
Method Detail

register

public void register(Form form,
                     FormModel model)
Description copied from interface: Component
Registers form parameters with the form model for this form. This method is only important for form sections and widgets (components that have a connection to an HTML form). Other components can implement it as a no-op.

Specified by:
register in interface Component
Overrides:
register in class SimpleComponent

getForm

public Form getForm()
Returns the current form to which this component belongs

Returns:
the form

getParameter

public ParameterModel getParameter()
Returns the component's state parameter

Returns:
the state parameter

getValue

public Object getValue(PageState state)
Gets the current value of the state parameter


generateErrorXML

protected void generateErrorXML(PageState state,
                                Element parent)

generateBodyXML

protected void generateBodyXML(PageState state,
                               Element parent)
The impl of this methods adds information about any validation errors to the output. If overriding this method, you must call super.generateBodyXML.

Specified by:
generateBodyXML in class FilterComponent


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC