<baseformitem>
an abstract class for components which are used in a form

JavaScript: lz.baseformitem

This abstract class works with <form> or <baseform>. All form components subclass this.

See Also:

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
changed expression any false read/write
  Boolean to determine whether the baseformitem was changed.
ignoreform expression any false read/write
  If true, the component will not inform its parent form that it has changed. Useful in conjunction with submit=false
rollbackvalue expression any null read/write
  Rollback value for the baseformitem.
submit boolean boolean enabled read/write
  If submit is true, then the value of this element will be submitted with the form. By default, submit is true when enabled.
submitname string String   read/write
  The name used when submitting the data of the form item. If no submitname is given before oninit, the 'name' attribute is used. Unlike the name attribute, submitname may be changed at runtime.
value expression any null read/write
  The value of the baseformitem.

Attributes inherited from <basevaluecomponent>

type, value

Methods

commit()
baseformitem.commit();
Commit value and set changed to false.

destroy()
baseformitem.destroy();

findForm()
baseformitem.findForm();
Finds a baseform ancestor

init()
baseformitem.init();

rollback()
baseformitem.rollback();
Rollback value and set changed to false.

setChanged()
baseformitem.setChanged(changed : Boolean, skipform : Boolean);
Setter to set baseformitem to changed. Should be called by subclasses whenever a value is set. The first time this is called, the changed value is not set since it assumes subclasses are setting their initial value.
Parameter Name Type Description
changed Boolean true if changed, else false.
skipform Boolean true to skip notifying parent form

setValue()
baseformitem.setValue(v : Any, isinitvalue : Boolean);
Set the value for the baseformitem.
Parameter Name Type Description
v Any the value of the baseformitem.
isinitvalue Boolean if true, the rollbackvalue is set.

toXML()
baseformitem.toXML(convert : Boolean);
This returns the value of the component in XML format: submit_name="value"
Parameter Name Type Description
convert Boolean if true, boolean values will be converted to 1 and 0

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Name Description
onchanged Event sent when baseformitem is changed. Only sent once when true or once when false.
onvalue Event sent whenever checkbox value changes.

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy