spry:select and spry:selectgroup Sample

You can use the "spry:select" attribute to swap in and out a CSS class name of your choice to draw something selected/unselected. If you need to have 2 or more areas on the page with independent selection, you will have to use the "spry:selectgroup" attribute in conjunction with the "spry:select" attribute to make sure the two areas don't interfere with each other.


Here's an example of 2 lists that use "spry:select" and no "spry:selectgroup". Notice how selecting an item in one list, causes the selection in the other to disappear?

List 1 List 2
  • {firstname} {lastname}
  • {firstname} {lastname}

Here's an example where each list uses a different spry:selectgroup value. Notice now that the selections are independent of each other.

List 1 List 2
  • {firstname} {lastname}
  • {firstname} {lastname}