Class SuggestTextBox

All Implemented Interfaces:
GuiComponent, com.ptc.netmarkets.util.misc.NmFormatable, Serializable

public class SuggestTextBox extends TextBox
A simple GUI component that represents a suggestable textbox. This text box generate suggestions as you type along which can be selected for the text input
Supported API: true
Extendable: false
See Also:
  • Constructor Details

    • SuggestTextBox

      public SuggestTextBox(String id, String service_key)
      Returns a new SuggestTextBox initialized to the values specified in the parameters. The first argument is the id of the element, the second is the key that is used to lookup the service to fire for this particular SuggestTextBox. The id and service_key *must* be non-null, non-blank Strings. Attempting to create this object with invalid data will result in an IllegalArgumentException.
      Supported API: true
      Parameters:
      id - the element id (must be non-null, non-blank)
      service_key - the key the service class is bound to (must be non-null, non-blank)
  • Method Details

    • setMinChars

      public void setMinChars(int min)
      Sets the minChars of this element. Defaults to 3. This tells the suggest widget how many characters must be entered before it calls the server.
      Supported API: true
      Parameters:
      min - an int representing the minChars of this element
    • setMaxResults

      public void setMaxResults(int max)
      Sets the maxResults of this element. This value is passed to the query class to determine the maximum number of results that should be returned. Defaults to 15.
      Supported API: true
      Parameters:
      max - the max number of results to return
    • addParm

      public void addParm(String key, String value)
      Binds a given value to the specified key. If the key is null or an empty string, an IllegalArgumentException is thrown.
      Supported API: true
      Parameters:
      key - - key with which the specified value is to be associated
      value - - value to be associated with the specified key
    • getParm

      public String getParm(String key)
      Returns the value associated with the key, if one exists. May return null.
      Supported API: true
      Parameters:
      key - - the key whose associated value is to be returned
      Returns:
      value - the value associated with the key