com.sas.servlet.tbeans.dataselectors.find.html
Class FindSelectorPanel

com.sas.servlet.tbeans.dataselectors.find.html.FindSelectorPanel
All Implemented Interfaces:
HttpActionProviderInterface, com.sas.beans.PropertyChangeSource, com.sas.collection.ContentsChangedListener, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, FindSelectorPanelKeysInterface, FindSelectorPanelStyleKeysInterface, FormViewInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable, java.util.EventListener

public class FindSelectorPanel
implements com.sas.collection.ContentsChangedListener, FindSelectorPanelStyleKeysInterface, FindSelectorPanelKeysInterface

The FindSelectorPanel is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript to provide a user interface for dynamically finding member and cell values in a table viewer.

The FindSelectorPanel is contained by the FindSelector, which is invoked from the menubar on an OLAP table view composite component.

The FindSelectorPanel is one of several TransformationBeans™ that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean™, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans™ as well as the TransformationBeans™ Style Sheet Reference.

The FindSelectorPanel is one of several TransformationBeans™ that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The FindSelectorPanel uses the following JavaScript files:

sas_findselectorpanel.js

Note that the toString() method on this class calls the write method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging

For More Information:

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

Since:
9.1.2
See Also:
FindSelector, Serialized Form

Field Summary
protected  Form _remoteScriptForm
          The form object used to submit remote javascript requests
protected  java.lang.String _remoteScriptURL
          The value for the action parameter on the remote scripting form
static java.lang.String ALPHABETICALLY_KEY
          Key used when the alphabetical view is selected for the available tree
protected  java.lang.String backwardLabel
           
static java.lang.String BY_ITEM_TYPE_KEY
          Key used when the by item type view is selected for the available tree
protected  java.lang.String cellValuesByColumnLabel
           
protected  java.lang.String cellValuesByRowLabel
           
protected  ChoiceBox conditionChoiceBox
          The choicebox used to qualify the find value
protected  Label conditionLabel
          The label displayed with the condition choicebox
protected  java.lang.String contains
           
static java.lang.String DEFAULT_REMOTE_SCRIPT_URL
          The default url for remote scripting requests
static java.lang.String DEFAULT_TEMPLATE_FILE_NAME
          The default template file name for the template that provides the layout for this panel
protected  Label directionLabel
          The label displayed with the direction radio buttons
protected  Radio directionRadio
          The radio button used to select the find direction
protected  java.lang.String equalTo
           
protected  Label findLabel
          The label displayed with the find radio buttons
protected  Radio findRadio
          The radio button used to select the type of find to perform
protected  java.lang.String forwardLabel
           
protected  java.lang.String greaterThan
           
protected  java.lang.String greaterThanOrEqualTo
           
protected  java.lang.String lessThan
           
protected  java.lang.String lessThanOrEqualTo
           
protected  java.lang.String membersOnColumnsLabel
           
protected  java.lang.String membersOnRowsLabel
           
static java.lang.String RB_KEY
          Key used to look up resources in the resource bundle
protected  java.lang.String startsWith
           
protected  TextEntry valueArea
          The non-editable text entry area used to display item descriptions.
protected  Label valueLabel
          The label displayed with the find value text entry
 
Fields inherited from class com.sas.servlet.tbeans.dataselectors.BaseSelectorPanel
imageLocation, SELECTOR_EXPAND, SELECTOR_EXTERNAL
 
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.find.html.FindSelectorPanelStyleKeysInterface
FIND_CONDITION_CHOICEBOX, FIND_CONDITION_LABEL, FIND_DIRECTION_LABEL, FIND_DIRECTION_RADIO, FIND_FIND_LABEL, FIND_FIND_RADIO, FIND_PANEL_CONTAINER, FIND_VALUE_LABEL, FIND_VALUE_TEXTENTRY
 
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.find.html.FindSelectorPanelKeysInterface
CONDITION_CHOICEBOX, CONDITION_LABEL, DIRECTION_LABEL, DIRECTION_RADIO, FIND_LABEL, FIND_RADIO, VALUE_LABEL, VALUE_TEXTENTRY
 
Constructor Summary
FindSelectorPanel()
          Construct a FindSelectorPanel object with no associated model.
FindSelectorPanel(java.lang.String name)
          Construct a FindSelectorPanel object with no associated model and the given name.
 
Method Summary
 void contentsChanged(com.sas.collection.ContentsChangedEvent event)
          Reacts to ContentsChangedEvents.
protected  java.lang.String getErrorMessage()
          Returns the value of the error message that needs to be displayed to the user.
protected  Form getFindForm()
          Returns the form object used by the panel to submit the panel data.
 java.lang.String getRemoteScriptURL()
          Gets the URL for the remote scripting controller.
protected  void setConditionChoiceBoxProperties()
          Sets write-time properties for the find condition choicebox, including the combobox model for the choicebox, the OnChange property, and the selectedIndex.
protected  void setDirectionRadioProperties()
          Sets the write-time properties for the Direction radio buttons, including the list model for the radio buttons, the onClick property, and the initial setting.
protected  void setErrorMessage(java.lang.String value)
          Sets the current value of the error message to be displayed to the user.
protected  void setFindForm(Form form)
          Sets the form object used by the panel to submit the panel data
protected  void setFindRadioProperties()
          Sets the write-time properties for the Find radio buttons, including the list model for the radio buttons, the onClick property, and the initial setting.
protected  void setLocaleDependentProperties(java.util.Locale locale)
          Sets all properties of the panel components that rely on the locale of the user
 void setRemoteScriptURL(java.lang.String value)
          Sets the URL to the remote scripting controller.
 void write(java.io.PrintWriter out)
          Writes the selector panel.
 void writeRemoteScriptCommands(java.io.PrintWriter out)
          Writes the remote javascript data to the output stream.
 void writeRemoteScriptForm(java.io.PrintWriter out)
          Writes the html form used for submitting remote javascript requests.
 
Methods inherited from class com.sas.servlet.tbeans.dataselectors.html.SelectorPanel
close, getAdditionalParameters, getDefaultFormObject, getFormObject, getIframeName, isFormEnabled, setAdditionalParameter, setAdditionalParameters, setFormEnabled, setFormObject, setIframeName, writeRemoteScriptFrame, writeSelectorPanelFooter, writeSelectorPanelHeader
 
Methods inherited from class com.sas.servlet.tbeans.dataselectors.BaseSelectorPanel
getActionProvider, getCommandId, getImageLocation, getSelector, getSelectorModel, setActionProvider, setCommandId, setImageLocation, setSelector, setSelectorModel
 
Methods inherited from class com.sas.servlet.tbeans.BaseCompositeTransformation
applyTemplate, applyTemplate, getComponent, getComponents, getDefaultTemplate, getStyleInfo, getStyleMap, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, getVisibleComponents, isFlushEnabled, propertyChange, removeComponent, setCleanUpResourcesOn, setComponent, setFlushEnabled, setId, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation, writeTemplate
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCustomAttributes, setInputTransform, setName, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface
getRequest
 

Field Detail

DEFAULT_TEMPLATE_FILE_NAME

public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
The default template file name for the template that provides the layout for this panel

See Also:
Constant Field Values

_remoteScriptForm

protected Form _remoteScriptForm
The form object used to submit remote javascript requests


_remoteScriptURL

protected java.lang.String _remoteScriptURL
The value for the action parameter on the remote scripting form


findLabel

protected Label findLabel
The label displayed with the find radio buttons


findRadio

protected Radio findRadio
The radio button used to select the type of find to perform


conditionLabel

protected Label conditionLabel
The label displayed with the condition choicebox


conditionChoiceBox

protected ChoiceBox conditionChoiceBox
The choicebox used to qualify the find value


valueLabel

protected Label valueLabel
The label displayed with the find value text entry


valueArea

protected TextEntry valueArea
The non-editable text entry area used to display item descriptions.


directionLabel

protected Label directionLabel
The label displayed with the direction radio buttons


directionRadio

protected Radio directionRadio
The radio button used to select the find direction


membersOnRowsLabel

protected java.lang.String membersOnRowsLabel

membersOnColumnsLabel

protected java.lang.String membersOnColumnsLabel

cellValuesByRowLabel

protected java.lang.String cellValuesByRowLabel

cellValuesByColumnLabel

protected java.lang.String cellValuesByColumnLabel

equalTo

protected java.lang.String equalTo

lessThan

protected java.lang.String lessThan

greaterThan

protected java.lang.String greaterThan

lessThanOrEqualTo

protected java.lang.String lessThanOrEqualTo

greaterThanOrEqualTo

protected java.lang.String greaterThanOrEqualTo

startsWith

protected java.lang.String startsWith

contains

protected java.lang.String contains

forwardLabel

protected java.lang.String forwardLabel

backwardLabel

protected java.lang.String backwardLabel

RB_KEY

public static final java.lang.String RB_KEY
Key used to look up resources in the resource bundle

See Also:
Constant Field Values

BY_ITEM_TYPE_KEY

public static final java.lang.String BY_ITEM_TYPE_KEY
Key used when the by item type view is selected for the available tree

See Also:
Constant Field Values

ALPHABETICALLY_KEY

public static final java.lang.String ALPHABETICALLY_KEY
Key used when the alphabetical view is selected for the available tree

See Also:
Constant Field Values

DEFAULT_REMOTE_SCRIPT_URL

public static final java.lang.String DEFAULT_REMOTE_SCRIPT_URL
The default url for remote scripting requests

See Also:
Constant Field Values
Constructor Detail

FindSelectorPanel

public FindSelectorPanel()
Construct a FindSelectorPanel object with no associated model. This constructor simply builds the visuals which comprise the selector panel. Users of this constructor will need to call setSelectorModel() to set the model for this selector panel.

See Also:
BaseSelectorPanel.setSelectorModel(java.lang.Object)

FindSelectorPanel

public FindSelectorPanel(java.lang.String name)
Construct a FindSelectorPanel object with no associated model and the given name. This constructor simply builds the visuals which comprise the selector panel. Users of this constructor will need to call setSelectorModel() to set the model for this selector panel.

Parameters:
name - the name of the FindSelectorPanel
See Also:
BaseSelectorPanel.setSelectorModel(java.lang.Object)
Method Detail

setLocaleDependentProperties

protected void setLocaleDependentProperties(java.util.Locale locale)
Sets all properties of the panel components that rely on the locale of the user

Overrides:
setLocaleDependentProperties in class BaseTransformation
Parameters:
locale - - the user locale

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Writes the selector panel.

Specified by:
write in interface TransformationInterface
Specified by:
write in interface com.sas.util.WriteToPrintWriterInterface
Overrides:
write in class BaseCompositeTransformation
Parameters:
out - the output stream
Throws:
java.io.IOException - thrown if some type of I/O error occurs

setConditionChoiceBoxProperties

protected void setConditionChoiceBoxProperties()
                                        throws java.io.IOException
Sets write-time properties for the find condition choicebox, including the combobox model for the choicebox, the OnChange property, and the selectedIndex.

Throws:
java.io.IOException - thrown if some type of I/O error occurs

setFindRadioProperties

protected void setFindRadioProperties()
                               throws java.io.IOException
Sets the write-time properties for the Find radio buttons, including the list model for the radio buttons, the onClick property, and the initial setting.

Throws:
java.io.IOException - thrown if some type of I/O error occurs

setDirectionRadioProperties

protected void setDirectionRadioProperties()
                                    throws java.io.IOException
Sets the write-time properties for the Direction radio buttons, including the list model for the radio buttons, the onClick property, and the initial setting.

Throws:
java.io.IOException - thrown if some type of I/O error occurs

writeRemoteScriptCommands

public void writeRemoteScriptCommands(java.io.PrintWriter out)
                               throws java.io.IOException
Writes the remote javascript data to the output stream.

Overrides:
writeRemoteScriptCommands in class SelectorPanel
Parameters:
out - The PrintWriter used to write data back on the response
Throws:
java.io.IOException - thrown if some type of I/O error occurs

writeRemoteScriptForm

public void writeRemoteScriptForm(java.io.PrintWriter out)
                           throws java.io.IOException
Writes the html form used for submitting remote javascript requests. The main selector form often contains more information than is necessary for smaller remote scripting requests.

Parameters:
out - The PrintWriter used to write data back on the response
Throws:
java.io.IOException - thrown if some type of I/O error occurs

getErrorMessage

protected java.lang.String getErrorMessage()
Returns the value of the error message that needs to be displayed to the user.

Returns:
the error message

setErrorMessage

protected void setErrorMessage(java.lang.String value)
Sets the current value of the error message to be displayed to the user.

Parameters:
value - The error message

getFindForm

protected Form getFindForm()
Returns the form object used by the panel to submit the panel data.

Returns:
the panel form object

setFindForm

protected void setFindForm(Form form)
Sets the form object used by the panel to submit the panel data

Parameters:
form - the panel form object

setRemoteScriptURL

public void setRemoteScriptURL(java.lang.String value)
Sets the URL to the remote scripting controller. The default value is the SelectorServlet.

Parameters:
value - The new URL to use

getRemoteScriptURL

public java.lang.String getRemoteScriptURL()
Gets the URL for the remote scripting controller. If this value is null, return the default value.

Returns:
the URL for the remote scripting controller.

contentsChanged

public void contentsChanged(com.sas.collection.ContentsChangedEvent event)
Reacts to ContentsChangedEvents. The FindSelectorCommand causes ContentsChangedEvents to be fired and interpreted by this method. The actual interpretation of the command occurs here.

Specified by:
contentsChanged in interface com.sas.collection.ContentsChangedListener
Overrides:
contentsChanged in class BaseSelectorPanel
Parameters:
event - the event



Copyright © 2009 SAS Institute Inc. All Rights Reserved.