Fwd: [Laszlo-dev] PATCH: Correct handling of javabeans as return
objects
Henry Minsky
henry.minsky at gmail.com
Mon Jan 31 14:22:11 PST 2005
This patch looks fine, but I am wondering how to handle the dependence
on the commons-beanutils.jar file. It seems like that jar file is
shipped with Tomcat in its server/lib directory, so if we copy some
version of this jar into WEB-INF/lib, will there be any potential
conflicts between the LPS and some other version of Tomcat or other
servlet container?
---------- Forwarded message ----------
From: freaquac <jocsch at freaquac.de>
Date: Sun, 21 Nov 2004 20:00:59 +0100
Subject: [Laszlo-dev] PATCH: Correct handling of javabeans as return objects
To: laszlo-dev at openlaszlo.org
Hi list,
do you ever used the <javarpc> calls and inspected the laszlo converted
return object? Laszlo converts, at least in the 2.2 release (I don't have
tried 3.0 yet, maybe someone changed this behaviour already), only the public
fields of an object into xml and send them to the swf client.
That's pretty annoying because nobody (or not many) in the OO world use public
member fields. Instead it's normal to provide access via public getter and
setter methods. See the javabeans standard.
Because I didn't want to write a DTO for every object I have, I modified the
sourcecode of the LZReturnObject to inspect the given return object with the
help of the jakarta-commons beanutils
( http://jakarta.apache.org/commons/beanutils/ )
Now the LZReturnObject converts the object according to the javabean
specifications (that means it uses the public getters instead of accessing
the fields).
Maybe a developer can check this patch and apply it to cvs?
To compile the changed file it's neccessary to copy the commons-beanutils.jar
to the WEB-INF/lib directory (I use version 1.6.1)
Greetings,
Markus Joschko
I added a patch against the 2.2 version of LZReturnObject.java and the
modified LZReturnObject
_______________________________________________
Laszlo-dev mailing list
Laszlo-dev at openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.patch
Type: text/x-diff
Size: 1979 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20050131/4e59edbe/diff.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lzreturnobject.java
Type: text/x-java
Size: 11754 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20050131/4e59edbe/lzreturnobject.bin
More information about the Laszlo-dev
mailing list