Announcement Announcement Module
No announcement yet.
Multiple selects (not a mulit-select box) binding to a Set Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple selects (not a mulit-select box) binding to a Set

    Looking for some advice (if it's even feasible) on how to bind multiple select elements to a Set in a command object. Currently we are working on a Digital Rights Managment (DRM) system where assets have certain Digital Rights. Each type of Right has it's own options for a dropdown. Some of the Rights options share commonality such as additional fees required, cleared, or restricted. This is the "typical" case. Other Rights such as Geographic don't have any of the above mentioned but have a completely different set of options. Each Right subclass just has and ID and Value

    For each asset I'd like to keep a Set of Rights associated with it. Is it possible in Spring to bind many different select boxes to the same Set within the command object?

    In the View the user has approximately 6 select boxes. The user is required to choose 1 option from each select box OnSubmit I'd like to bind all options from the 6 select boxes and add each of the chosen values to the Set within the Asset object. Finally, when the user revisits the page (via search) I'd like to display the correct option that was chosen previously.

    Currently I have a lot of code in my onBind method to retrieve the id provided as the select <option> and I manually add the object to the Set. The main issue is I can't figure out how to get the stored value to be redisplayed in the View.

    Is there a better way to do this?