Announcement Announcement Module
Collapse
No announcement yet.
Ajax Spring 3.0 and Degradeability Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ajax Spring 3.0 and Degradeability

    Hi all, I've just had a read of Ajax Simplifications in Spring 3.0 and must say that as a casual spring developer, I am so far overwhelmingly impressed with what Spring 3.0 has to offer; thus I'm convinced that Spring 3.0 is the technology of choice for the project that I've just embarked on.

    However, although I suspect accessability/degradeability is outside of scope of that article, it's an issue that I will certainly need to address and would like to develop a solution in the most cleanest/efficient manner possible.

    Consider the simple example of a drop down select element, that will append a fieldset of other elements based on the selection.

    My development approach would be to implement this piece of functionality with JavaScript turned off. I'd start with setting up a @controller that will work out the flow and assign values to the model which the jsp will decide on what elements to display using a tradional browser post by clicking an input submit.

    Easy..

    Now, with JavaScript turned on with my js library of choice added to the page, I plan to hide the submit button after the select element, and register an onSelect event that..

    This is where I can't decide what to do

    Can I do a $.getJSON request to the same controller as above to invoke the same controller logic that would have been run with JS turned off?

    Is the best place to put the html fieldset elements in the model to prevent duplication in the jsp/js?

    I can see it getting quite messy with the optional fieldsets being as part of the model and anticipate having to generate html from/to json using the model.

    Appreciate any thoughts.. Cheers

  • #2
    Maybe crank out a little test project on github and we can review it and offer some tips. Much better to have something to look at and debug together than to speculate in words. :-)

    Keith

    Comment

    Working...
    X