<baseformitem>

an abstract class for components which are used in a form

JavaScript: baseformitem

Extends Basevaluecomponent

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

See Also:
Attributes
Name Usage Type (Tag) Type (JS) Default Category
changed Tag & JS expression any false setter
 

Boolean to determine whether the baseformitem was changed. Default is false.


ignoreform Tag & JS expression any false setter

rollbackvalue Tag & JS expression any null setter

submit Tag & JS boolean Boolean   setter
 

If submit is true, then the value of this element will be submitted with the form. By default, submit is true when enabled.


submitname Tag & JS string String   setter
 

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.



Attributes inherited from Basecomponent

doesenter, enabled, hasdefault, isdefault, style, styleable, text

Attributes inherited from Basevaluecomponent

value

Attributes inherited from Node

class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes

Attributes inherited from View

aaactive, aadescription, aaname, aasilent, aatabindex, align, bgcolor, clickable, clickregion, clip, cursor, defaultplacement, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hassetheight, hassetwidth, height, layout, loadratio, mask, onblur, onclick, ondata, ondblclick, onfocus, onkeydown, onkeyup, onmousedown, onmouseout, onmouseover, onmouseup, onselect, opacity, options, pixellock, play, resource, resourceheight, resourcewidth, rotation, selectiontype, showhandcursor, source, stretches, subviews, totalframes, unstretchedheight, unstretchedwidth, valign, visible, width, x, xoffset, y, yoffset


Methods

applyData()
baseformitem.applyData(d)

This implementation sets the applied data as an initalizater value. This is run by a datapath to get the data from a data node.

Parameters
Name Type Desc
d Any the data value to set in this object.


commit()
baseformitem.commit()

Commit value and set changed to false.



findForm()
baseformitem.findForm()

Finds a baseform ancestor

Returns
Type Desc
a form if found, else null.


init()
baseformitem.init()


rollback()
baseformitem.rollback()

Rollback value and set changed to false.



setChanged()
baseformitem.setChanged(changed, skipform)

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.

Parameters
Name Type Desc
changed Boolean true if changed, else false.
skipform Boolean true to skip notifying parent form


setValue()
baseformitem.setValue(v, isinitvalue)

Set the value for the baseformitem.

Parameters
Name Type Desc
v Any the value of the baseformitem.
isinitvalue Boolean if true, the rollbackvalue is set.


toXML()
baseformitem.toXML(convert)

This returns the value of the component in XML format: submit_name="value"

Parameters
Name Type Desc
convert Boolean if true, boolean values will be converted to 1 and 0


updateData()
baseformitem.updateData()

This implementation returns the value. This is run by a datapath to set the value to a data node.



Methods inherited from basecomponent

doEnterDown, doEnterUp, doSpaceDown, doSpaceUp, setStyle, setTint, updateDefault

Methods inherited from basevaluecomponent

getValue

Methods inherited from LzNode

animate, applyConstraint, applyData, childOf, completeInstantiation, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption

Methods inherited from LzView

addProxyPolicy, addSubview, bringToFront, construct, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getContextMenu, getCurrentTime, getDepthList, getHeight, getID3, getMouse, getPan, getTotalTime, getVolume, getWidth, init, measureHeight, measureWidth, play, releaseLayouts, removeProxyPolicy, searchParents, searchSubviews, seek, sendBehind, sendInFrontOf, sendToBack, setAAActive, setAADescription, setAAName, setAASilent, setAATabIndex, setAlign, setAttributeRelative, setBGColor, setClickable, setColor, setColorTransform, setContextMenu, setCursor, setHeight, setLayout, setOpacity, setPan, setPlay, setResource, setResourceNumber, setRotation, setShowHandCursor, setSource, setValign, setVisible, setVolume, setWidth, setX, setY, shouldYieldFocus, stop, stretchResource, unload, updateResourceSize


Events
Name Description
onchanged None
onvalue None

Events inherited from LzNode

onconstruct, ondata, oninit

Events inherited from LzView

onaddsubresource, onaddsubview, onblur, onclick, ondblclick, onerror, onfocus, onframe, onheight, onlastframe, onload, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmouseup, onmouseupoutside, onopacity, onplay, onremovesubview, onstop, ontimeout, onwidth, onx, ony