Name

class (LzUserClass) — Defining your own tags.

Synopsis

LZX: class
JavaScript: LzUserClass
Type: Class
Access: public
Topic: LZX.Basics
Declared in: WEB-INF/lps/lfc/core/UserClass.lzs

Description

An LzUserClass is the implementation of the class tag. It ensures that the class is instantiated in lexical order with surrounding nodes

The class tag defines a new tag, which be used anywhere in the source file where a built-in tag such as view or layout can be used.

Defines a new XML tag name, that can be used in the remainder of the application source. An element whose name is this tag name will inherit the attributes and content of this definition.

For example,

 <class name="mywindow" extends="window" layout="y" title="My Class">
   <text>my class</text>
 </class>
 

defines a new tag named mywindow. This tag can be used anywhere that window is used.

 <mywindow x="10">
   <button>Click</button>
 </mywindow>
 

is equivalent to

 <window layout="y" title="My Class">
   <text>my class</text>
   <button>Click</button>
 </window>
 

Class definitions must precede view definitions that use the name of the class. An application can use a tag that is defined in a library, if the library is included before the point where the tag is used.

For an introduction to classes in LZX, see the Classes tutorial. For a concise explanation of classes in LZX, see the Classes chapter in the Guide. For advanced topics see the Extending Classes chapter.

Superclass Chain

node (LzNode) » class (LzUserClass)

Known Subclasses

Details

Methods (1)

initialize()
<method name="initialize" args="parent, args" />
public function initialize(parent, args);

LZX Synopsis

<class name="LzUserClass" extends=" LzNode ">
  <method name=" initialize " args="parent, args" />
</class>

JavaScript Synopsis

public LzUserClass extends  LzNode  {
  prototype public function initialize (parent, args);
}