corelib.services.web.components
Class FormInput

java.lang.Object
  extended by corelib.services.web.components.WebComponent
      extended by corelib.services.web.components.VisualComponent
          extended by corelib.services.web.components.FormElement
              extended by corelib.services.web.components.FormInput
Direct Known Subclasses:
Calendar, CheckBox, ChoiceSelector, ColorChooser, ColorPicker, DatePicker, Slider, Spinner, TextBox

public abstract class FormInput
extends FormElement

This abstract base class represents an editable form element (text component, check box, radio button, ...). This component type can be editable or not (read only), can auto post the associated form or not, and fire events when editable value changed (between each HTTP request).

Since:
0.1.0
Author:
Dominique Liard

Field Summary
protected  boolean autoPost
           
protected  java.lang.String oldValue
           
protected  boolean readOnly
           
 
Fields inherited from class corelib.services.web.components.FormElement
disabled, value
 
Fields inherited from class corelib.services.web.components.VisualComponent
cssClass, cssStyle, toolTipText, visible
 
Fields inherited from class corelib.services.web.components.WebComponent
dataBindings, webPage, xmlNode
 
Constructor Summary
FormInput()
           
 
Method Summary
 void addFormInputListener(FormInputListener listener)
           
 void component_load(WebPageEvent event)
          Fired when the web page is fully initialized.
 void fireFormInputEvent()
           
 java.lang.String getOldValue()
           
protected  java.lang.StringBuilder getSharedAttributesHtmlEncoding()
           
 boolean isAutoPost()
          Returns if this component use the auto post behavior.
 boolean isReadOnly()
          Returns if this TextBox component is read only or not.
protected  java.lang.String oldValueHtmlEnconding()
           
 void setAutoPost(boolean autoPost)
          Changes the component's auto post behavior.
 void setOldValue(java.lang.String oldValue)
           
 void setReadOnly(boolean readOnly)
          Changes the read only state for this TextBox component.
 
Methods inherited from class corelib.services.web.components.FormElement
getValue, isDisabled, setDisabled, setValue
 
Methods inherited from class corelib.services.web.components.VisualComponent
component_postRender, component_preRender, component_renderBegin, component_renderChildren, component_renderEnd, component_renderJavascriptLocalisation, encodeAttributeValue, getCssClass, getCssStyle, getOnClickListener, getToolTipText, isVisible, renderElement, setCssClass, setCssStyle, setOnClickListener, setToolTipText, setVisible
 
Methods inherited from class corelib.services.web.components.WebComponent
addBindingExpression, addChildComponent, component_init, component_preRepeaterDuplications, getChildComponents, getDataBinding, getElementsByTagName, getId, getWebPage, getXmlNode, setId, setWebPage, setXmlNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

autoPost

protected boolean autoPost

readOnly

protected boolean readOnly

oldValue

protected java.lang.String oldValue
Constructor Detail

FormInput

public FormInput()
Method Detail

isAutoPost

public boolean isAutoPost()
Returns if this component use the auto post behavior.

Returns:
true if auto post behavior is used, false otherwise.

setAutoPost

public void setAutoPost(boolean autoPost)
Changes the component's auto post behavior.

Parameters:
autoPost - true if auto post behavior is used, false otherwise.

isReadOnly

public boolean isReadOnly()
Returns if this TextBox component is read only or not.

Returns:
True if this TextBox is read only false otherwise.

setReadOnly

public void setReadOnly(boolean readOnly)
Changes the read only state for this TextBox component.

Parameters:
readOnly - The new read only state.

getOldValue

public java.lang.String getOldValue()

setOldValue

public void setOldValue(java.lang.String oldValue)

component_load

public void component_load(WebPageEvent event)
Description copied from class: WebComponent
Fired when the web page is fully initialized.

Overrides:
component_load in class WebComponent
Parameters:
event - Qualify the current web page event.

getSharedAttributesHtmlEncoding

protected java.lang.StringBuilder getSharedAttributesHtmlEncoding()
Overrides:
getSharedAttributesHtmlEncoding in class FormElement

addFormInputListener

public void addFormInputListener(FormInputListener listener)

fireFormInputEvent

public void fireFormInputEvent()

oldValueHtmlEnconding

protected java.lang.String oldValueHtmlEnconding()


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.