org.wicketstuff.select2
Class StringTextChoiceProvider

java.lang.Object
  extended by org.wicketstuff.select2.ChoiceProvider<T>
      extended by org.wicketstuff.select2.TextChoiceProvider<String>
          extended by org.wicketstuff.select2.StringTextChoiceProvider
All Implemented Interfaces:
Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable

public abstract class StringTextChoiceProvider
extends TextChoiceProvider<String>

A simple TextChoiceProvider for Strings.

Author:
Tom Götz (tom@decoded.de)
See Also:
Serialized Form

Constructor Summary
StringTextChoiceProvider()
           
 
Method Summary
protected  String getDisplayText(String choice)
           
protected  Object getId(String choice)
           
 Collection<String> toChoices(Collection<String> ids)
          Converts a list of choice ids back into application's choice objects.
 
Methods inherited from class org.wicketstuff.select2.TextChoiceProvider
toJson
 
Methods inherited from class org.wicketstuff.select2.ChoiceProvider
detach, query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTextChoiceProvider

public StringTextChoiceProvider()
Method Detail

getDisplayText

protected String getDisplayText(String choice)
Specified by:
getDisplayText in class TextChoiceProvider<String>

getId

protected Object getId(String choice)
Specified by:
getId in class TextChoiceProvider<String>

toChoices

public Collection<String> toChoices(Collection<String> ids)
Description copied from class: ChoiceProvider
Converts a list of choice ids back into application's choice objects. When the choice provider is attached to a single-select component the ids collection will contain exactly one id, and a collection containing exactly one choice should be returned.

Specified by:
toChoices in class ChoiceProvider<String>
Parameters:
ids - collection containing choice ids
Returns:
collection containing application choice objects


Copyright © 2018. All rights reserved.