Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populate MultiSelect Dojo box onLoad from XML data file

 
Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP can create anything--it doesn't care. It's a (verbose) templating language. Set the contentType.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes, I thought so as well. Thank you very much for the link, David. It is very helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic