|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
For general information on the ActionProvider Framework, including an overview of how
the primary classes of the framework work together, refer to the
package documentation.
com.sas.actionprovider
For examples demonstrating how to use the ActionProvider Framework, including how to override default Actions or add new custom Actions, refer to the Samples Site.
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 .
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 |
---|
void setURLTemplate(com.sas.util.SimpleTemplate URLTemplate)
URLTemplate
- the Viewer's URLTemplategetURLTemplate()
com.sas.util.SimpleTemplate getURLTemplate()
setURLTemplate(SimpleTemplate)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |