Subj : Nesting host objects To : netscape.public.mozilla.jseng From : Jalenak, Jerry Date : Tue Sep 06 2005 06:51 pm This is a multi-part message in MIME format. ------_=_NextPart_001_01C5B32D.0B26009B Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable All, =20 I'm in the process of investigating the use of Rhino and Javascript as a replacement for an inhouse script implementation. One of the things I need to do is implement a 'namespace' concept for variables, from both the Javascript side as well as the Java side. Here is what I am trying to get to: =20 netopia.scriptparms.var netopia.javaparms.var2 =20 where the 'netopia' host object would implement a factory pattern that would look up the second level identifier and delegate to it. This second level identifier would implement a map-backed data structure where I could look up the variable name (var or var2), and then return the value associated with the variable. =20 Is this possible? Or is there another way to achieve this type of functionality? =20 Thanks. =20 Jerry Jalenak Software Engineer Netopia, Inc. =20 ------_=_NextPart_001_01C5B32D.0B26009B Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
All,
I’m in the process of investigating the use of =
Rhino
and Javascript as a replacement for an inhouse script =
implementation. One of
the things I need to do is implement a ‘namespace’ concept =
for
variables, from both the Javascript side as well as the Java side. =
Here is
what I am trying to get to:
=
netopia.scriptparms.var
=
netopia.javaparms.var2
where the ‘netopia’ host object would =
implement
a factory pattern that would look up the second level identifier and =
delegate
to it. This second level identifier would implement a map-backed =
data
structure where I could look up the variable name (var or var2), and =
then
return the value associated with the =
variable.
Is this possible? Or is there another way to =
achieve this
type of functionality?
Thanks.
Jerry =
Jalenak
Software =
Engineer
Netopia, =
Inc.