• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Populate MultiSelect Dojo box onLoad from XML data file

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yes, I thought so as well. Thank you very much for the link, David. It is very helpful.
 
Dinner will be steamed monkey heads with a side of tiny ads.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic