JSWOAction

 

Synopsis

JSWOAction { htmlString=aString; action=aMethod | pageName=aString; [disabled=YES|NO;] ... };
 
 

Description

JSWOAction is a general application of the WebObjects action links. The following example represents how this dynamic element dynamize a static JavaScript command which opens a new page:

<a href="javascript:void(open('myPage'))">Click Here</a>

Now it can be replaced to a dynamic one:

HTML Template

<webobject name="openNewPage"></webobject>

WOD File

openNewPage: JSWOAction {
    htmlString = "<a href=\"javascript:void(open('%@'))\">Click Here</a>";
    pageName = "myPage";
}
 

 

htmlString
String represents the HTML template to insert. It must contain %@ element to insert the WebObjects url.
action
Action method to invoke when this element is activated. The method must return a WOElement.
pageName
Name of WebObjects page to display when the link is clicked.
disabled
If evaluates to YES, the content string won't be displayed.