|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.form.AbstractFormComponent
org.apache.tapestry.dojo.form.AbstractFormWidget
org.apache.tapestry.dojo.form.Autocompleter
public abstract class Autocompleter
An html field similar to a select
input field that
is wrapped by a dojo ComboBox widget.
This component uses the IAutocompleteModel
to retrieve and match against
selected values.
Field Summary |
---|
Fields inherited from class org.apache.tapestry.AbstractComponent |
---|
_body, _bodyCount |
Constructor Summary | |
---|---|
Autocompleter()
|
Method Summary | |
---|---|
abstract boolean |
getAutoCompleteField()
|
abstract DataSqueezer |
getDataSqueezer()
Injected. |
abstract IEngineService |
getDirectService()
Injected. |
abstract int |
getFadeTime()
The duration(in ms) of the fade effect of list going away. |
abstract String |
getFilter()
|
abstract int |
getMaxListLength()
The maximum number of items displayed in select list before the scrollbar is activated. |
abstract IAutocompleteModel |
getModel()
|
abstract IScript |
getScript()
Injected. |
abstract int |
getSearchDelay()
How long to wait(in ms) before searching after input is received. |
List |
getUpdateComponents()
If set, will be used to update/refresh portions of a response during XHR requests. |
abstract ValidatableFieldSupport |
getValidatableFieldSupport()
Injected. |
abstract Object |
getValue()
|
boolean |
isAsync()
Used to specify whether or not the result of this invocation should be returned asynchronously or use normal browser page reload semantics. |
abstract boolean |
isForceValidOption()
Forces select to only allow valid option strings. |
boolean |
isJson()
Used to specify that the return invocation of the response created should be in the "http://json.org" format. |
abstract boolean |
isLocal()
Forces select to work in local mode (no xhr). |
boolean |
isRequired()
Returns false. |
boolean |
isStateful()
Invoked by the event service to query the component as to whether it is stateful. |
void |
renderComponent(IJSONWriter writer,
IRequestCycle cycle)
Renders a JSON object response back to the client. |
protected void |
renderFormWidget(IMarkupWriter writer,
IRequestCycle cycle)
Called when rendering a form widget. |
protected void |
rewindFormWidget(IMarkupWriter writer,
IRequestCycle cycle)
Called during form submission to retrieve submitted input values. |
abstract void |
setFilter(String value)
|
abstract void |
setValue(Object value)
|
void |
trigger(IRequestCycle cycle)
Triggerd by using filterOnChange logic. |
Methods inherited from class org.apache.tapestry.dojo.form.AbstractFormWidget |
---|
getDestroy, renderFormComponent, renderWidget, rewindFormComponent, setDestroy |
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent |
---|
generateClientId, getCanTakeFocus, getForm, getIdParameter, getName, getRenderBodyOnRewind, peekClientId, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, setForm, setName, setName |
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
---|
getLocation, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tapestry.form.ValidatableField |
---|
getValidators |
Methods inherited from interface org.apache.tapestry.form.IFormComponent |
---|
getClientId, getDisplayName, getForm, getName, isDisabled, setName |
Methods inherited from interface org.apache.tapestry.IComponent |
---|
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
Methods inherited from interface org.apache.tapestry.IRender |
---|
render |
Methods inherited from interface org.apache.hivemind.LocationHolder |
---|
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
---|
getLocation |
Methods inherited from interface org.apache.tapestry.IDirectEvent |
---|
triggerEvent |
Constructor Detail |
---|
public Autocompleter()
Method Detail |
---|
protected void renderFormWidget(IMarkupWriter writer, IRequestCycle cycle)
renderFormWidget
in class AbstractFormWidget
writer
- The markup writer to render with.cycle
- The cycle associated with request.public void renderComponent(IJSONWriter writer, IRequestCycle cycle)
renderComponent
in interface IJSONRender
writer
- The json object writer used to write valid JSON responses.cycle
- Contextual request object.protected void rewindFormWidget(IMarkupWriter writer, IRequestCycle cycle)
AbstractFormWidget
rewindFormWidget
in class AbstractFormWidget
writer
- The passed in IMarkupWriter
will be a NullWriter
, making
any content written ignored.cycle
- Typically used to retrieve submitted value via cycle.getParameter(getName())
.AbstractFormComponent.rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)
public boolean isStateful()
HttpSession
is active, then a
StaleSessionException
is
thrown by the service.
isStateful
in interface IDirect
isStateful
in interface IDirectEvent
isStateful
in class AbstractComponent
public void trigger(IRequestCycle cycle)
DirectLink
component will
notify its listener.
trigger
in interface IDirect
cycle
- The current request.public abstract IAutocompleteModel getModel()
public abstract int getSearchDelay()
public abstract int getFadeTime()
public abstract int getMaxListLength()
public abstract boolean isForceValidOption()
public abstract boolean isLocal()
public abstract Object getValue()
public abstract void setValue(Object value)
public abstract void setFilter(String value)
public abstract String getFilter()
public abstract boolean getAutoCompleteField()
public abstract DataSqueezer getDataSqueezer()
public abstract ValidatableFieldSupport getValidatableFieldSupport()
public abstract IEngineService getDirectService()
public abstract IScript getScript()
public boolean isRequired()
AbstractFormComponent
isRequired
in interface IFormComponent
isRequired
in class AbstractFormComponent
AbstractFormComponent.isRequired()
public List getUpdateComponents()
For instance, if you have a page listing projects and you wanted to update an
Any
components contents whenever one of the project links was clicked
you would use a DirectLink
with the parameters:
updateComponents="{'projectDetails'}" async="true"
getUpdateComponents
in interface IDynamicInvoker
public boolean isAsync()
Async being true means responses will be encoded as XML using XmlHttpRequests. If you would like
your request/response to be in another format - like JSON - you must also specify the additional
parameter IDynamicInvoker.isJson()
. Without setting the IDynamicInvoker.getUpdateComponents()
parameter
this parameter is pretty useless.
isAsync
in interface IDynamicInvoker
IDynamicInvoker.isJson()
public boolean isJson()
IDynamicInvoker.getUpdateComponents()
parameter
this parameter is pretty useless.
isJson
in interface IDynamicInvoker
org.apache.tapestry.IJSONRender}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |