Using a MiniButton Control to Call a Custom Method
This topic describes how to use a minibutton control to call a custom method.
To use a minibutton control to call a custom method
-
Open Siebel Tools.
-
Expose the Applet User Prop object type:
-
Choose the View menu, and then the Options menu item.
-
In the Development Tools Options dialog box, click the Object Explorer tab.
-
Expand the Applet tree, and then make sure the Applet User Prop object type contains a check mark.
-
Click Ok.
-
-
In the Object Explorer, click Applet.
-
In the Applets list, locate the applet you must modify.
-
In the Object Explorer, expand the Applet tree, and then click Control.
-
In the Controls list, add a new control using values from the following table.
Property Value Name
ButtonTest
Caption
Test
HTML Type
MiniButton
Method Invoked
MyTest
-
In the Applets list, right-click the applet and then choose the Edit Web Layout menu item.
-
In the Controls/Columns window, modify the template mode to Edit List.
-
Move the ButtonTest control from the Controls/Columns window to an appropriate location on the canvas of the Web Layout Editor.
-
Choose the File menu, and then the Save menu item.
-
Close the Web Layout Editor.
-
Enable the button:
-
In the Object Explorer, click Applet User Prop.
-
In the Applet User Props list, create a new user property using values from the following table.
Property Value Name
CanInvokeMethod: MyTest
For more information about the CanInvokeMethod applet user property, see Siebel Developer's Reference.
Value
TRUE
As an alternative, you can use script to enable the button. For more information, see Using Script to Enable a Mini Button.
-
-
In the Applets list, right-click the applet, and then choose Edit Browser Scripts.
-
In the BrowserApplet window, add the following script:
function Applet_PreInvokeMethod (name, inputPropSet) { switch (name) { case "MyTest": theApplication().SWEAlert("Browser Script!"); return("CancelOperation"); break; } return("ContinueOperation"); }
-
Close the BrowserApplet window.
-
In the Applets list, right-click the applet, and then choose Compile Selected Objects.
-
In the Object Compiler window, click Compile.
-
Start the Siebel client, and then navigate to the Accounts screen.
-
Click Test.
This is the button you created in earlier in this procedure.
-
Make sure the Siebel client displays an alert box that includes the following message:
Browser Script!