IBM Support

PK91480: H:COMMANDLINK WITH F:PARAM THAT HAS A VALUE THAT CONTAINS AN APOSTROPHE BREAKS FUNCTIONALITY.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • WebSphere Application Server v6.1 Network Deployment edition.
    All supported operating systems
    
    Problem Description:1) h:commandLink with f:param that has a
    value that contains an apostrophe breaks functionality.
    
    Using the <f:param> JSF tag, the generated JavaScript code fails
    to run if the value contains an apostrophe. The reason is that
    the JavaScript code is terminated by the apostrophe.
    

Local fix

  • However, there is a very simple work around from the perspective
    of the
    managed bean providing the value for f:param.
    
    It needs to be escaped. However, if the string is in java it
    needs to be
    escaped twice, once to get through java's handing of the \ and
    once to
    get through javascripts. It ends up looking like:
    
    param.value.replace("'", "\\\'");
    
    This would be a work around in the managed bean.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Version    *
    *                  6.1 users of JavaServer Faces (JSF).        *
    ****************************************************************
    * PROBLEM DESCRIPTION: JSF pages which contain CommandLink     *
    *                      components with parameters that         *
    *                      contain an apostrophe do not render     *
    *                      functional javascript.                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The JSF CommandLink link component generates javascript code
    to perform the page submission. The presence of an apostrophe
    inside a parameter causes the javascript generated to not be
    valid.
    

Problem conclusion

  • A context-param named
    com.ibm.ws.jsf.commandLinkEscapeApostrophe was added that when
    set to true will escape any apostrophe when rendering the
    CommandLink.
    To set the property, add the example below to the
    application's web.xml:
    <context-param>
    <description>
    Causes apostrophes inside the name or value of an f:param to be
    escaped in h:commandLink</description>
    <param-name>com.ibm.ws.jsf.commandLinkEscapeApostrophe</param-na
    me>
    <param-value>true</param-value>
    </context-param>
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 6.1.0.29.  Please refer to the Recommended Updates
    page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK91480

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    61W

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-07-15

  • Closed date

    2009-09-22

  • Last modified date

    2009-09-22

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R61A PSY

       UP

  • R61H PSY

       UP

  • R61I PSY

       UP

  • R61P PSY

       UP

  • R61S PSY

       UP

  • R61W PSY

       UP

  • R61Z PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 December 2021