aspose file tools*
The moose likes XML and Related Technologies and the fly likes Populate MultiSelect  Dojo box onLoad from XML data file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Populate MultiSelect  Dojo box onLoad from XML data file" Watch "Populate MultiSelect  Dojo box onLoad from XML data file" New topic
Author

Populate MultiSelect Dojo box onLoad from XML data file

Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121

Hi,

I created a dijit.form.multiselect control and populated it with hardcoded data in the create.jspx - for testing.

That works fine. Now, I need to populate it with external XML data at onload time. How do I do that in create.jspx? Most materials I read on this subject either uses a json data file or an URI as data source. Furthermore, is there any applicable examples that I can follow?

In create.jspx, I have this:

Any info will be greatly appreciated.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

JSP can create anything--it doesn't care. It's a (verbose) templating language. Set the contentType.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Moving to JSP, as at this point the question has nothing to do with Spring.

Note that there are other ways to get XML other than a JSP, like serializing to XML.
Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
Thank you, David.

Thank you for the suggestion as well. By "serializing to XML", did you mean to read from an XML file? Probably not.

I have a whole bunch of *jspx files written up via Spring Roo as the initial program structure and I thought to stick with the *.jspx files for Views would be an easier way out. Can you please elaborate a bit on how I can do this by "serializing to XML'?

Many Thanks...Mimi
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Mimi Tam wrote:By "serializing to XML", did you mean to read from an XML file? Probably not.

No, that'd be deserializing.
please elaborate a bit on how I can do this by "serializing to XML'?

http://www.google.com/search?q=java+%2Bserialize+to+xml
Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121

Yes, I thought so as well. Thank you very much for the link, David. It is very helpful.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Populate MultiSelect Dojo box onLoad from XML data file