| com.caucho.widget.Widget
All known Subclasses: com.caucho.widget.TextWidget, com.caucho.widget.WidgetContainer,
Widget | abstract public class Widget extends AbstractMap (Code) | | A Widget stores request specific state (S).
|
Field Summary | |
final protected static Logger | log |
Method Summary | |
public void | addAllowedWidgetMode(WidgetMode widgetMode) Default is to allow all widget modes. | public void | addPreference(WidgetPreference widgetPreference) | protected String | calculateId(Widget child) | abstract protected S | createState(WidgetConnection connection) | protected WidgetURL | createURL(WidgetConnection connection) Derived classes use this to create a url. | public WidgetPreferences | createWidgetPreferences() | protected S | decode(WidgetConnection connection) Called once for each request to restore the state of the widget
for the request. | protected WidgetState | decodeChild(WidgetConnection connection, WidgetState thisState, Widget child) | protected void | decodeChildren(WidgetConnection connection, WidgetState state) | public void | destroy() | protected void | encode(WidgetURL url, WidgetState state, boolean isAction) | public Set<Map.Entry<String, Widget>> | entrySet() | public String | getClientId() | public String | getCssClass() Used by implementing classes to get a css class
appropriate for this widget. | public String | getId() | public String | getLogId() | public String | getModeParameterName() | public String | getParameterName() | public Widget | getParent() | public String | getPreferenceValue(WidgetConnection connection, String key) Return a preference value. | public String[] | getPreferenceValues(WidgetConnection connection, String key) Return preference values. | WidgetMode | getWidgetMode() | protected WidgetPreference | getWidgetPreference(String key) | public void | init() | protected boolean | isAction(WidgetState state) Does this widget make it so that children with isActionParameter()
can submit values without encoding them?
For example, an HTML <form> does this. | protected boolean | isActionParameter(WidgetState state) Does this widget submit a value directly, s
in some manner other than a parameter to the url?
This value only has an effect if a url is being made
from a widget that has a true value
for isAction(). | public boolean | isWidgetModeAllowed(WidgetMode widgetMode) | public Widget | put(String id, Widget value) | public void | render(WidgetConnection connection, S widgetState) | public void | setClientId(String clientId) Default is a concatentation of all parent id's separated
by `_'. | public void | setCssClass(String cssClass) Set a css class for renders that use it, the default is
to use the value of "getId() shortClassName "
where shortClassName is the classname portion (no package) of the
widget's class. | public void | setId(String id) | public void | setModeParameterName(String modeParameterName) Default is to the parameterName with a prefix of "_" and a suffix
of "_". | public void | setParameterName(String parameterName) Default is a concatentation of all parent id's separated
by `.'. | public void | setParent(Widget parent) | public void | setPreferencePrefix(String preferencePrefix) If a preference "pref" is not found as a preference
specifically set for this widget, the prefix is prepended
and the connection preferences are checked; the default is "id.",
for example connection.getPreferenceValue("id.pref"). | public void | setWidgetMode(WidgetMode widgetMode) The default mode to use unless it specified in the State,
default is WidgetMode.VIEW. |
addAllowedWidgetMode | public void addAllowedWidgetMode(WidgetMode widgetMode)(Code) | | Default is to allow all widget modes.
|
createURL | protected WidgetURL createURL(WidgetConnection connection) throws WidgetException(Code) | | Derived classes use this to create a url.
The widget tree is followed parent by parent until the top is reached,
and then the connection is used to create a url for that widget.
|
destroy | public void destroy()(Code) | | |
getCssClass | public String getCssClass()(Code) | | Used by implementing classes to get a css class
appropriate for this widget.
|
getLogId | public String getLogId()(Code) | | Used for information purposes
|
getModeParameterName | public String getModeParameterName()(Code) | | |
isAction | protected boolean isAction(WidgetState state)(Code) | | Does this widget make it so that children with isActionParameter()
can submit values without encoding them?
For example, an HTML <form> does this.
|
isActionParameter | protected boolean isActionParameter(WidgetState state)(Code) | | Does this widget submit a value directly, s
in some manner other than a parameter to the url?
This value only has an effect if a url is being made
from a widget that has a true value
for isAction().
For example, HTML fields like <input> return true.
|
isWidgetModeAllowed | public boolean isWidgetModeAllowed(WidgetMode widgetMode)(Code) | | |
setClientId | public void setClientId(String clientId)(Code) | | Default is a concatentation of all parent id's separated
by `_'.
|
setCssClass | public void setCssClass(String cssClass)(Code) | | Set a css class for renders that use it, the default is
to use the value of "getId() shortClassName "
where shortClassName is the classname portion (no package) of the
widget's class.
If the passed string starts with "+", for example "+clear",
then the string is appended to the current cssClass.
If the passed string starts with "-", for example "-clear",
then the string is removed from the current cssClass.
For example, a TextWidget with id "phoneNumber" and clientId
"form.phoneNumber" will have a default cssClass of
"textWidget * phoneNumber".
|
setModeParameterName | public void setModeParameterName(String modeParameterName)(Code) | | Default is to the parameterName with a prefix of "_" and a suffix
of "_".
|
setParameterName | public void setParameterName(String parameterName)(Code) | | Default is a concatentation of all parent id's separated
by `.'.
|
setPreferencePrefix | public void setPreferencePrefix(String preferencePrefix)(Code) | | If a preference "pref" is not found as a preference
specifically set for this widget, the prefix is prepended
and the connection preferences are checked; the default is "id.",
for example connection.getPreferenceValue("id.pref").
|
setWidgetMode | public void setWidgetMode(WidgetMode widgetMode)(Code) | | The default mode to use unless it specified in the State,
default is WidgetMode.VIEW.
|
|
|