Managing Actions

By Kevin M Schreiner

March 02, 2010

The runtime of OpenWebStudio is made up of two basic components. The Visual Layout (Template) and the executed runtime steps (Actions). Each step provided within the Action block is meant to add functionality or ultimately assign to the Template which will be rendered once all Actions have completed. This logical flow in other programming and event driven languages may be referred to as "Load" and "Render". The Actions themselves provide both capabilities, and are named appropriately to understand when the developer is assigning to the Visual Layout (Template), or when they are executing something to provide runtime functionality. It is essential in a base understanding of OpenWebStudio to grasp the difference between the Template and the Actions, how they operate and when they are consumed by the runtime.

Load

During the Load of OpenWebStudio, each action is executed. Conditions, Queries, Assignments, Executions and the like all are executed during the Load operation. Each type of Action allows for specific functionality. Actions can be nested together, branching functionality based on the process of the parent Action. Not all actions support the ability to have Child actions, and children of these actions will fail to execute. When an action assigned to the Template, it in essence is assigning to the "yet-to-be-bound" front end which will, after all actions have been performed, travel to the end user during Render. Only "Template" actions operate in this fashion, all other action types executed during the Load will be immediately consumed, and their output reflected to the runtime.

Render

When the Actions have all been completed, the execution is left with the final Template, assembled during the Action block, along with (optionally) a Template Query. When NO template Query is defined, the Template (No Query) Detail will be the final end result of the runtime. Otherwise, the Query will be executed. If no records are returned from the Template Query, the Template (No Results) Detail will be the final end result of the runtime. When one or more records are retrieved, the Template Header, Template Detail and Template Alternate Detail will be bound to the end result. Headers and Footers are discussed in other topics dedicated to them, however, it is important to note that the Headers and Footers can be nested to provide grouped output. 

Other than understanding that the Template itself will not be bound until all Actions have completed, the physical rendering of each of these Template nodes is also not executed until the time of rendering, unlike other assignments. What does that mean? When an Assignment Action is executed, it takes the physical value that is to be assigned to a runtime collection (like Session for example), and prior to assigning the value to the collection, it parses the value for all syntax, placing the fully rendered value into the target collection. When a Template Action is executed, it stores the physical content of the Action into the Template, without parsing, because that parsing will ONLY occur during Render, and not during Load.

Managing Actions

Actions can be added and removed from the runtime using the Action Tree, and managed by using the convenience of your keyboard.

Add actions to the flow of your code tree, each action will execute according to the action attributes/parameters. Navigate to the location in your code tree where an action is needed and click the desired Action from the Action Tab.

Expand/Collapse actions within the code tree by clicking the Expand (  ) and Collapse (  ) images located to the left of the node

Select actions by clicking on the action with the mouse cursor.



Editing Actions
Pressing the Enter key will open the selected action attributes interface. Alternatively, the action can be double-clicked with the mouse cursor.

Saving Actions
Pressing Control + S on the keyboard when an Action is open for editing will instantly Save the action (instead of pressing the Save button physically). When an action is not open, the same key combination Published the configurations (instead of pressing Publish on the ribbon).

Deleting Actions
Pressing the Delete key will delete the selected action after confirming the delete operation request. Deletion of an action will automatically detail all children of that action.

Moving Actions Up
You can move an Action up within the current Parent Action by pressing the Up arrow on the keyboard. Each consecutive press of the arrow will move the Action up one more position within the sibling actions. The Action will continue to move upwards within the same branch until it reaches the top of the branch. All child actions will move along with the selected action during this operation.

 

Moving Actions Down
You can move an Action down within the current Parent Action by pressing the Down arrow on the keyboard. Each consecutive press of the arrow will move the Action down one more position within the sibling actions. The Action will continue to move downwards within the same branch until it reaches the bottom of the branch. All child actions will move along with the selected action during this operation.

Making Actions Children
To make an Action a Child of another action, move the action Below the target parent within the branch and press the Right Arrow. This will indent the Action, making it appear as a child of the preceding action. Moving an Action to the Right will always move it to the top of the new Parent Actions list of children. All child actions will move along with the selected action during this operation. 

Moving Child Actions out of a Parent
By pressing the Left Arrow, you can move an action out of the current Parent Node. Moving an Action Left will always move it above the original Parent Action. All child Actions of the selected node will move along with the selected item.

Walking Actions Up the Tree
There are times where it is more useful to move an action up the tree by walking it to become a child of the current Expanded visually preceding. This is done by pressing Up while holding Shift.

Walking Actions Down the Tree
Much like walking up the tree, you can walk an action down the tree using Shift+Down. This will move the selected action down, becoming the child of the Next sibling, rather than moving it below the Next sibling. This will walk in and out of the tree as you move downward.

View an Entire Action Description
By pressing either "\" or "/" on the keyboard, the selected entry will expand/collapse the full Description of the content. This is useful when you want to review the entire body of a Template or Assignment action while working on other Actions. The Action will be expanded, and the body of the description will be presented in PRE format, therefore retaining all carriage returns and spacing.

Within the attributes of each action is frequently one or more Code Editors. These editors are identifiable as they appear as Text Areas with the Ribbon attached at the top. The editor ribbon provides the ability to press Enter and Tab consistently without being moved out of the text area and into another attribute. The text will appropriately split or indent as anticipated.

The Editor Ribbon provides a set of quick inclusion templates which when clicked will paste the desired content into the current cursor position of the editor. The available list of items is evolving, and currently cover the OWS Script tokens, Formatters (with associated Help), OWS Query blocks for performing SQL, XML or Directory queries. HTML and Silverlight Markup and finally a common Clip object, populated via the use of the Query Action.

 

Expanding the Editor
Pressing the Control key in combination with the Down key within the Code Editor will increase the Height of the editor.

Collapsing the Editor
Pressing the Control key in combination with the Up key within the Code Editor will decrease the Height of the editor.

Escaping Syntax
Pressing the Control key in combination with the E key within the Code Editor will automatically escape (prepend) every OWS symbol character with an escape character within all of the selected text in the editor. Each time this is pressed, one layer of escape characters is added.

Unescaping Syntax
Pressing the Control key in combination with the R key within the Code Editor will automatically unescape (strip) the escape character preceeding every OWS symbol character with an escape character. Each time this is pressed, one layer of escape characters will be removed.

Average ( Ratings):
 
Want to help out?
 
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share