The Artima Developer Community
Sponsored Link

Java Buzz Forum
ajaxify dependant selection lists with DWR

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marc Logemann

Posts: 594
Nickname: loge
Registered: Sep, 2002

Marc Logemann is founder of www.logentis.de a Java consultancy
ajaxify dependant selection lists with DWR Posted: Nov 19, 2006 6:13 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Marc Logemann.
Original Post: ajaxify dependant selection lists with DWR
Feed Title: Logemann Blog
Feed URL: http://www.logemann.org/blojsom/blog/default/?flavor=rss2
Feed Description: Marc's thoughts on Java and more
Latest Java Buzz Posts
Latest Java Buzz Posts by Marc Logemann
Latest Posts From Logemann Blog

Advertisement

I am using DWR in a very simple way since one year or something. Back then i created my own Spring creator because the one which was available wasnt very well implemented, or there was no creator altogether, dont know anymore. A few weeks after my implementation, Bram Smeets created also a nice one and put it into the DWR distribution. So today i upgraded to the latest 1.x DWR release and dropped my creator in favor of the included one.

The task was to have dependant selection lists (means, combo2 content is depentant on the value of combo1) without reloading the browser. It was nice to see that DWR is still the ultimate tool when it comes to simple solutions for everyday ajax tasks. Since all the bootstrapping stuff was done a year ago in our app, i only had to change the DTD delcaration of dwr.xml because my was very old. Putting the spring bean creator was an easy task and without any hassle, i had all my spring beans/services available for javascript remoting.

The rest was easy as well, putting 2 javascript functions in my HTML code and use the util.js addOption() function to append new values to my second combo based on the selected value of combo1. Very neat is that addOption() is also capable of working with an MyObject Array where you can also pass the names of the attributes which should act as the HTML select key and HTML select value part. The best of all: On java side i already had such a service for other tasks so i was able to simply reuse (i like this word) my spring service and was finished before i really started.

Sorry that i dont offer any technical details here. I just dont have the time since its 0:40 am here and i want to go to bed now :) Perhaps i will blog later on the details. Bottom line: i am still amazed by DWR and how it plays well with Spring and its really neat javascript helper libs.

Read: ajaxify dependant selection lists with DWR

Topic: Impact of Java and .NET Open Source Initiatives Previous Topic   Next Topic Topic: Gmail Mobile: My Wish List

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use