org.apache.cocoon.forms.formmodel
Interface SelectableWidget

All Superinterfaces:
org.apache.cocoon.util.location.Locatable, Widget
All Known Implementing Classes:
Field, MultiValueField

public interface SelectableWidget
extends Widget

A Widget that can have a selection list. The initial selection list is set by the widget's WidgetDefinition, and can be changed afterwards. The selection list can be removed by setting the list to null.

Version:
$Id: SelectableWidget.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from interface org.apache.cocoon.forms.formmodel.Widget
PATH_SEPARATOR
 
Method Summary
 void setSelectionList(Object model, String valuePath, String labelPath)
          Set the widgdet's selection given an object and XPath expressions.
 void setSelectionList(SelectionList selectionList)
          Set the widget's selection list given a SelectionList.
 void setSelectionList(String uri)
          Set the widget's selection list given a source URI where the list will be read from.
 
Methods inherited from interface org.apache.cocoon.forms.formmodel.Widget
addValidator, broadcastEvent, generateLabel, generateSaxFragment, getAttribute, getCombinedState, getDefinition, getForm, getFullName, getId, getLocation, getName, getParent, getRequestParameterName, getState, getValue, getWidget, initialize, isRequired, isValid, lookupWidget, readFromRequest, removeAttribute, removeValidator, setAttribute, setParent, setState, setValue, validate
 

Method Detail

setSelectionList

public void setSelectionList(SelectionList selectionList)
Set the widget's selection list given a SelectionList.

Parameters:
selectionList - the selection list or null to have no selection list.

setSelectionList

public void setSelectionList(String uri)
Set the widget's selection list given a source URI where the list will be read from.

Parameters:
uri - the selection list's URI

setSelectionList

public void setSelectionList(Object model,
                             String valuePath,
                             String labelPath)
Set the widgdet's selection given an object and XPath expressions.

Parameters:
model - the selection list model. This is typically a collection or an array of objects in which valuePath and labelPath will extract some data.
valuePath - the XPath expression to extract values
labelPath - the XPath expression to extract labels (can be absent in which case the value is used as label).


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.