tags:

views:

130

answers:

2

Not sure how it is called...maybe you can help me out...

I got a lot of Addresses. I want to get an overview and created so called Addressgroups like "My Friends" for example.

Some Addresses have multiple Groups.

Code works fine.

What i need is a way to display all my availble Groups in one List on my Controller. The User must be able so selected one or multiple Groups from that List and add it to the Entry Properties.

At the moment i achieve this by using checkboxes for every Group. Maybe there is an jquery or richui example for that?

Update for Kevin Buchan:

In my View i want to have to Lists:

One List shows all availble Addressgroups

The Second List show the Groups which the Adress is part of. In the beginning there is no membership to a group.

I mark two Groups from my "All Groups" List and press Submit.

Result:

One List shows all availble Addressgroups except the two Groups that the Address is a member of.

The second List shows the Groups from the Adress. Adress is a Member of that Groups.

The logic behind this is pretty easy..and the app is already running. But i want to make it look good.

Update2 i found this Screenshot...i want to do the same with grails

Test

+3  A: 

Like Kevin, I'm not sure I entirely understand what you're asking, but it looks like you want users to select items using a double listbox setup. I use these in our app quite a bit. There is a jQuery plugin that handles this beautifully. It even provides nice find-as-you-type filters for each listbox.

Note that I needed to add a function that selects all of the items on submit so they get sent in the post:

$('form').submit(function() {
                $("#GroupsAssigned *").attr("selected", "selected");
            });

I don't have 10 rep so I can't show a screenshot or post another link, but I've got a screenshot if you need it.

Hope that helps!

BrianM
wow...this is exactly what i was looking for. Great!
bastianneu
+1  A: 

I think this thread has a code snippet that could be useful to you using grails-ui plugin. I asked a similar question, though didn't get a chance to try it out yet.

Jean Barmash
1+ thank you for that thread.
bastianneu