Portlet Factory, Version 6.1.2


 

Cooperative Portlet Source builder inputs

This topic describes the inputs for the Cooperative Portlet Source builder.

Review these inputs for the type of portlet communication you want to implement.

 

Common inputs

Table 1. Common inputs
Input name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Type Select which type of tag to place on the model page:

C2A Single Action

To place a <C2A:encodeProperty> tag. Valid only in IBM® Portlet API (WebSphere Native).

C2A Multiple Action

To place a <C2A:encodeProperties> tag.

Property Broker Link

To place a link on a page that triggers a Property Broker Event.

Property Broker Action

To place a link on a page that triggers a Property Broker Action.

 

C2A Single Action Type

This type is used when you run your portlet through the WebSphere native (deprecated) API. The following table shows the inputs available when you select C2A Single Action in the Type input.

Table 2. C2A Single Action Type inputs
Input name Description
Page Location Page or pages on which this builder places the Property Broker Link.
Value Enter the value to be passed as an input to the target event action. For example: ${Variables/orderLoopVar/order/orderID}.
Namespace Enter the WSDL Namespace for the output type. This must match the namespace specified in the target model. This input is required. For example: http://www.ibm.com/c2a/models
Broadcast This input specifies whether the source data can be broadcast to all target portlets on the page with matching data types.

Enable to allow the generated menu to display an additional item to broadcast to all matching targets.

Generate When Nested This input specifies whether the tag should generate markup when nested within a <c2a:encodeProperties> tag. Enable to generate markup.
Target definition

Output Name Enter the name of the parameter that is passed to the target portlet. For example: OrderID.
Output Name Type Enter the XML Schema Datatype name that was specified in the target model, for example, OrderIDType. This is a required input.
Namespace Optional. Specify the target namespace for this output if you specified a value for Output Name Type. This lets you override the default target namespace for this output.
Output Type Lets you select the simple data type of the parameter that is passed to the target. The target portlet cannot receive objects from other portlets that are in a different WAR if the object's class file is not shared; the class file must be in a shared location. The default value is string. For example: integer.
Caption Enter the caption that is used by the wiring tool to describe the name of the output parameter. For example: Order ID.

 

C2A Multiple Action Type

This type is used in portlets conforming to the WebSphere native (deprecated) API. The following table shows the inputs available when you select C2A Multiple Action in the Type input.

Table 3. C2A Multiple Action Type inputs
Input name Description
Page Location Page or pages on which this builder places the Property Broker Link.
Value Specify a value to display just after the broadcast menu icon. For example: ${Variables/displayName}
Caption Displays a caption on the generated menu.

The builder automatically generates a resource property file and creates a key and value using the text entered. The property file name is created using the model name and placed in the WEB-INF\classes\nls directory.

The resource file is generated by an Ant task in the build_deployment script. For example if your model is named: test/orders_source.model, a file named WEB-INF\classes\nls\test\orders_source.properties is created. For example: Send All

 

Property Broker Link Type inputs

This type is used to add a link to a page. The link can be used to trigger a Property Broker event, which passes a property to any target portlet that has a wire connecting the source and target portlets.

Note: This is only available in a WebSphere portlet that uses the Java Standard 1.0 (JSR 168) or Java Standard 2.0 (JSR 286) API.

The link is activated once a wire is created for a property from the source to the target portlet. The Table 4 table shows the inputs available when you select Property Broker Link in the Type input.

Table 4. Property Broker Link Type inputs
Input name Description
Page Location Page or pages on which this builder places the Property Broker Link.
Namespace Enter the WSDL Namespace for the output type. This must match the namespace specified in the target model. This input is required. For example: http://www.ibm.com/c2a/models
Output definitions

Name Enter the name of the parameter to pass to the target portlet. Example: OrderID
Output Name Type Optional. Enter the XML Schema Datatype name that was specified in the target model, for example, OrderIDType. However, if this is left blank and Property Broker Link or Property Broker Action is selected in Type, the builder uses the XSD primitive that was specified in Output Type (for example, string).

Note: This input is not used for JSR-286 events.

Namespace Optional. Specify the target namespace for this output if you specified a value for Output Name Type. This lets you override the default target namespace for this output.
Output Type Select the simple type of the value that is being passed to the target. You can also select the anyType when you pass complex data, such as a map. The default value is string. Example: integer

Note: For JSR-168 deployments these types are mapped to the “xsd” types. For example, “string” is mapped to xsd:string. For JSR-286 deployments, these types are mapped to the Java™ JAXB types. For example “string” is mapped to java.lang.String. You may also directly type in the Java class name (java.lang.Integer), or “xsd” type (xsd:integer) as needed.

Value Enter the value to be passed as an input to the target event action.

Note: If anyType is used as the Output Type, the specified Value will not be placed as a parameter on the link URL as it would be with simple types because request parameters must be strings. In this case, the generated method action contains the code to retrieve the value when the method is executed. Example:

${Variables/orderLoopVar/order/ordered}
Alias Mapping Optional. Use this input to specify list of alternate QNames that are used when matching events against each other. This is useful when communicating between JSR 168 cooperative portlets and JSR 286 event portlets where you need to specify an alternate QName.

Note: This is only used by JSR-286 events.

Caption Enter the caption that the wiring tool uses to describe the name of the output parameter. Example: Order ID

 

Property Broker Action Type inputs

The Property Broker action type is functionality identical to the Property Broker Link type, except that a link is not placed on the page. The WSDL and method action described in the Property Broker Link type is generated.

Note: This input group is only available in a WebSphere portlet that uses the Java Standard 1.0 (JSR 168) or Java Standard 2.0 (JSR 286) API.

Selecting this type is useful to provide your own user interface (UI) for triggering the Property Broker event. For example, you may want to trigger the event when an input form is being submitted.

Keep the following points in mind when using this type. For JSR 168 deployments

  • You must add a parameter named ACTION_NAME to the UI action that you plan to use to trigger the event (for example, Link and Button). Set the value of the ACTION_NAME to the name of the generated pbAction_xxxx action method (for example, pbAction_OrderIDSource).

  • If your action calls a custom method or action list, your target UI action code must call the generated pbAction_xxxx action either directly or indirectly.
For JSR 286 deployments

  • JSR 286 events are not required to add the ACTION_NAME parameter to the request as in JSR 168.

  • If your action calls a custom method or action list, your target UI action code must call the generated pb286Action_xxxx action either directly or indirectly. For models from which you may deploy to either JSR 168 or JSR 286, you can call the generated pbAction_xxxx action method, which contains the action name as the first parameter.

The Table 5 table shows the inputs available if you select Property Broker Action in the Type input.

Table 5. Property Broker Action Type inputs
Input name Description
Namespace Enter the WSDL Namespace for the output type. This must match the namespace specified in the target model. This input is required. For example: http://www.ibm.com/c2a/models
Output definitions

Name Enter the name of the parameter to pass to the target portlet. Example: OrderID
Output Name Type Optional. Enter the XML Schema Datatype name that was specified in the target model, for example, OrderIDType. However, if this is left blank and Property Broker Link or Property Broker Action is selected in Type, the builder uses the XSD primitive that was specified in Output Type (for example, string).

Note: This input is not used for JSR-286 events.

Namespace Optional. Specify the target namespace for this output if you specified a value for Output Name Type. This lets you override the default target namespace for this output.
Output Type Select the simple type of the value that is being passed to the target. You can also select the anyType when you pass complex data, such as a map. The default value is string. Example: integer

Note: For JSR-168 deployments these types are mapped to the “xsd” types. For example, “string” is mapped to xsd:string. For JSR-286 deployments, these types are mapped to the Java JAXB types. For example “string” is mapped to java.lang.String. You may also directly type in the Java class name (java.lang.Integer), or “xsd” type (xsd:integer) as needed.

Value Enter an optional value that when specified will be passed as an input to the target event action. You may also leave this blank in order to manually pass the generated action method the desired value.

Note: If anyType is used as the Output Type and a Value is specified, then the generated method action code includes the code to retrieve the value instead of being passed in to the method.

If anyType is used as the Output Type and a Value is not specified, then the generated method action code will include a parameter of type Object for the data to be passed in. In this case, the developer must call this method with the data they wish to pass to the target event. Example: ${Variables/order}

Alias Mapping Use this optional input to specify list of alternate QNames that are used when matching events against each other. This is useful when communicating between JSR 168 cooperative portlets and JSR 286 event portlets where you need to specify an alternate QName.

Note: This is only used by JSR-286 events.

Caption Enter the caption that the wiring tool uses to describe the name of the output parameter. Example: Order ID

Parent topic: Cooperative Portlet Source builder


Library | Support |