com.sas.actionprovider
Interface URLTemplateViewInterface

All Known Subinterfaces:
BaseNavigationInterface, ColumnNavigationInterface, EditNavigationInterface, RowNavigationInterface
All Known Implementing Classes:
AbstractBaseTableView, ActionProviderMenuBar, com.sas.servlet.tbeans.BaseActionCompositeTransformation2, com.sas.servlet.tbeans.BaseActionTransformation2, BaseNavigationBarElement, BaseOLAPDrillState, BaseOLAPTableView, BaseRemoteFileSearch, BaseRemoteFileSelector, BaseRemoteFileToolBar, BaseTableView, ESRIMapMenu, HttpViewerSupport, InformationServicesSearch, InformationServicesSelector, NavigationBarColumnScrollingElement, NavigationBarEditingElement, NavigationBarRowScrollingElement, NavigationBarScrollingElement, OLAPDrillState, OLAPESRIMapMenu, OLAPMenuBar, OLAPTableView, RelationalMenuBar, RemoteFileSearch, RemoteFileSelector, RemoteFileToolBar, TableView, TableView, TableView

public interface URLTemplateViewInterface

The interface required for all ActionProvider view components that submit actions via a Form.

A basic understanding of the ActionProvider Framework, of which this class is a part, is recommended before attempting to use this class.


The template should define the structure and dynamic values of the javascript function call that feeds the viewer's Form object.

To have a URL that calls a javascript function of the form:

        "function functionName(cmdId,actionProviderName,dynamicAttributes)"
 

You would have a template w/ the following pattern:

        "javascript: void(functionName('%CMDID','%APNAME','%DYNAMICATTRS'));"
 

The resulting URL may look like this:

        "javascript: void(functionName('54','AP1','AP1_foo=0&AP1_bar=13'));"
 

HttpActionProvider.CMDID, HttpActionProvider.APNAME and HttpActionProvider.DYNAMICATTRS are reserved keys that the URL generation routines look for in the template's pattern. CMDID and APNAME will be substituted with the value of the Action's cmdId attribute and the name of the ActionProvider, respectively.

If the URL generation routines find DYNAMICATTRS in the template, then that key will be substituted with a concatenated String consisting of all the name/value pairs of all the Action's remaining visible, instance-based attributes.

The URL generation routines will also attempt to match other pattern keys to all ( even type-based ) Action attributes. If a match occurs, then the method substitutes that attribute's value for that key. If the Action attribute is a visible instance-based attribute, then the template should also include the HttpActionProvider.PARMPREFIX reserved key because the javascript routine will need to prepend the attribute name with this prefix when submitting it on the request. Visible instance-based attributes that have specific matches in the template are not included in the concatenated String of DYNAMICATTRS.

For example, the following template pattern:

        "javascript: void(functionName('%CMDID','%APNAME','%foo', %DYNAMICATTRS'));"
 

would result in the following:

        href="javascript: void(functionName('54','AP1','0','AP1_bar=13'));"
 

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/.

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.0

Method Summary
 com.sas.util.SimpleTemplate getURLTemplate()
          Returns the Viewer's URLTemplate
 void setURLTemplate(com.sas.util.SimpleTemplate URLTemplate)
          Sets the Viewer's URLTemplate.
 

Method Detail

setURLTemplate

void setURLTemplate(com.sas.util.SimpleTemplate URLTemplate)
Sets the Viewer's URLTemplate.

Parameters:
URLTemplate - the Viewer's URLTemplate
See Also:
getURLTemplate()

getURLTemplate

com.sas.util.SimpleTemplate getURLTemplate()
Returns the Viewer's URLTemplate

Returns:
the Viewer's URLTemplate
See Also:
setURLTemplate(SimpleTemplate)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.