+

Search Tips   |   Advanced Search

The render parameter plug-in

Use the RenderParam rendering plug-in to access public and private render parameters from the web content.

Syntax:

    [Plugin:RenderParam key="" type="" defaultValue="" separator="" escape=""]

Attributes:

    key
    Name of the render parameter to access.

    type
    Specify the type of the parameter to be to read. For the type, specify one of the following values:

      any
      Specify this type value to retrieve parameter values, regardless of the parameter type.

      private
      Specify this type value to retrieve the values of a private render parameter.

      public
      Specify this type value to retrieve the values of a public render parameter.

    defaultValue
    Specify the value to be to returned if the addressed render parameter does not exist or has a value of null.

    separator
    Specify the separator to use to separate the values of a render parameter that has more than one value.

    escape
    Specify define the escaping to be used to write the URL. Specify one of the following values xml, json, javascript, or none. The default value is none.


Examples

  • To retrieve the value of a private render parameter with the name key1, use the following plug-in tag:

      [Plugin:RenderParam key="key1" type="private"]

  • To insert the value defaultValue into the content, if the render parameter with the name key1 does not exist or if the value is null, use the following plug-in tag:

      [Plugin:RenderParam key="key1" type="private" defaultValue="defaultValue"]

  • To retrieve the value of a public render parameter, use the full qualified name (QName) of the parameter in the format defined by javax.xml.namespace.QName.valueOf(String). Examples:

    • To access the public context render parameter of Web Content Manager, use the following plug-in tag:

        [Plugin:RenderParam key="{http://www.ibm.com/xmlns/prod/datatype/content}context" type="public"]

    • To access the custom context render parameter of Web Content Manager, use the following plug-in tag:

        [Plugin:RenderParam key="{http://www.ibm.com/xmlns/prod/datatype/content}custom-context" type="public"]

  • If we know the short identifier of the public render parameter from the portlet deployment descriptor portlet.xml, we can also use that short identifier. Examples:

    • To access the public context render parameter of Web Content Manager, use the following plug-in tag:

        [Plugin:RenderParam key="PUBLIC_CONTEXT" type="public"]

    • To access the custom context render parameter of Web Content Manager, use the following plug-in tag:

        [Plugin:RenderParam key="CUSTOM_CONTEXT" type="public"]

  • To retrieve the value of a render parameter with the name key1, no matter whether it is a private or public render parameter, use the following plug-in tag:

      [Plugin:RenderParam key="key1" type="any"]

  • To separate multiple values of a render parameter with the name key1, for example, using a semicolon, use the following plug-in tag:

      [Plugin:RenderParam key="key1" type="any" separator=";"]


Parent Digital data connector rendering plug-ins