Name

baseform — web form

Synopsis

LZX: baseform
JavaScript: baseform
Type: Class
Access: public
Topic: Components.Base Components
Declared in: lps/components/base/baseform.lzx

Description

The baseform tag allows you to create a web form. The data represented by components that are enclosed in the form tag can be sent to the server using the submit tag. Each form component, such as checkbox, combobox or radiogroup must have a name. The data is submitted as name-value pairs, using the name and value of the component.

baseform provides no layout for its contents. If you want a simple automatic form layout use the form tag.

Provides component grouping for a form. A form is typicaly a collection of UI elements where each represents data from the user that will be submitted to the server as a request. Baseform supports listening for a changed value. A value is changed if the value of any of its baseformitems were modified at any point.

Superclass Chain

node (LzNode) » view (LzView) » baseform

Known Subclasses

Known Direct Subclasses: form

Details

Properties (2)

changed
<attribute name="changed" value="false" />
public var changed;
Boolean to determine whether the baseformitem was changed. Default is false.
formdata
<attribute name="formdata" />
public var formdata;
Holds a reference to each datacomponent contained within the form.

Methods (5)

addFormItem()
<method name="addFormItem" args="item" />
public function addFormItem(item);
commit()
<method name="commit" />
public function commit();
Commits baseform's baseformitem values and sets baseform and baseformitems to changed=false.
removeFormItem()
<method name="removeFormItem" args="item" />
public function removeFormItem(item);
rollback()
<method name="rollback" />
public function rollback();
Rollback baseform's baseformitem values and sets baseform and baseformitems to changed=false.
setChanged()
<method name="setChanged" args="changed, skipformdata" />
public function setChanged(changed : Boolean, skipformdata : Boolean);
Setter to to set baseform's status to changed. Baseformitems should set baseform's changed to true when its values change and set baseform's changed to false when its values are rollback or committed.

Events (1)

onchanged
<attribute name="onchanged" />
public event onchanged;
Event sent when baseformitem is changed. Only sent once when true or once when false.

LZX Synopsis

<class name="baseform" extends=" LzView ">
  <attribute name=" changed " value="false" />
  <attribute name=" formdata " />
  <method name=" addFormItem " args="item" />
  <method name=" commit " />
  <event name=" onchanged " />
  <method name=" removeFormItem " args="item" />
  <method name=" rollback " />
  <method name=" setChanged " args="changed, skipformdata" />
</class>

JavaScript Synopsis

public baseform extends  LzView  {
  public var changed ;
  public var formdata ;
  prototype public function addFormItem (item);
  prototype public function commit ();
  prototype public event onchanged ;
  prototype public function removeFormItem (item);
  prototype public function rollback ();
  prototype public function setChanged (changed : Boolean, skipformdata : Boolean);
}