Interface DataBound
-
- All Known Subinterfaces:
Input
- All Known Implementing Classes:
AbstractInput
,AbstractWMultiSelectList
,AbstractWSelectList
,AbstractWSingleSelectList
,RadioButtonGroup
,UicProfileButton
,WAbbrText
,WAjaxPollingRegion
,WBeanComponent
,WBeanContainer
,WButton
,WCancelButton
,WCheckBox
,WCheckBoxSelect
,WConfirmationButton
,WContainer
,WDataRenderer
,WDataTable
,WDataTableRowRenderer
,WDateField
,WDropdown
,WEditableImage
,WEmailField
,WFileWidget
,WFilterText
,WHeading
,WHiddenComment
,WImage
,WLink
,WList
,WMessages
,WMultiDropdown
,WMultiFileWidget
,WMultiSelect
,WMultiSelectPair
,WMultiTextField
,WNamingContext
,WNumberField
,WPanel
,WPartialDateField
,WPasswordField
,WPhoneNumberField
,WPrintButton
,WProgressBar
,WRadioButton
,WRadioButtonSelect
,WRepeater
,WRepeater.WRepeatRoot
,WShuffler
,WSingleSelect
,WStyledText
,WTable
,WTable.TableRepeater
,WTableRepeater
,WTableRowRenderer
,WTemplate
,WText
,WTextArea
,WTextField
,WToggleButton
,WTree
public interface DataBound
As a general concept all WComponents can be looked upon as being editors for data structures that are entirely independent of the user interface. Thus, potentially implementing this interface. However, the most WComponents deal with concrete data structures (eg,
WTextField
is backed by ajava.util.String
) so in these cases, implementing this interface is a bit redundant. Where it becomes a benefit is for components that can deal with an unknown data structure (eg. a reusable panel).In terms of the MVC pattern, the WComponent represents the View and the data structure/bean represents the Model.
Any
WComponent
implementing this interface and making use of a Velocity template for layout will have access to the stored data in the template via the variable $bean.NOTE: The object returned by
getData()
may not necessarily be the same instance as the one supplied in thesetData(Object)
call. This is dependant on the implementation.- Author:
- Adam Millard
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getData()
Retrieves the data for the given context.void
setData(Object data)
Sets the data that this component displays/edits.
-