|
Rabbit 1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--HopObject
Extends the standard JavaScript object with
Helma-specific properties and functions. The HopObject
is the basic building block of a Helma application. The
website root object as well as any custom type defined
by the application are HopObjects and inherit all
functionality described below.
In addition to defining and scripting your individual types of HopObjects it is possible to extend all your prototypes that are derived from HopObject by adding a "HopObject" directory to your application.
Field Summary | |
Number |
_id
The unique id of the HopObject. |
HopObject |
_parent
The parent collection containing the HopObject. |
String |
_prototype
The prototype of a HopObject. |
HopObject |
cache
Object providing space for arbitrary run-time data (object cache). |
Constructor Summary | |
HopObject
()
Constructs a new HopObject. |
Method Summary | |
Boolean
|
add(<HopObject> object)
Adds a HopObject as new subnode to another HopObject. |
Boolean
|
addAt(<Number> position, <HopObject> object)
Adds a HopObject as subnode to a HopObject at a certain position. |
void
|
clearCache()
|
Number
|
contains(<HopObject> object)
Determines if a HopObject contains a certain subnode. |
void
|
count()
DEPRECATED. |
String
|
editor(<String> name, <Number> width, <Number> height)
Returns an HTML input element for a HopObject property. |
Object
|
get(<Object> id)
Retrieves a property or a subnode of a HopObject. |
HopObject
|
getById(<Number> id)
Retrieves a HopObject by its ID. |
HopObject
|
getChildElement(<String> name)
Handle Helma's request for a HopObject's subnode. |
String
|
href(<String> action)
Returns the absoulte URL path of a HopObject relative to the application's root. |
Boolean
|
invalidate()
Marks a HopObject as invalid so that it is fetched again from the database. |
Array
|
list(<Number> start, <Number> end)
Returns an array of subnodes of a HopObject. |
void
|
onRequest()
Handle Helma requests for the HopObject. |
Number
|
persist()
Stores a transient HopObject and all HopObjects reachable from it to database. |
void
|
prefetchChildren(<Number> start, <Number> length)
Manually retrieve a particular set of subnodes. |
void
|
remove()
Deletes a HopObject from the database. |
void
|
removeChild(object)
Notifies a parent object that a child object has been removed. |
void
|
renderSkin(<String> name, <Object> param)
Renders a skin of a HopObject and writes the result to the output. |
String
|
renderSkinAsString(<String> name, <Object> param)
Renders a skin of a HopObject and returns the result. |
void
|
setParent(<HopObject> object)
Assigns a HopObject as parent to a subnode. |
Number
|
size()
Get the number of subnodes contained by the HopObject. |
Field Detail |
Number _id
HopObject _parent
String _prototype
HopObject cache
Constructor Detail |
HopObject()
Method Detail |
Boolean add(<HopObject> object)
object
- The HopObject to be added.
Boolean addAt(<Number> position, <HopObject> object)
position
- The position a new HopObject should be added at.
object
- The HopObject to be added.
void clearCache()
Number contains(<HopObject> object)
object
- The desired HopObject.
void count()
String editor(<String> name, <Number> width, <Number> height)
name
- The name of the property.
width
- The width of the input element.
height
- The height of the input element.
Object get(<Object> id)
id
- The name of the property or hte ID of the desired HopObject. This can be a number (e.g. 12), a string ("twelve") or a number as string ("12").
HopObject getById(<Number> id)
id
- The ID of the desired HopObject.
HopObject getChildElement(<String> name)
name
- The name of the child element.
String href(<String> action)
action
- An optional action that will be appended to the URL string.
Boolean invalidate()
Array list(<Number> start, <Number> end)
start
- The index position of the first subnode.
end
- The index position of the last subnode.
void onRequest()
Number persist()
void prefetchChildren(<Number> start, <Number> length)
start
- The index position of the first subnode to be retrieved.
length
- The number of subnodes to be fetched.
void remove()
void removeChild(object)
void renderSkin(<String> name, <Object> param)
name
- The name of the skin to be rendered.
param
- Extra HopObject macro parameters.
String renderSkinAsString(<String> name, <Object> param)
name
- The name of the skin to be rendered.
param
- Extra HopObject macro parameters.
void setParent(<HopObject> object)
object
- The parent of the HopObject.
Number size()
|
Rabbit 1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |