com.sas.servlet.tbeans.navigationbar.html
Class NavigationBarRowScrollingElement

com.sas.servlet.tbeans.navigationbar.html.NavigationBarRowScrollingElement
All Implemented Interfaces:
ActionProviderViewInterface, HttpActionProviderInterface, HttpActionProviderViewInterface, com.sas.actionprovider.refresh.PartialRefreshActionsInterface, URLTemplateViewInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, HttpConstants, NavigationBarScrollingElementStyleKeysInterface, RenderableInterface, TransformationInterface, com.sas.servlet.tbeans.TransformationInterface2, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable, javax.swing.SwingConstants

public class NavigationBarRowScrollingElement

The NavigationBarRowScrollingElement is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript to represents the row scrolling actions for a NavigationBar.

NavigationBarRowScrollingElement generates a HTML table which contains the row scrolling actions and the message associated with the NavigationBarRowScrollingElement.

This class requires a model that implements RowNavigationInterface.

The NavigationBarRowScrollingElement 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 NavigationBarRowScrollingElement 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 NavigationBarRowScrollingElement uses the following JavaScript files:

sas_navigationbar.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:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:NavigationBarRowScrollingElement custom tag.

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 .

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sas.servlet.tbeans.HttpConstants
ALL, BASELINE, CHAR, COL, COLGROUP, JUSTIFY, MULTIPLE, NONE, ROW, ROWGROUP, SINGLE
 
Fields inherited from interface com.sas.servlet.tbeans.navigationbar.html.NavigationBarScrollingElementStyleKeysInterface
NAVIGATIONBAR_INPUT_STYLE, NAVIGATIONBAR_MESSAGE_STYLE
 
Constructor Summary
NavigationBarRowScrollingElement()
          Creates an instance of the NavigationBarRowScrollingElement with a null model and a default name.
NavigationBarRowScrollingElement(BaseNavigationInterface model)
          Creates an instance of the NavigationBarRowScrollingElement with the given model and the given name.
 
Method Summary
 com.sas.util.SimpleTemplate getDefaultMessageTemplate()
          Returns the default messageTemplate used to generate the scrolling element's message.
 java.lang.String getMessage()
          Returns the scrolling message generated by using the SimpleTemplate returned from the getMessageTemplate() method.
 boolean isVisible()
          Returns whether or not the NavigationBarRowScrollingElement should be written.
 void setActionProvider(HttpActionProvider provider)
          Sets the ActionProvider object for the row scrolling elements.
 void setActionVisible(java.lang.String actionType, java.lang.String areaType, boolean visible)
          Sets the visible status of the specified actionType for the specified area.
 void setFirstVisible(boolean visible)
          Sets if the first action is visible.
 void setGotoFieldVisible(boolean visible)
          Sets if the goto action should be displayed.
 void setLastVisible(boolean visible)
          Sets if the last action is visible.
 void setModel(BaseNavigationInterface navigationBarModel)
          Sets the model for the row scrolling element.
 void setNextVisible(boolean visible)
          Sets if the next action is visible.
 void setPageBackwardVisible(boolean visible)
          Sets if the pageBackward action is visible.
 void setPageForwardVisible(boolean visible)
          Sets if the pageForward action is visible.
 void setPreviousVisible(boolean visible)
          Sets if the previous action is visible.
 void writeBackwardScrollers(java.io.PrintWriter out)
          Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.
 void writeForwardScrollers(java.io.PrintWriter out)
          Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.
 void writeGotoField(java.io.PrintWriter out)
          Formats and writes the contents of the row scrolling navigation element's goto field.
 void writeMessage(java.io.PrintWriter out)
          Formats and writes the contents of the row scrolling navigation element's message.
 
Methods inherited from class com.sas.servlet.tbeans.navigationbar.html.NavigationBarScrollingElement
getGotoFieldLabel, getMessageOrientation, getMessageTemplate, getStyleMap, getURLTemplate, isGotoFieldInMessage, setGotoFieldInMessage, setGotoFieldLabel, setImageVisible, setMessageOrientation, setMessageTemplate, writeBackwardScrollers, writeBackwardScrollers, writeContent, writeForwardScrollers, writeForwardScrollers, writeGotoField, writeGotoField, writeMessage, writeMessage
 
Methods inherited from class com.sas.servlet.tbeans.navigationbar.BaseNavigationBarElement
getModel
 
Methods inherited from class com.sas.servlet.tbeans.BaseActionTransformation
dispose, getActionProvider, getActionSupportType, getUniqueId, isActionVisible, listActionTypes, listAreaTypes, setActionSupportType, setUniqueId
 
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, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocale, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.servlet.tbeans.TransformationInterface
getCustomAttributes, getDescription, getId, getLocale, getName, getRequest, getResponse, getTagEpilog, getTagProlog, setCustomAttributes, setDescription, setId, setLocale, setName, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, write, write, write
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface
getRequest, setRequest
 

Constructor Detail

NavigationBarRowScrollingElement

public NavigationBarRowScrollingElement()
Creates an instance of the NavigationBarRowScrollingElement with a null model and a default name.


NavigationBarRowScrollingElement

public NavigationBarRowScrollingElement(BaseNavigationInterface model)
Creates an instance of the NavigationBarRowScrollingElement with the given model and the given name.

Parameters:
model - the model for the row scrolling element
name - the name assigned to the row scrolling element
Method Detail

setModel

public void setModel(BaseNavigationInterface navigationBarModel)
Sets the model for the row scrolling element. The model must implement com.sas.servlet.tbeans.navigationbar.RowNavigationInterface.

Overrides:
setModel in class BaseNavigationBarElement
Parameters:
model - the model for the row scrolling element
Throws:
java.lang.IllegalArgumentException - if the model is not an instanceof com.sas.servlet.tbeans.navigationbar.RowNavigationInterface

getMessage

public java.lang.String getMessage()

Returns the scrolling message generated by using the SimpleTemplate returned from the getMessageTemplate() method.

The getMessage() method is responsible for setting up the value dictionary on the SimpleTemplate. The dictionary contains the keys STARTROW, ENDROW and ROWCOUNT. After setting the value dictionary, it should return the format string from the SimpleTemplate.

Specified by:
getMessage in class NavigationBarScrollingElement
Returns:
the message string for scrolling
See Also:
NavigationBarScrollingElement.getMessageTemplate(), NavigationBarScrollingElement.setMessageTemplate(com.sas.util.SimpleTemplate), SimpleTemplate

getDefaultMessageTemplate

public com.sas.util.SimpleTemplate getDefaultMessageTemplate()
Returns the default messageTemplate used to generate the scrolling element's message.

Specified by:
getDefaultMessageTemplate in class NavigationBarScrollingElement
Returns:
the default messageTemplate used to generate the scrolling element's message
See Also:
SimpleTemplate, NavigationBarScrollingElement.getMessageTemplate(), SimpleTemplate, getMessage()

writeMessage

public void writeMessage(java.io.PrintWriter out)
                  throws java.io.IOException
Formats and writes the contents of the row scrolling navigation element's message.

Specified by:
writeMessage in class NavigationBarScrollingElement
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeBackwardScrollers

public void writeBackwardScrollers(java.io.PrintWriter out)
                            throws java.io.IOException
Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.

Specified by:
writeBackwardScrollers in class NavigationBarScrollingElement
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeForwardScrollers

public void writeForwardScrollers(java.io.PrintWriter out)
                           throws java.io.IOException
Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.

Specified by:
writeForwardScrollers in class NavigationBarScrollingElement
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeGotoField

public void writeGotoField(java.io.PrintWriter out)
                    throws java.io.IOException
Formats and writes the contents of the row scrolling navigation element's goto field.

Specified by:
writeGotoField in class NavigationBarScrollingElement
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

setGotoFieldVisible

public void setGotoFieldVisible(boolean visible)
Sets if the goto action should be displayed. Sets the visibility for the HttpNavigationBarSupport.GOTO_ROW_ACTION and HttpNavigationBarSupport.GOTO_ROW_EDIT_ENABLED_ACTION action types.

Specified by:
setGotoFieldVisible in class NavigationBarScrollingElement
Parameters:
visible - true if goto action should be displayed

setFirstVisible

public void setFirstVisible(boolean visible)
Sets if the first action is visible. Sets the visibility for the HttpNavigationBarSupport.FIRST_ROW_ACTION and HttpNavigationBarSupport.FIRST_ROW_EDIT_ENABLED_ACTION action types.

Specified by:
setFirstVisible in class NavigationBarScrollingElement
Parameters:
visible - true if the first action should be visible

setPageBackwardVisible

public void setPageBackwardVisible(boolean visible)
Sets if the pageBackward action is visible. Sets the visibility for the HttpNavigationBarSupport.PAGE_BACKWARD_ROWS_ACTION and HttpNavigationBarSupport.PAGE_BACKWARD_ROWS_EDIT_ENABLED_ACTION action types.

Specified by:
setPageBackwardVisible in class NavigationBarScrollingElement
Parameters:
visible - true if the pageBackward action should be visible

setPreviousVisible

public void setPreviousVisible(boolean visible)
Sets if the previous action is visible. Sets the visibility for the HttpNavigationBarSupport.PREVIOUS_ROW_ACTION and HttpNavigationBarSupport.PREVIOUS_ROW_EDIT_ENABLED_ACTION action types.

Specified by:
setPreviousVisible in class NavigationBarScrollingElement
Parameters:
visible - true if the previous action should be visible

setNextVisible

public void setNextVisible(boolean visible)
Sets if the next action is visible. Sets the visibility for the HttpNavigationBarSupport.NEXT_ROW_ACTION and HttpNavigationBarSupport.NEXT_ROW_EDIT_ENABLED_ACTION action types.

Specified by:
setNextVisible in class NavigationBarScrollingElement
Parameters:
visible - true if the next action should be visible

setPageForwardVisible

public void setPageForwardVisible(boolean visible)
Sets if the pageForward action is visible. Sets the visibility for the HttpNavigationBarSupport.PAGE_FORWARD_ROWS_ACTION and HttpNavigationBarSupport.PAGE_FORWARD_ROWS_EDIT_ENABLED_ACTION action types.

Specified by:
setPageForwardVisible in class NavigationBarScrollingElement
Parameters:
visible - true if the pageForward action should be visible

setLastVisible

public void setLastVisible(boolean visible)
Sets if the last action is visible. Sets the visibility for the HttpNavigationBarSupport.LAST_ROW_ACTION and HttpNavigationBarSupport.LAST_ROW_EDIT_ENABLED_ACTION action types.

Specified by:
setLastVisible in class NavigationBarScrollingElement
Parameters:
visible - true if the last action should be visible

setActionProvider

public void setActionProvider(HttpActionProvider provider)
Sets the ActionProvider object for the row scrolling elements.

Specified by:
setActionProvider in interface HttpActionProviderInterface
Overrides:
setActionProvider in class BaseActionTransformation
Parameters:
provider - the ActionProvider object for the row scrolling elements
See Also:
HttpActionProviderInterface.getActionProvider()

isVisible

public boolean isVisible()
Returns whether or not the NavigationBarRowScrollingElement should be written.

Specified by:
isVisible in interface TransformationInterface
Overrides:
isVisible in class BaseTransformation
Returns:
true if the NavigationBarRowScrollingElement should be visible, false otherwise

setActionVisible

public void setActionVisible(java.lang.String actionType,
                             java.lang.String areaType,
                             boolean visible)
Sets the visible status of the specified actionType for the specified area. The actionType must be non-null. The actionType and areaType must be valid in the support class that is associated with this classes current actionSupportType attribute. If the actionType has a matching EDIT_ENABLED actionType, then the visibility will be set for both actionTypes. For example, if you set the visibility on HttpNavigationBarSupport.LAST_ROW_ACTION then the visibility will also be set on HttpNavigationBarSupport.LAST_ROW_EDIT_ENABLED_ACTION. But if you set the visibility on HttpNavigationBarSupport.LAST_ROW_EDIT_ENABLED_ACTION, then the visibility will not be set on HttpNavigationBarSupport.LAST_ROW_ACTION.

Specified by:
setActionVisible in interface ActionProviderViewInterface
Overrides:
setActionVisible in class BaseActionTransformation
Parameters:
actionType - The key that identifies the type of action.
area - The area affected by the change in visibility fort the actionType. If null, then the method call applies to all the known areaTypes.
visible - The boolean indicating whether the actionType should be hidden or unhidden.
Throws:
java.lang.IllegalArgumentException - if non-null Area specified with a null areaType attribute.
java.lang.IllegalStateException - if actionSupportType not set.
See Also:
ActionProviderViewInterface.isActionVisible(java.lang.String, java.lang.String), ActionProviderSupportTypes



Copyright © 2009 SAS Institute Inc. All Rights Reserved.