HopObject

Object
   |
   +--HopObject

Defined in HopObject.js

See:



Constructor Summary
HopObject()
            Constructor for HopObject objects, providing the building blocks of the Helma framework.
 
Properties Summary
 Number _id
          The unique id of the HopObject.
 HopObject _parent
          The parent collection containing this HopObject.
 
Methods Summary
 Boolean add(<HopObject> subnode)
           Attaches a HopObject as an additional subnode.
 Boolean addAt(<Number> position,<HopObject> subnode)
           Attaches an additional subnode at the given index.
 Object cache()
           Cache object providing space for arbitrary run-time data.
 void clearCache()
           Clears this HopObject's cache property.
 Number contains(<HopObject> obj)
           Determines if a HopObject contains a certain subnode.
 Number count()
           Get the number of subnodes attached to this HopObject.
 HopObject get(<String> id)
           Retrieves a property or a subnode of a HopObject.
 HopObject getById(<Number> id,<String> proto)
           Retrieves the specified HopObject.
 HopObject getChildElement(<String> name)
           Optional handler to override the default URL path resolution.
 Array getOrderedView(<String> name)
           Returns a collection including all subnodes of a HopObject ordered according to the properties listed in the string passed as argument.
 helma.framework.repository.Resource getResource(<String> resourceName)
           Returns a helma.framework.repository.Resource object defined for the prototype.
 Array getResources(<String> resourceName)
           Returns an Array of helma.framework.repository.Resource objects defined for the prototype.
 String href(<String> action)
           Returns the absoulte URL path of a HopObject relative to the application's root.
 void href_macro(param)
           macro returns the url for any hopobject
 void id_macro(param)
           macro returns the id of a HopObject
 void invalidate(childId)
           Marks a HopObject as invalid so that it is fetched again from the database.
 Array list()
           Returns an array including all subnodes of a HopObject.
 void loop_macro(param)
           generic macro that loops over the childobjects and renders a specified skin for each of them
 void onInit()
           If a HopObject prototype defines a function named onInit(), it will be called on each HopObject that is fetched from embedded or relational database.
 void onPersist()
           If a HopObject prototype defines a function named onPersist(), it will be called on each HopObject immediately before it is stored to embedded or relational database.
 void onRequest()
           If defined, the onRequest() function is called on the object specified by the request path just before the action is invoked.
 void onUnhandledMacro()
           If a HopObject prototype defines a function named onUnhandledMacro(), it will be called when a macro is rendered on the HopObject that can't be mapped to a macro function or property of the HopObject.
 void persist()
           Stores a transient HopObject and all HopObjects reachable from it to database.
 void prefetchChildren(<Number> startIndex, <Number> length)
           Manually retrieving a particular set of subnodes.
 void remove()
           Deletes a HopObject from the database.
 void removeChild(<HopObject> child)
           Notifies a parent object that a child object has been removed.
 void renderSkin(<String> skin, <Object> params)
           Renders a skin of a HopObject and writes the result to the output buffer.
 String renderSkinAsString(<String> skin, <Object> params)
           Renders a skin of a HopObject and returns the result as string.
 void setParent(<HopObject> subnode)
           Assigns a HopObject as parent to a subnode.
 Number size()
           Get the number of subnodes attached to this HopObject.
 void skin_macro(param)
           macro rendering a skin or displaying its source (param.as == "source")
 void switch_macro(param)
           this macro renders a text depending on the value of a given property
 void update()
           Refetches updateable Subnode-Collections from the database.

Constructor Detail

HopObject

HopObject()

Properties Detail

_id

Number _id

_parent

HopObject _parent

Method Detail

add

Boolean add(<HopObject> subnode)

addAt

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

cache

Object cache()

clearCache

void clearCache()

contains

Number contains(<HopObject> obj)

count

Number count()

get

HopObject get(<String> id)

getById

HopObject getById(<Number> id,<String> proto)

getChildElement

HopObject getChildElement(<String> name)

getOrderedView

Array getOrderedView(<String> name)

getResource

helma.framework.repository.Resource getResource(<String> resourceName)

getResources

Array getResources(<String> resourceName)

href

String href(<String> action)

href_macro

void href_macro(param)

id_macro

void id_macro(param)

invalidate

void invalidate(childId)

list

Array list()

loop_macro

void loop_macro(param)

onInit

void onInit()

onPersist

void onPersist()

onRequest

void onRequest()

onUnhandledMacro

void onUnhandledMacro()

persist

void persist()

prefetchChildren

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

remove

void remove()

removeChild

void removeChild(<HopObject> child)

renderSkin

void renderSkin(<String> skin, <Object> params)

renderSkinAsString

String renderSkinAsString(<String> skin, <Object> params)

setParent

void setParent(<HopObject> subnode)

size

Number size()

skin_macro

void skin_macro(param)

switch_macro

void switch_macro(param)

update

void update()


Documentation generated by JSDoc on Thu Apr 5 01:59:00 2007