|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.dataselectors.calculateditems.html.SimpleCalculatedItemSelectorPanel
public class SimpleCalculatedItemSelectorPanel
The SimpleCalculatedItemSelectorPanel is a TransformationBean that generates the appropriate HTML 4.0 and JavaScript to provide a user interface for managing run-time calculated items.
This panel includes a list of available data items from which simple expressions can be
built to create new calculated items. The SimpleCalculatedItemSelectorPanel supports the
following operations: addition, subtraction, multiplication, and division. An embedded
BaseExpressionEditor
composite component is used to provide the user with the ability
to edit an expression.
The panel also contains a list of calculated items previously created in the same session by the
user. The items in the list can be updated or removed from the list and the underlying data model. An
embedded ListEditor
provides the list editing support.
The SimpleCalculatedItemSelectorPanel is contained by the SimpleCalculatedItemSelector
,
which is invoked from the menu bar on a relational or OLAP table view composite component.
The SimpleCalculatedItemSelectorPanel 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 SimpleCalculatedItemSelectorPanel 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 SimpleCalculatedItemSelectorPanel uses the following JavaScript files:
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 .
BaseExpressionEditor
,
SimpleCalculatedItemSelector
,
ListEditor
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
DEFAULT_TEMPLATE_FILE_NAME
The default file name for the template for this simple calculated item selector panel. |
protected static java.lang.String |
FORMAT_ENTRY_CLASS
|
protected static java.lang.String |
FORMAT_ENTRY_SUFFIX
|
protected static java.lang.String |
FORMAT_NOTE_CLASS
|
protected static java.lang.String |
FORMAT_NOTE_SUFFIX
|
protected static java.lang.String |
FUNCTION_CHOICE_CLASS
The style class key for the available list of this simple calculated item selector panel. |
protected static java.lang.String |
FUNCTION_CHOICE_SUFFIX
The suffix used to build the style class key for the available label of this calculated item selector panel. |
protected static java.lang.String |
FUNCTION_LABEL_CLASS
The style class key for the available label of this simple calculated item selector panel. |
protected static java.lang.String |
FUNCTION_LABEL_SUFFIX
The suffix used to build the style class key for the available label of this calculated item selector panel. |
protected static java.lang.String |
JAVASCRIPT_PROCESS_CLEAR_FORMAT_BUTTON_SELECTION
The name of the JavaScript function which handles the button events for the transfer button. |
protected static java.lang.String |
JAVASCRIPT_PROCESS_FORMAT_ENTRY
The name of the JavaScript function which handles the change events for the name entry field. |
protected static java.lang.String |
JAVASCRIPT_PROCESS_FUNCTION_SELECTION
The name of the JavaScript function which handles the processing on the choice box when an item in the choice list is selected. |
protected static java.lang.String |
JAVASCRIPT_PROCESS_NODE_SELECTION
The name of the JavaScript function which handles the user's selection of an item in the available list. |
protected static java.lang.String |
JAVASCRIPT_PROCESS_SELECT_FORMAT_BUTTON_SELECTION
The name of the JavaScript function which handles the button events for the transfer button. |
protected static java.lang.String |
TREE_LABEL_CLASS
The style class key for the available label of this simple calculated item selector panel. |
protected static java.lang.String |
TREE_LABEL_SUFFIX
The suffix used to build the style class key for the available label of this calculated item selector panel. |
protected static java.lang.String |
TREEVIEW_CLASS
The style class key for the available list of this simple calculated item selector panel. |
protected static java.lang.String |
TREEVIEW_SUFFIX
The suffix used to build the style class key for the available label of this calculated item selector panel. |
Fields inherited from class com.sas.servlet.tbeans.dataselectors.calculateditems.html.BaseCalculatedItemSelectorPanel |
---|
BASE_EXPRESSION_EDITOR_RB_KEY, SELECTOR_CHOICE_CLASS, SELECTOR_LABEL_CLASS, SELECTOR_LIST_CLASS, SELECTOR_RADIO_CLASS, SELECTOR_TEXT_AREA_CLASS, SELECTOR_TEXT_CLASS, SELECTOR_TEXT_ENTRY_CLASS, SIMPLE_SELECTOR_RB_KEY |
Fields inherited from class com.sas.servlet.tbeans.dataselectors.BaseSelectorPanel |
---|
SELECTOR_EXPAND, SELECTOR_EXTERNAL |
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.calculateditems.html.BaseCalculatedItemSelectorPanelKeysInterface |
---|
BASECALCULATEDITEMSELECTORPANEL_DESCRIPTION_ENTRY, BASECALCULATEDITEMSELECTORPANEL_DESCRIPTION_LABEL, BASECALCULATEDITEMSELECTORPANEL_EXPRESSION_EDITOR, BASECALCULATEDITEMSELECTORPANEL_NAME_ENTRY, BASECALCULATEDITEMSELECTORPANEL_NAME_LABEL |
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.calculateditems.html.BaseCalculatedItemSelectorPanelStyleKeysInterface |
---|
BASECALCULATEDITEMSELECTORPANEL_DESCRIPTION_ENTRY_CLASS, BASECALCULATEDITEMSELECTORPANEL_DESCRIPTION_LABEL_CLASS, BASECALCULATEDITEMSELECTORPANEL_NAME_ENTRY_CLASS, BASECALCULATEDITEMSELECTORPANEL_NAME_LABEL_CLASS |
Constructor Summary | |
---|---|
SimpleCalculatedItemSelectorPanel()
Construct a SimpleCalculatedItemSelectorPanel object with no associated model. |
|
SimpleCalculatedItemSelectorPanel(java.lang.String name)
Construct a SimpleCalculatedItemSelectorPanel object with the given name and with no associated model. |
Method Summary | |
---|---|
void |
close()
Base implementation that does nothing. |
void |
contentsChanged(com.sas.collection.ContentsChangedEvent event)
Processes a ContentsChangedEvent received from the SimpleCalculatedItemSelectorCommand. |
void |
createClearFormatButton()
Creates the transfer button for this simple calculated item selector panel. |
void |
createSelectFormatButton()
Creates the transfer button for this simple calculated item selector panel. |
protected TextEntry |
getDescriptionEntryInstance()
|
protected TextEntry |
getNameEntryInstance()
|
javax.swing.tree.TreeModel |
getTreeModel()
|
protected void |
initializeClearFormatButton()
Sets default values for the transfer button component in preparation for each time this simple calculated item selector panel is rendered. |
protected void |
initializeFormatEntry()
|
protected void |
initializeFunctionsList(java.util.Locale locale)
|
protected void |
initializeSelectFormatButton()
Sets default values for the transfer button component in preparation for each time this simple calculated item selector panel is rendered. |
protected ListBox |
newAvailableListBoxInstance()
Creates the component containing the list of available data items, along with the associated label for the available list. |
protected TreeView |
newCumulativeTreeView()
|
protected BaseChoiceBox |
newFunctionComboInstance()
|
protected ListEditor |
newListEditorInstance()
Creates the list editor for this simple calculated item selector panel. |
protected Button |
newTransferButtonInstance()
Creates the transfer button for this simple calculated item selector panel. |
protected void |
populateTreeView()
|
protected void |
setLocaleDependentProperties(java.util.Locale locale)
Sets the locale dependent properties. |
void |
setSelector(AbstractSelectorContainer selector)
Sets the selector which contains this SelectorPanel |
void |
write(java.io.PrintWriter out)
Writes the selector panel. |
void |
writeInvalidItemMessage(java.io.PrintWriter out,
java.util.List invalidItemList)
Writes JavaScript back to the client to display a message listing all the invalid calculated items. |
void |
writeRemoteScriptCommands(java.io.PrintWriter out)
Writes the remote javascript data to the output stream. |
Methods inherited from class com.sas.servlet.tbeans.dataselectors.calculateditems.html.BaseCalculatedItemSelectorPanel |
---|
setSelectorModel |
Methods inherited from class com.sas.servlet.tbeans.dataselectors.html.SelectorPanel |
---|
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 |
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface |
---|
getRequest |
Field Detail |
---|
public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
protected static final java.lang.String JAVASCRIPT_PROCESS_SELECT_FORMAT_BUTTON_SELECTION
protected static final java.lang.String JAVASCRIPT_PROCESS_CLEAR_FORMAT_BUTTON_SELECTION
protected static final java.lang.String JAVASCRIPT_PROCESS_FORMAT_ENTRY
protected static final java.lang.String JAVASCRIPT_PROCESS_NODE_SELECTION
protected static final java.lang.String JAVASCRIPT_PROCESS_FUNCTION_SELECTION
protected static final java.lang.String FORMAT_NOTE_SUFFIX
protected static final java.lang.String FORMAT_ENTRY_SUFFIX
protected static final java.lang.String FUNCTION_LABEL_SUFFIX
protected static final java.lang.String FUNCTION_CHOICE_SUFFIX
protected static final java.lang.String TREE_LABEL_SUFFIX
protected static final java.lang.String TREEVIEW_SUFFIX
protected static final java.lang.String FORMAT_NOTE_CLASS
protected static final java.lang.String FORMAT_ENTRY_CLASS
protected static final java.lang.String FUNCTION_LABEL_CLASS
protected static final java.lang.String FUNCTION_CHOICE_CLASS
protected static final java.lang.String TREE_LABEL_CLASS
protected static final java.lang.String TREEVIEW_CLASS
Constructor Detail |
---|
public SimpleCalculatedItemSelectorPanel()
BaseCalculatedItemSelectorPanel.setSelectorModel(java.lang.Object)
public SimpleCalculatedItemSelectorPanel(java.lang.String name)
name
- the name of the panelBaseCalculatedItemSelectorPanel.setSelectorModel(java.lang.Object)
Method Detail |
---|
protected void setLocaleDependentProperties(java.util.Locale locale)
BaseTransformation
setLocaleDependentProperties
in class BaseCalculatedItemSelectorPanel
protected TextEntry getNameEntryInstance()
protected TextEntry getDescriptionEntryInstance()
protected ListBox newAvailableListBoxInstance()
initializeAvailableList()
protected Button newTransferButtonInstance()
initializeTransferButton()
protected BaseChoiceBox newFunctionComboInstance()
protected TreeView newCumulativeTreeView()
protected ListEditor newListEditorInstance()
initializeListEditor()
public void createSelectFormatButton()
initializeTransferButton()
protected void initializeSelectFormatButton()
#createTransferButton
public void createClearFormatButton()
initializeTransferButton()
protected void initializeClearFormatButton()
#createTransferButton
protected void initializeFunctionsList(java.util.Locale locale)
protected void initializeFormatEntry()
protected void populateTreeView()
public javax.swing.tree.TreeModel getTreeModel()
public void write(java.io.PrintWriter out) throws java.io.IOException
write
in interface TransformationInterface
write
in interface com.sas.util.WriteToPrintWriterInterface
write
in class BaseCalculatedItemSelectorPanel
out
- the output stream
java.io.IOException
- thrown if some type of I/O error occurspublic void writeInvalidItemMessage(java.io.PrintWriter out, java.util.List invalidItemList) throws java.io.IOException
out
- the output streaminvalidItemList
- a list of String objects with the label of each invalid
calculated item to be displayed to the user.
java.io.IOException
- thrown if some type of I/O error occurspublic void contentsChanged(com.sas.collection.ContentsChangedEvent event)
writeInvalidItemMessage(java.io.PrintWriter, java.util.List)
is invoked to return an error message to the client.
contentsChanged
in interface com.sas.collection.ContentsChangedListener
contentsChanged
in class BaseSelectorPanel
event
- the ContentsChanged event generated by the Action Provider for the
SimpleCalculatedItemSelectorCommandwriteInvalidItemMessage(java.io.PrintWriter, java.util.List)
public void writeRemoteScriptCommands(java.io.PrintWriter out) throws java.io.IOException
writeRemoteScriptCommands
in class SelectorPanel
out
- The PrintWriter used to write data back on the response
java.io.IOException
- thrown if some type of I/O error occurspublic void setSelector(AbstractSelectorContainer selector)
BaseSelectorPanel
setSelector
in class BaseSelectorPanel
selector
- The selector which contains this SelectorPanelpublic void close()
SelectorPanel
Subclasses may override this when they want to know a commit or cancel has occured on the selector.
close
in class SelectorPanel
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |