org.spiffyui.client.widgets.multivaluesuggest
Class MultivalueSuggestBoxBase.SelectedItem

java.lang.Object
  extended by HTMLPanel
      extended by org.spiffyui.client.widgets.multivaluesuggest.MultivalueSuggestBoxBase.SelectedItem
Enclosing class:
MultivalueSuggestBoxBase

public class MultivalueSuggestBoxBase.SelectedItem
extends HTMLPanel

This class represents a UI element for a selected item. It will have an anchor with an X to allow for this item to be dismissed


Constructor Summary
MultivalueSuggestBoxBase.SelectedItem(java.lang.String id, MultivalueSuggestBoxBase.Option option)
          Constructor
MultivalueSuggestBoxBase.SelectedItem(java.lang.String id, MultivalueSuggestBoxBase.Option option, java.lang.String html)
          Constructor
 
Method Summary
 java.lang.String getDisplay()
          Get the display string, which is the same as the name of the Option
 MultivalueSuggestBoxBase.Option getOption()
          Get the Option bean
 void onClick(ClickEvent event)
           
 void remove()
          Remove this selected item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultivalueSuggestBoxBase.SelectedItem

public MultivalueSuggestBoxBase.SelectedItem(java.lang.String id,
                                             MultivalueSuggestBoxBase.Option option)
Constructor

Parameters:
id - - the elements unique id
option - - the Option bean

MultivalueSuggestBoxBase.SelectedItem

public MultivalueSuggestBoxBase.SelectedItem(java.lang.String id,
                                             MultivalueSuggestBoxBase.Option option,
                                             java.lang.String html)
Constructor

Parameters:
id - - the elements unique id
option - - the Option bean
html - - the HTML string for the SelectedItem, which must include an id + "_main" to serve as the location where the close Anchor will go
Method Detail

onClick

public void onClick(ClickEvent event)

remove

public void remove()
Remove this selected item


getOption

public MultivalueSuggestBoxBase.Option getOption()
Get the Option bean

Returns:
the Option bean

getDisplay

public java.lang.String getDisplay()
Get the display string, which is the same as the name of the Option

Returns:
the display string