Ant�nio Santos wrote:
Can some of you please tell me if sending data to the View in an XML formatted string as an attribute in the HTTP Request is a good practice? This will force the JSP to do XML parsing, but I think this is a fairly good idea in order to send lots of data (example: several rows of a DB) to the View. Is there any other better approach (using Beans, for example)?
Isn't it easier to just call a bunch of setMethods on a bean and pass that to the view? Not that there's anything wrong with your approach, but then you have to encode/decode the XML. Plus, you can always add a behavior to your bean sometime down the road (or read-only properties dynamically generated from bean fields), which you can't really do with a mini-XML document. And JSP already has the facilities needed to display bean properties, whereas you'd have to write extra code to pull out data from the XML string.
Just seems like extra work, but perhaps I don't know what you're really asking.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

