XML Tutorials - Actions
Version 1.6

This is the archives. For the latest Bambookit GUI 2.0, XML GUI Demos & Tutorials visit: www.bambookit.com/_demo.html

URL   LoadGUI   Invoke   Mailto
  

LoadGUI Actions


You can add loadGUI action to the buttons, items in the comboboxes, listboxes or trees. The following syntax is used to add loadgui action to the controls:
addActionTarget="widget01,loadgui,panel.xml"
The first parameter takes the name of the widget in which you want XML file to be loaded, the second parameter takes a specific event. Valid events are loadgui, loadurl, invoke. The third parameter would be XML file name that you want GUI to be loaded in the specified Widget(defined in first parameter).

In the applet above three buttons are displayed. We expect to click on the buttons and load another xml file in the panel(widget) below button. For a 'loadgui' action to occur you would have to add the following to each Button Control tag respectivelly:

addActionTarget="panel_actions,loadgui,tutorials_actions_loadgui_panelA.xml"
addActionTarget="panel_actions,loadgui,tutorials_actions_loadgui_panelB.xml"
addActionTarget="panel_actions,loadgui,tutorials_actions_loadgui_panelB.xml"

You would also have to supply the name of the Widget(panel) in which you want the XML file to be loaded through the use of setName="widgetname" property.

See complete XML source for the main XML file

See also XML source for the tutorials_actions_loadgui_panelA.xml file
See also XML source for the tutorials_actions_loadgui_panelB.xml file
See also XML source for the tutorials_actions_loadgui_panelC.xml file

PanelA consists of two widgets. The border (Type 'flat') was added to the panel A to make those two widgets visible for you. The First Widget consists of three more Buttons: Panel A-1, Panel A-2, and Panel A-3. The second Widget was created to load the three new GUI files that will be called by the buttons respectivelly.

See also XML source for the tutorials_actions_loadgui_panelA_1.xml file
See also XML source for the tutorials_actions_loadgui_panelA_2.xml file
See also XML source for the tutorials_actions_loadgui_panelA_3.xml file

In the applet above, the buttons keep its selected state. It set by the following properties: setSticky and setGroup. The three buttons above belong to the same group called "buttons" (setGroup="buttons"). Additionally each button has the attribute setSticky="true".

Refer to Reference for complete list of Properties.

[Home][Tutorial] [Demo]