Subj : Rhino "UnwrapFactory"? To : netscape.public.mozilla.jseng From : Mike Wertheim Date : Wed Apr 06 2005 05:30 pm This is a multi-part message in MIME format. ------_=_NextPart_001_01C53B00.955FF994 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =20 I'm new to the list (and to Rhino in general). =20 I'm working on an app that uses the Rhino javascript library. Our java code has a domain model, and the javascript code uses generated proxy classes that mirror the domain model. i.e. In java, we have com.nimblefish.domain.Firetruck, and in javascript we have com.nimblefish.proxy.FiretruckProxy. We use a WrapFactory to transform Firetruck objects (which are created in the java layer) into FiretruckProxy objects (to be used in the javascript layer). =20 The problem with is that the javascript code might pass a FiretruckProxy object into the java layer (which is expecting to receive a Firetruck object). =20 Is there an automated way of handling this transformation? (i.e. something that acts like WrapFactory in reverse)? =20 If there isn't an automated way to do it, I'd be interested in hearing of any ways that people have addressed this issue. =20 =20 =20 Thanks, =20 Mike Wertheim Nimblefish SF, CA =20 =20 =20 =20 ------_=_NextPart_001_01C53B00.955FF994 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi,
I’m new to the list (and to Rhino in =
general).
I’m working on an app that uses the Rhino =
javascript
library. Our java code has a domain model, and the javascript code =
uses
generated proxy classes that mirror the domain model. i.e. In =
java, we have
com.nimblefish.domain.Firetruck, and in javascript we have =
com.nimblefish.proxy.FiretruckProxy.
We use a WrapFactory to transform Firetruck objects (which are created =
in the
java layer) into FiretruckProxy objects (to be used in the javascript =
layer).
The problem with is that the javascript code might =
pass a FiretruckProxy
object into the java layer (which is expecting to receive a Firetruck =
object).
Is there an automated way of handling this =
transformation?
(i.e. something that acts like WrapFactory in =
reverse)?
If there isn’t an automated way to do it, =
I’d be
interested in hearing of any ways that people have addressed this =
issue.
Thanks,
Nimblefish
SF, CA