Link builder inputsAdded by IBM on June 28, 2011 | Version 1 (Original)
|This topic describes the inputs for the Link builder.
This topic describes the inputs for the Link builder.
- HTML Attributes
- Post-Action Behavior
Table 1. General inputs
|Name||Enter a name for this builder call. The WebSphere® Portlet Factory Designer displays this name in the builder call list.|
|Page Location||Specify the page or pages on which this builder call acts. |
|Link text||Specify a value to display as the link text. You can specify an indirect reference with the Choose Reference dialog, or enter a text string directly.|
|Action type||Defines the behavior of the action. Choose an action type based on the action that will process the onClick event and if you want to process any form inputs as part of that action.|
Submit form and invoke action
Choose this option if the specified action is a method in the model or linked Java™ object and that method processes the inputs to the form on which the button resides.Submit form to URL
Choose this option if the specified action is a URL outside of the IBM® WebSphere Portlet Factory runtime that will process the inputs to a form. The specified URL receives the form input values as name/value pairs appended to the URL.Link to an Action
Choose this option if the specified action is a method in the model or linked Java object (including service calls). Acts as a simple link, transferring control directly to the specified Action. The specified action cannot process any form inputs.Link to a URL
Choose this option if you want to navigate to a non- WebSphere Portlet Factory URL. Acts as a simple link, transferring control directly to the specified URL. The URL cannot process any form inputs.Run a script
|Action||Specify the model action to execute when the user clicks the button or link. |
This input is available if the Action Type input is set to either Submit form and invoke action or Submit form to URL.
|URL||Specify the external URL to execute when the user clicks the button or link. |
This input is available if the Action Type input is set to either Submit form to URL or Link to a URL.
Note: Do not use comments in the script that you specify. The specified script is added as one line, so any code following comments is ignored.
This input is available if the Action Type input is set to Run a script.
|Form Name||If the link is in one form or frame and the form to be submitted is in another, enter the name of the form whose inputs you want to submit.|
Table 2. Arguments input
|Input Mappings||You can pass arguments to the specified action by adding argument names and the value to be passed to it. Use the Choose Reference dialog to specify input values or values returned by methods or service calls as the value to be passed to an argument for the specified action.|
This input is available if the Action Type input is set to anything other than Run a script.
Table 3. HTML Attributes inputs
|Class||The value for the HTML class attribute. The class attribute specifies the element to be a member of one or more classes.|
|Style||The value for the HTML style attribute. The style attribute allows authors to specify the style rules inline for a single occurrence of an element.|
Table 4. Post-Action Behavior inputs
|Show Advanced Options||Set to display extra options for the Post-Action Behavior input and extra optional inputs. Clear to display only the Default, Smart refresh, and Refresh specified page location after running action options for the Post-Action Behavior input. |
|Post-Action Behavior||Select what happens after the action launched by the link completes.|
In most cases this displays the output generated by the action. One exception to this is when the action is run from inside a container that specifies that the outermost page gets rendered after the action runs. In the exception case, default would not display the output, but refresh the outermost page.Smart refresh
The portlet or widget is refreshed, but not any surrounding page. This option updates part of the user interface without reloading the entire page, does not require a page location, and can refresh across IBM WebSphere Portlet Factory pages. Refresh specified page location after running action
Replace specified location with action results
The outermost page is not refreshed. Instead, new HTML for the specified region is recalculated after the action runs, and this HTML is sent to the client where it replaces the existing HTML. If Replace "id" Matches
is checked, then the HTML produced by the action is examined for elements that have ID attribute values. If ID attribute values are found, then the corresponding elements in the page will have their HTML replaced.
Note: If Ajax is disabled, the default post-action behavior is used without loss of functionality. Ajax enablement is controlled through the Global Ajax Enablement builder and profiling rather than changing inputs in a large number of builders.
This is good for ToolTips, incremental validation, and other simple information calculated on the server.
Note: Note: If Ajax is disabled, the default post-action behavior is used without loss of functionality. Ajax enablement is controlled through the Global Ajax Enablement builder and profiling rather than changing inputs in a large number of builders.
This is very similar to default, but overrides behavior that prevents the top-most page from refreshing. This option would be necessary if portal event and render phases need to be carried out to enable portlet-to-portlet communication to function properly.Show action results "stand-alone": display no containing pages
This option is similar to default, but it ensures that even if the model is running in a portal or model container, the action only returns the results of the specified action, not the containing portal or other surrounding pages. This option is ideal for lower-level Ajax or related functionality such as pop-ups, computed images, or Excel export.
|Location to Refresh||This input is available if the Post-Action Behavior input is set to Refresh specified page location after running action and the Replace "id" Matches input is clear or the Post-Action Behavior input is set to Replace specified location with action results. Under Page Location, in Location Technique, set one of the following options to determine the area on the page to be displayed. |
On Named Tag
Relative to Named Tag
Specify both of the following inputs:
Required. Select the name of the page.Tag
Required. Select the location tag for the page.
In addition to Page
, you can specify the following inputs:
Can be one of the following inputs:
Replace NodeNew Tag Name
Output replaces the element specified in the Tag input. Before After Inside-Top Inside-Bottom Wrapper Table-Wrap-Above Table-Wrap-Below Table-Wrap-Left Table-Wrap-Right
Output gets inserted as specified relative to the location indicated by the Tag input. These are the standard techniques for locating builder output on pages.
Name assigned to the inserted output.
In the text area, paste your code to be run.
|Replace "id" Matches||This input is available if the Show Advanced Options input is set and the Post-Action Behavior input is set to Refresh specified page location after running action. |
If this input is set, the HTML code produced by the action is examined for elements that have ID attribute values. If ID attribute values are found, the corresponding elements in the page have their HTML replaced.
|Execute Embedded Scripts||This input is available if the Post-Action Behavior input is set to Refresh specified page after running action. |
|Load Event Prefix||This input is available if the Post-Action Behavior input is set to Refresh specified page location after running action. |
This builder declares and fires events to indicate initiation, completion, and error cases in partial-page refresh operations. The names of these events are formed by adding PreLoad, PostLoad, or LoadError to a name prefix. By default, this prefix is Ajax. Specify a custom name prefix to create a different set of events to process. For example, enter mypage to create mypagePreLoad, mypagePostLoad, and mypageLoadError events. This feature is useful to process results from multiple sets of events on the same page.
This set of inputs is available if any choice other than Run a script
is selected in the Action Type
Table 5. Advanced inputs
|Target||The window or frame which displays the results of the action. The default behavior is to launch the content in the current window or frame. The following options are available. |
Display results in the window or frame that contains the form (the current window). _blank
Display results in a new, unnamed browser window._parent
Display results in the frameset above the frame that contains the form._top
Display results the topmost frameset._search
Display results in the browser search pane. You can also specify the name of a frame in the current frameset.
Note: All these targets are relative to the form being processed, not to the builder itself.
|Rendering Mode||Determines if the outermost page is to be rendered after running the action. The following options are available. |
If you know that the specified action returns a specific page, set this option. Render outermost page after running action
If you do not know the specific page that gets returned, set this option. The Preserve Page input becomes available. For example, use this setting if you are creating a builder.
|Break Containment||Determines if the element is run as a top-level action, even if contained, for example, in a portal. Set this input to replace the contents of the target window with the contents of the URL returned by the action. Clear this input to preserve the contents of the target window. |
|Preserve Page||Set to save the contents of the page. The current page is encoded in the generated URL. Clear to discard the page. |
This input is available if the Rendering Mode input is set to Render outermost page after running action.
Parent topic: Link builder