Rabbit 1.1

Class HopObject

Object
   |
   +--HopObject
Direct Known Subclasses:
XmlMap, Root

class 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.


Defined in .jsdoc/HopObject.js


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

_id

Number _id

_parent

HopObject _parent

_prototype

String _prototype

cache

HopObject cache

Constructor Detail

HopObject

HopObject()

Method Detail

add

Boolean add(<HopObject> object)

addAt

Boolean addAt(<Number> position, <HopObject> object)

clearCache

void clearCache()

contains

Number contains(<HopObject> object)

count

void count()

editor

String editor(<String> name, <Number> width, <Number> height)

get

Object get(<Object> id)

getById

HopObject getById(<Number> id)

getChildElement

HopObject getChildElement(<String> name)

href

String href(<String> action)

invalidate

Boolean invalidate()

list

Array list(<Number> start, <Number> end)

onRequest

void onRequest()

persist

Number persist()

prefetchChildren

void prefetchChildren(<Number> start, <Number> length)

remove

void remove()

removeChild

void removeChild(object)

renderSkin

void renderSkin(<String> name, <Object> param)

renderSkinAsString

String renderSkinAsString(<String> name, <Object> param)

setParent

void setParent(<HopObject> object)

size

Number size()

Rabbit 1.1

Documentation generated by JSDoc on Thu Feb 15 20:58:41 2007