LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyFieldItem

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyFieldItem
All Implemented Interfaces:
LyUpdateViewContentInterface
Direct Known Subclasses:
LyBoolean, LyChoiceBase, LyDateBase, LyDictionaryBase, LyFieldUnit, LyFile, LyGauge, LyHRef, LyHRefs, LyIcon, LyLabel, LyList, LyNumberBase, LyPanel, LyRelationBase, LyTextBase

public abstract class LyFieldItem
extends LyComponent
implements LyUpdateViewContentInterface

This class implements the generic behavior of the following classes : LyText, LyNumber, LyDate, LyChoice, LyOption, LyRelation, LyFile, LyFont, LyColor, LyForm.

See Also:
LyText, LyNumber, LyDate, LyChoice, LyOption, LyRelation, LyFile, LyForm

Nested Class Summary
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyFieldItem()
          Default constructor.
 
Method Summary
 void addBeanData(java.lang.String name, java.lang.String value)
          Deprecated. Use LyComponent.addData.
 LyViewComponent buildBean()
          Builds bean instance for this field item corresponding to bean name.
 void free()
          Free this field item.
 java.lang.String getBean()
          Returns the name of the bean associated to this field item.
 LyFieldBeanInterface getBeanComponent()
          Gets bean component.
 java.lang.String getBeanData(java.lang.String name)
          Deprecated. Use LyComponent.getData.
 java.util.Hashtable<java.lang.String,java.lang.String> getBeanDatas()
          Deprecated. Use LyComponent.getDatas.
 LyComponent getChild(int i)
          Returns child component of index i.
 int getChildCount()
          Returns child component count.
 java.lang.String getErrorMessage()
          Returns the error message associated to this field item.
 java.lang.Object getFieldValue()
          Gets the field value presented in this field item.
 java.lang.String getValue()
          Default accessor to the value.
 void setBean(java.lang.String bean)
          Sets attribute bean to the given value.
 void setBeanComponent(LyFieldBeanInterface beanComponent)
          Sets bean component.
 void setBeanDatas(java.util.Hashtable<java.lang.String,java.lang.String> datas)
          Deprecated. Use LyComponent.setDatas.
 void setFieldValue(java.lang.Object value)
          Sets the field value presented in this field item.
 void setLabel(java.lang.String label)
          Sets attribute label to the given value.
 void updateViewContent()
          Updates the content of the LyViewComponent from the graphical component This method is used to set the view component from a graphical component like a textfiel, which value may have changed in the graphical component.
 short validateInput()
          Validate input done on this field item.
 
Methods inherited from class leon.view.LyComponent
addComponent, addData, addEventFunction, clearChildrenBounds, cloneComponent, freeze, getBounds, getChildFromCache, getChildrenBounds, getComponent, getComponent, getComponent, getComponent, getComponent, getComponentAt, getComponentAt, getComponentByInternalId, getComponentByLabel, getComponents, getComponentWithModel, getData, getDatas, getEnvironment, getEventFunctions, getId, getIdCode, getInternalId, getInternalView, getInternalView, getLock, getModel, getParent, getParentArea, getParentForm, getParentFormFieldId, getParentSplitter, getParentSplitter, getParentTab, getParentTab, getParentTabs, getParentTabs, getParentView, getRootController, getSetVisibleParent, getTag, getViewManager, isFreed, isFreeing, registerChildrenBounds, removeComponent, reset, resetChildrenCache, resetEventFunctions, setDatas, setInternalView, setVisible, useEventDefaultFunction, writeXml, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyFieldItem

public LyFieldItem()
Default constructor. Initialization is done with the init method.

Method Detail

setLabel

public void setLabel(java.lang.String label)
Sets attribute label to the given value.

Parameters:
label - new value of label.

setBean

public void setBean(java.lang.String bean)
Sets attribute bean to the given value.

Parameters:
bean - new value of bean.

setBeanDatas

public void setBeanDatas(java.util.Hashtable<java.lang.String,java.lang.String> datas)
Deprecated. Use LyComponent.setDatas.

Sets bean parameters.

Parameters:
datas - Datas of the bean.

getBeanData

public java.lang.String getBeanData(java.lang.String name)
Deprecated. Use LyComponent.getData.

Get data corresponding to the given data name.

Parameters:
name - Name of the data.
Returns:
Value of the data, null if not found.

addBeanData

public void addBeanData(java.lang.String name,
                        java.lang.String value)
Deprecated. Use LyComponent.addData.

Add data for the associated bean.

Parameters:
name - Name of the data.
value - Value of the data.

setFieldValue

public void setFieldValue(java.lang.Object value)
Sets the field value presented in this field item.

Parameters:
value - field value.

getFieldValue

public java.lang.Object getFieldValue()
Gets the field value presented in this field item.

Parameters:
value - field value.

getBean

public java.lang.String getBean()
Returns the name of the bean associated to this field item.


getBeanDatas

public java.util.Hashtable<java.lang.String,java.lang.String> getBeanDatas()
Deprecated. Use LyComponent.getDatas.

Gets bean parameters.

Returns:
Datas of the bean.

getBeanComponent

public LyFieldBeanInterface getBeanComponent()
Gets bean component.

Returns:
The bean component if this field item has one, null otherwise.

setBeanComponent

public void setBeanComponent(LyFieldBeanInterface beanComponent)
Sets bean component.

Parameters:
beanComponent - The bean component if this field item has one, null otherwise.

buildBean

public LyViewComponent buildBean()
Builds bean instance for this field item corresponding to bean name.

Returns:
The bean component if this field item has one, null otherwise.

getChildCount

public int getChildCount()
Returns child component count.

Overrides:
getChildCount in class LyComponent

getChild

public LyComponent getChild(int i)
Returns child component of index i.

Overrides:
getChild in class LyComponent
Parameters:
i - index of component to get.
Returns:
child component of index i.

getValue

public java.lang.String getValue()
Default accessor to the value.


validateInput

public short validateInput()
Validate input done on this field item.


getErrorMessage

public java.lang.String getErrorMessage()
Returns the error message associated to this field item.

Returns:
an error message if the value of the field item is not correct.

updateViewContent

public void updateViewContent()
Description copied from interface: LyUpdateViewContentInterface
Updates the content of the LyViewComponent from the graphical component This method is used to set the view component from a graphical component like a textfiel, which value may have changed in the graphical component.

Specified by:
updateViewContent in interface LyUpdateViewContentInterface

free

public void free()
Free this field item.

Overrides:
free in class LyComponent

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com