com.sas.servlet.tbeans.dataselectors
Class BaseDataSelector

com.sas.servlet.tbeans.dataselectors.BaseDataSelector
All Implemented Interfaces:
HttpActionProviderInterface, com.sas.beans.PropertyChangeSource, DataSelectorInterface, HttpDataSelectorInterface, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable
Direct Known Subclasses:
DataSelector

public abstract class BaseDataSelector
implements com.sas.servlet.tbeans.AJAXControllerURLInterface, HttpDataSelectorInterface

The BaseDataSelector is an abstract TransformationBean™ for creating data selectors to dynamically change Rows, Columns, Totals, etc.

Note that subclasses of this bean actually provide the markup rendering used in/with Servlet and JavaServer Pages technologies. If you need to add support for a markup language that is not explicitly provided with AppDev Studio, then you must extend this class.

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:
3.1
See Also:
Serialized Form

Field Summary
static int EXTERNAL_CHILD_SELECTOR
          A key to identify the child external selector type.
static int SELECTOR_EXPAND
          A key to identify the expand selector type.
static int SELECTOR_EXTERNAL
          A key to identify the external selector type.
 
Constructor Summary
BaseDataSelector()
           
 
Method Summary
 HttpActionProvider getActionProvider()
          Returns the HttpActionProvider object
 java.lang.String getClosingFunctionName()
          Returns the javascript function that gets called when a child selector is closed.
 java.lang.String getCommandId()
          Returns the current command id used for url links.
 java.lang.String getDefaultButtonAction()
          Sets the default button action for the selector
 java.lang.String getReferringURI()
          Returns the url of the document that opened the selector
 java.lang.String getSelectorId()
          Return the unique identified for the selectorId set by the MenuBar
 java.lang.Object getSelectorModel()
          Returns the selector's data model
 int getSelectorType()
          Returns the selector style.
 boolean isButtonsVisible()
          Returns true if the buttons should be written by the write() method
 void setActionProvider(HttpActionProvider provider)
          Sets the HttpActionProvider object
 void setButtonsVisible(boolean value)
          Turns on/off the writing of the selector buttons by the write() methods
 void setClosingFunctionName(java.lang.String closingFunctionName)
          Sets the javascript function that gets called when a child selector is closed.
 void setCommandId(java.lang.String commandid)
          Sets the command id property that is necessary for each link.
 void setDefaultButtonAction(java.lang.String value)
          Set the default button action of the selector
 void setReferringURI(java.lang.String uri)
          Sets the url of the document that opened the selector
 void setRequest(javax.servlet.http.HttpServletRequest request)
          Sets the request object.
 void setSelectorId(java.lang.String value)
          Set the unique identified for the selector if the selector is associated with a MenuBar.
 void setSelectorModel(java.lang.Object selectormodel)
          Sets the selector's data model
 void setSelectorType(int value)
          Set the selector style.
 void write(java.io.PrintWriter out)
          Abstract method for writing out the selector.
 
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, 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, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.dataselectors.DataSelectorInterface
isVisible, setVisible
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface
getRequest
 

Field Detail

SELECTOR_EXPAND

public static final int SELECTOR_EXPAND
A key to identify the expand selector type. Expand selectors are not supported in this release.

See Also:
Constant Field Values

SELECTOR_EXTERNAL

public static final int SELECTOR_EXTERNAL
A key to identify the external selector type. External selectors are displayed in a new window.

See Also:
Constant Field Values

EXTERNAL_CHILD_SELECTOR

public static final int EXTERNAL_CHILD_SELECTOR
A key to identify the child external selector type. Child external selectors are displayed in a new window from an existing selector.

See Also:
Constant Field Values
Constructor Detail

BaseDataSelector

public BaseDataSelector()
Method Detail

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Abstract method for writing out the selector. Must be implemented by subclasses.

Specified by:
write in interface HttpDataSelectorInterface
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

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Sets the request object. There may be cases where a Transformation Bean needs to set additional information on the request. If this is true the request must be set before calling the 'write' method. See the documentation for the Transaction Bean if the request is required.

Specified by:
setRequest in interface HttpActionProviderInterface
Specified by:
setRequest in interface TransformationInterface
Overrides:
setRequest in class BaseCompositeTransformation
Parameters:
request - The request object
See Also:
HttpActionProviderInterface.getRequest()

setButtonsVisible

public void setButtonsVisible(boolean value)
Turns on/off the writing of the selector buttons by the write() methods

Parameters:
value - visible true if buttons should be written by the write() method

isButtonsVisible

public boolean isButtonsVisible()
Returns true if the buttons should be written by the write() method

Returns:
true if the writting of the buttons are visible

setSelectorModel

public void setSelectorModel(java.lang.Object selectormodel)
Sets the selector's data model

Specified by:
setSelectorModel in interface DataSelectorInterface
Parameters:
selectormodel - The selector's data model

getSelectorModel

public java.lang.Object getSelectorModel()
Returns the selector's data model

Specified by:
getSelectorModel in interface DataSelectorInterface
Returns:
The selector's data model

getSelectorType

public int getSelectorType()
Returns the selector style. If the selector is associated with MDMenuBar, the button (OK/Cancel) actions are set based on the selector style.

Returns:
The selector style

setSelectorType

public void setSelectorType(int value)
Set the selector style. If the selector is associated with MDMenuBar, the button (OK/Cancel) actions are set based on the selector style.

Parameters:
value - The selector style value

getDefaultButtonAction

public java.lang.String getDefaultButtonAction()
Sets the default button action for the selector

Returns:
The defaultbutton action

setDefaultButtonAction

public void setDefaultButtonAction(java.lang.String value)
Set the default button action of the selector

Parameters:
value - The default button action

setSelectorId

public void setSelectorId(java.lang.String value)
Set the unique identified for the selector if the selector is associated with a MenuBar. This method is set by the MenuBar.

Parameters:
value - The unique identifier of the selector

getSelectorId

public java.lang.String getSelectorId()
Return the unique identified for the selectorId set by the MenuBar

Returns:
The unique identifier of the selector

getActionProvider

public HttpActionProvider getActionProvider()
Returns the HttpActionProvider object

Specified by:
getActionProvider in interface HttpActionProviderInterface
Overrides:
getActionProvider in class BaseCompositeTransformation
Returns:
HttpActionProvider object
See Also:
HttpActionProviderInterface.setActionProvider(com.sas.actionprovider.HttpActionProvider)

setActionProvider

public void setActionProvider(HttpActionProvider provider)
Sets the HttpActionProvider object

Specified by:
setActionProvider in interface HttpActionProviderInterface
Overrides:
setActionProvider in class BaseCompositeTransformation
Parameters:
HttpActionProvider - object
See Also:
HttpActionProviderInterface.getActionProvider()

setCommandId

public void setCommandId(java.lang.String commandid)
Sets the command id property that is necessary for each link.

Parameters:
commandid - The commandid to add to url links

getCommandId

public java.lang.String getCommandId()
Returns the current command id used for url links.

Returns:
the command id

getReferringURI

public java.lang.String getReferringURI()
Returns the url of the document that opened the selector

Specified by:
getReferringURI in interface HttpDataSelectorInterface

setReferringURI

public void setReferringURI(java.lang.String uri)
Sets the url of the document that opened the selector


getClosingFunctionName

public java.lang.String getClosingFunctionName()
Returns the javascript function that gets called when a child selector is closed. This is only used when the selector type is EXTERNAL_CHILD_SELECTOR and the javascript function gets called on parent selector.

Returns:
the javascript function name

setClosingFunctionName

public void setClosingFunctionName(java.lang.String closingFunctionName)
Sets the javascript function that gets called when a child selector is closed. This is only used when the selector type is EXTERNAL_CHILD_SELECTOR and the javascript function gets called on parent selector.

Parameters:
closingFunctionName - the javascript function name



Copyright © 2009 SAS Institute Inc. All Rights Reserved.