Portlet Factory, Version 6.1.2


 

Image Button builder inputs

This topic describes the inputs for the Image Button builder.

 

General inputs

Table 1. General inputs
Input Name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Page Location Page or pages on which this builder call acts.
Image Specify the URL to the default image to be added to the pages in the model. An image can be specified in the following ways:

Absolute

http://www.example.com/~jdoe/mypics/image1.jpg

Relative

/files/images/mypics/image1.gif

Indirect Reference

${Variables/ImageName}

where ImageName refers to a variable containing a string value such as /Images/myimages/image3.gif.

The indirect reference can also be used to call a method. For example, if you have a getImage() method in your model, you can select it using the MethodCall picker ${MethodCall/getImage}. This method must return a string that contains the image file name relative to the servable content directory. For example, /Images/myimages/image3.gif. If you are displaying rows of data using the data page builder and want to vary the image based on some criteria related to the row, you can use the xxxxLoopVar variable in your method to fetch data related to the current row. The LoopVar variable name is based on the variable data that the data page builder is operating on.

Hover Image Specify the URL to the image displayed during mouse-over.
Pressed Image Specify the URL to the image displayed when button is clicked.
Action Type Defines the behavior of the of the action. Select an action type based on the action that processes the onClick event and on whether you want to process any form inputs as part of that action.

Submit form and invoke action

Select 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

Select this option if the specified action is a URL outside of IBM® WebSphere Portlet Factory runtime that processes the inputs to a form. The specified URL receives the form input values as name and value pairs appended to the URL.

Link to an action

Select this option if the specified action is a method in the model or linked Java object (including service calls). This option acts as a simple link, transferring control directly to the specified URL. The specified action cannot process any form inputs.

Link to a URL

Select this option to navigate to a non- WebSphere Portlet Factory URL. The URL cannot process any form inputs.

Run a script

Select this option to run some client-side JavaScript™ when the user clicks the button. The script cannot process any form inputs.
Action Specify the model action to execute when the user clicks the image button.
Script to Execute This input is available if you select Run a script in the Action Type input.

JavaScript to execute when the user clicks on the image button. Form inputs, if any, are not submitted to a script.

Note: Do not use comments in the script you specify. The script you specify is added as one line, so any code following comments is ignored.

 

Arguments

Table 2. Arguments input
Input Name Description
Input Mappings You can pass arguments to the specified action by adding argument names and the value to be passed to it. Use the reference chooser 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.

 

Post-Action Behavior

Table 3. Post-Action Behavior inputs
Input Name Description
Show Advanced Inputs Set this to display all available input choices for the Post-Action Behavior input.
Post-Action Behavior Select what should happen after the action launched by the image button has completed.

Default

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.

Refresh specified page location after running action

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 Node is checked for Placement, the HTML 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.

Note: If Ajax is disabled, the default post-action behavior is used without loss of functionality. Ajax enablement is controlled through profiling rather than changing inputs in a large number of builders.

Replace specified location with action results

This is good for Tooltips, incremental validation, and other simple information calculated on the server.

Note: If Ajax is disabled, the default post-action behavior is used without loss of functionality. Ajax enablement is controlled through profiling rather than changing inputs in a large number of builders.

Evaluate action results as JavaScript

Run the main action, and evaluate what it returns as JavaScript.

Always reload top-most page after running action

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.
Execute Embedded Scripts This input is available if the Post-Action Behavior input is set to Refresh specified page after running action.

Set this input to execute any JavaScript present in the page that is being refreshed. Any script specified either by <script src="name" /> or as text inside a <script> section is executed.

Location to refresh This set of inputs is available if either Refresh specified page location after running action or Replace specified location with action results is selected in the Post-Action Behavior input. Use one of the following techniques for locating control builder calls on the page.

On Named Tag

Lets you specify Page and Tag. You can specify All Pages.

Relative to Named Tag

Lets you specify Page, Tag, Placement, and New Tag Name. You can specify All Pages.

Advanced

Lets you enter the Page Location language code.

 

HTML Attributes

You can manage the display of this control by setting HTML attributes.

Table 4. HTML Attributes inputs
Input Name Description
Alternate text Enter alternative text for the image to assist users with vision impairment.
Width Enter the width of the button image in pixels.
Height Enter the height of the button image in pixels.
Border Enter the width of the button image border in pixels.

 

Advanced

This set of inputs is available if any choice other than Run a script is selected in the Action Type input.

Table 5. Advanced inputs
Input Name Description
Target The window or frame which displays the results of the action. If you do not set this value, the current window or frame is the target. Valid entries include the following:

_self

Display results in the frame containing the form. If target is not specified, _self is the default.

_blank

Display results in a new browser window.

_parent

Display results in the frameset above the frame containing the form.

_top

Display results the topmost frameset.
You can also specify the name of a frame in the current frameset.

Note: All of these targets are relative to the form being processed, not the button image itself.

Rendering mode If you know that the specified action returns a specific page, set Rendering Mode to Normal. If you do not know the specific page that gets returned, set Rendering Mode to Return Outermost page after running action. For example, use this setting when creating a builder.
Break Containment Enable this input replace the contents of the target window with the contents of the URL returned by the action.
Form Name If the image button is in one form and the inputs to be submitted are in another, enter the name of the form whose inputs you want to submit.

Parent topic: Image Button builder


Library | Support |