net.sf.jzeno.echo.components.async
Class AsyncStringViewer

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by net.sf.jzeno.echo.components.CustomComponent
          extended by net.sf.jzeno.echo.components.AsyncComponent
              extended by net.sf.jzeno.echo.components.async.AsyncStringViewer
All Implemented Interfaces:
java.io.Serializable, BindingTarget, PropertyComponent, RebindableComponent, EventSink, EventSource, Precreation, Component, FastComponent, FastComponentContainer

public class AsyncStringViewer
extends AsyncComponent
implements Precreation

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jzeno.echo.components.AsyncComponent
AsyncComponent.AsyncService, AsyncComponent.PropertyChangeDetector
 
Field Summary
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
AsyncStringViewer()
           
AsyncStringViewer(java.lang.Class beanClass, java.lang.String property, java.lang.String constructionHints)
           
 
Method Summary
 void applyContext()
           
 java.lang.String getText()
           
 void rebind()
           This operation causes the component to reset it's content to that of the domain model.
protected  void renderHtml(java.io.PrintWriter out)
           Render your component into HTML here.
protected  void renderJavascript(java.io.PrintWriter out)
           Return some javascript that you which to execute for the current rendering of your component.
protected  void renderJavascriptLibrary(java.io.PrintWriter out)
           If you whish to use some javascript functions/libraries you can return those in this method.
 void setText(java.lang.String text)
           
protected  void update(java.lang.String input)
           If you want to send information from you client back to the server to update state there, you can use the createUpdateScript function to generate a javascript function-call that will trigger an update.
 
Methods inherited from class net.sf.jzeno.echo.components.AsyncComponent
createUpdateScript
 
Methods inherited from class net.sf.jzeno.echo.components.CustomComponent
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getActionCommand, getBean, getBeanClass, getDecorator, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isReadOnly, isRequired, isValid, markInvalid, markValid, preRender, removeValidator, setActionCommand, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setReadOnly, setRequired, setValue, traceValue, validate
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncStringViewer

public AsyncStringViewer()

AsyncStringViewer

public AsyncStringViewer(java.lang.Class beanClass,
                         java.lang.String property,
                         java.lang.String constructionHints)
Method Detail

rebind

public void rebind()
Description copied from interface: RebindableComponent

This operation causes the component to reset it's content to that of the domain model.

Specified by:
rebind in interface RebindableComponent
Overrides:
rebind in class CustomComponent

renderHtml

protected void renderHtml(java.io.PrintWriter out)
Description copied from class: AsyncComponent

Render your component into HTML here.

Specified by:
renderHtml in class AsyncComponent

update

protected void update(java.lang.String input)
Description copied from class: AsyncComponent

If you want to send information from you client back to the server to update state there, you can use the createUpdateScript function to generate a javascript function-call that will trigger an update.

Specified by:
update in class AsyncComponent

renderJavascript

protected void renderJavascript(java.io.PrintWriter out)
Description copied from class: AsyncComponent

Return some javascript that you which to execute for the current rendering of your component.

Specified by:
renderJavascript in class AsyncComponent

applyContext

public void applyContext()
Specified by:
applyContext in interface Precreation

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

renderJavascriptLibrary

protected void renderJavascriptLibrary(java.io.PrintWriter out)
Description copied from class: AsyncComponent

If you whish to use some javascript functions/libraries you can return those in this method. If you return null, no javascript will be available to you rendered HTML. The implementation could take the form of returning a string constant, or it could load a .js file from disk, and return the content, or it could load a JavaScript library as a resource from you application classpath, etc...

Specified by:
renderJavascriptLibrary in class AsyncComponent