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

com.sas.servlet.tbeans.navigationbar.html.NavigationBarEditingElement
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, RenderableInterface, TransformationInterface, com.sas.servlet.tbeans.TransformationInterface2, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

public class NavigationBarEditingElement

The NavigationBarEditingElement is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript to represents the edit actions for a NavigationBar.

NavigationBarRowScrollingElement generates a HTML table which contain the editing actions associated with the NavigationBarEditingElement.

This class requires a model that implements EditNavigationInterface.

The actions must be visible and supported to be displayed by the scrolling element. The isVisible methods are on this class. The isSupported methods are on the model.

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:NavigationBarEditingElement 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

Constructor Summary
NavigationBarEditingElement()
          Creates an instance of the NavigationBarEditingElement with a null model and a default name.
NavigationBarEditingElement(BaseNavigationInterface model)
          Creates an instance of the NavigationBarEditingElement with the given model and the given name.
 
Method Summary
 com.sas.util.SimpleTemplate getURLTemplate()
          Returns the Viewer's URLTemplate.
 boolean isVisible()
          Returns whether or not the NavigationBarEditingElement should be written.
 void setCancelVisible(boolean visible)
          Sets if the cancel action is displayed.
 void setCommitVisible(boolean visible)
          Sets if the commit action is displayed.
 void setDeleteVisible(boolean visible)
          Sets if the delete action is displayed.
 void setInsertVisible(boolean visible)
          Sets if the insert action is displayed.
 void setModel(BaseNavigationInterface model)
          Sets the model for the editing element.
 void setUpdateVisible(boolean visible)
          Sets if the update action is displayed.
protected  void writeContent(java.io.PrintWriter out)
          Formats and writes the contents of the editing element.
 
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, setActionProvider, setActionSupportType, setActionVisible, 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

NavigationBarEditingElement

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


NavigationBarEditingElement

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

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

setModel

public void setModel(BaseNavigationInterface model)
Sets the model for the editing element. The model must implement com.sas.servlet.tbeans.navigationbar.EditNavigationInterface.

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

setInsertVisible

public void setInsertVisible(boolean visible)
Sets if the insert action is displayed.

Parameters:
visible - true if insert action should be displayed

setDeleteVisible

public void setDeleteVisible(boolean visible)
Sets if the delete action is displayed.

Parameters:
visible - true if delete action should be displayed

setCommitVisible

public void setCommitVisible(boolean visible)
Sets if the commit action is displayed.

Parameters:
visible - true if commit action should be displayed

setCancelVisible

public void setCancelVisible(boolean visible)
Sets if the cancel action is displayed.

Parameters:
visible - true if cancel action should be displayed

setUpdateVisible

public void setUpdateVisible(boolean visible)
Sets if the update action is displayed.

Parameters:
visible - true if action button should be displayed

writeContent

protected void writeContent(java.io.PrintWriter out)
                     throws java.io.IOException

Formats and writes the contents of the editing element. It generates an html table that contains the supported and visible actions.

This method calls the cleanUpResources method at the end to reset the request and response back to null.

Specified by:
writeContent in class com.sas.servlet.tbeans.BaseActionTransformation2
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs
See Also:
BaseActionTransformation2.write(PrintWriter)

getURLTemplate

public com.sas.util.SimpleTemplate getURLTemplate()
Returns the Viewer's URLTemplate. If URLTemplate is null then the default value for the URLTemplate is returned.

Specified by:
getURLTemplate in interface URLTemplateViewInterface
Overrides:
getURLTemplate in class com.sas.servlet.tbeans.BaseActionTransformation2
Returns:
the Viewer's URLTemplate
See Also:
BaseActionTransformation2.setURLTemplate(com.sas.util.SimpleTemplate)

isVisible

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

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



Copyright © 2009 SAS Institute Inc. All Rights Reserved.