[Helma-dev] HopObject.getByID
Jürg Lehni
juerg at vectorama.org
Fri Aug 29 14:07:57 CEST 2003
I think this function could be very usefull.
From the documentation:
> HopObject.get(Number)
> HopObject.get(String)
>
> The type of the result depends on the type of the submitted argument:
a number will retrieve the subnode of the HopObject at the
corresponding index position, a string the corresponding property of
the HopObject.
> Finally, a number as string retrieves the subnode with the
corresponding Hop ID.
For collections with accessname defined, HopObject.get(String) returns
the object with that accessname. There's no way to get the the object
with an ID because the ID as String is interpreted as accessname. In
this case I have to create collections like 'someobjectsByID' which are
identical with 'someobjects' but just don't define accessname. for this
case, it would be much easier to just use someobjects.getByID().
So +1 for implementing this little function.
Jürg
More information about the Helma-dev
mailing list