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

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

public class MultivalueSuggestBoxBase.OptionSuggestion
extends java.lang.Object

A bean to serve as a custom suggestion so that the value is available and the replace will look like it is supporting multivalues


Constructor Summary
protected MultivalueSuggestBoxBase.OptionSuggestion(MultivalueSuggestBoxBase.Option option, java.lang.String replacePre, java.lang.String query)
          Constructor for suggested options
protected MultivalueSuggestBoxBase.OptionSuggestion(java.lang.String displ, java.lang.String val, java.lang.String replacePre, java.lang.String query)
          Deprecated. This method is deprecated and will be removed in future releases. Use OptionSuggestion(Option, String, String)
 
Method Summary
 java.lang.String getDisplayString()
           
 java.lang.String getName()
          Get the name of the option.
 MultivalueSuggestBoxBase.Option getOption()
          Return the Option bean
 java.lang.String getReplacementString()
           
 java.lang.String getValue()
          Get the value of the option
protected  java.lang.String safeBoldQueryWithinString(java.lang.String display)
          Escape the html so that it is safe and add bold tags around the display string where it matches the query string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultivalueSuggestBoxBase.OptionSuggestion

protected MultivalueSuggestBoxBase.OptionSuggestion(MultivalueSuggestBoxBase.Option option,
                                                    java.lang.String replacePre,
                                                    java.lang.String query)
Constructor for suggested options

Parameters:
option - - the Option bean
replacePre - - the current contents of the text box
query - - the query

MultivalueSuggestBoxBase.OptionSuggestion

@Deprecated
protected MultivalueSuggestBoxBase.OptionSuggestion(java.lang.String displ,
                                                               java.lang.String val,
                                                               java.lang.String replacePre,
                                                               java.lang.String query)
Deprecated. This method is deprecated and will be removed in future releases. Use OptionSuggestion(Option, String, String)

Constructor for regular options with only name and value.

Parameters:
displ - - the name of the option
val - - the value of the option
replacePre - - the current contents of the text box
query - - the query
Method Detail

safeBoldQueryWithinString

protected java.lang.String safeBoldQueryWithinString(java.lang.String display)
Escape the html so that it is safe and add bold tags around the display string where it matches the query string

Parameters:
display - - the display string
Returns:
a safe html version of the display string with bold tags around the query if found, otherwiseg

getDisplayString

public java.lang.String getDisplayString()

getReplacementString

public java.lang.String getReplacementString()

getOption

public MultivalueSuggestBoxBase.Option getOption()
Return the Option bean

Returns:
the Option bean

getValue

public java.lang.String getValue()
Get the value of the option

Returns:
value

getName

public java.lang.String getName()
Get the name of the option. (when not multivalued, this will be the same as getReplacementString)

Returns:
name