Announcement Announcement Module
Collapse
No announcement yet.
A really dumb view question... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • A really dumb view question...

    Sorry if this is too stupid, but I have several dropdown lists, which are related, so that choice A populates choice B which populates choice C...
    C and D are related such that any one C has only some D's and vice versa.


    When I began to code the controller as a single request controller, I found that I had to check different conditions to determine what I needed to populate, this lead me to believe that I should have a separate request controller for each option...is this overkill?

    Should I have a request controller for each?
    Should I have a view for each?

    Thanks.

  • #2
    Another option (especially for an Intranet app) would be to do it all in JavaScript.

    However, I would advice to either do it all on the server side in your controller(s) or all on the client side in JavaScript. Mixing the two approaches just complicates things because you have to deal with page state after reloads in your JavaScript, which can quickly become ugly.

    Erwin

    Comment


    • #3
      I solved a similar problem with the code layed out in

      http://forum.springframework.org/showthread.php?t=11702

      using MultiActionFormController to add things to the form.

      The worse way i ever did this though was an ASP solution about 7 years ago where there was a hidden frame on the page. The dropdown list would force the hidden frame to make a server request which would then create dynamic javascript to populate the original frames elements. nightmare. dont do it. dont do ASP either..
      Last edited by robyn; May 14th, 2006, 04:37 PM.

      Comment


      • #4
        Thanks for the ideas. I'm planning on handling it server-side, because there's a lot of data.
        I'm going to go with separate request controllers, and if it gets to be overkill, I can always condense it into one controller.

        Anyway, I try to stay away from the ASP/ASP.net as much as possible - only when it is an actual requirement

        Comment

        Working...
        X