[OS-JIRA] Created: (WOL-1160) OGNL validation bug in component editor

From: Paul Hoadley (JIRA) ("Paul)
Date: Fri May 14 2010 - 04:07:58 UTC

  • Next message: Mike Schrag: "build servers and stable"

    OGNL validation bug in component editor
    ---------------------------------------

                     Key: WOL-1160
                     URL: http://issues.objectstyle.org/jira/browse/WOL-1160
                 Project: WOProject/WOLips
              Issue Type: Bug
              Components: WOLips General
        Affects Versions: WOLips Nightly, WOLips Stable
             Environment: Eclipse 3.4.2
    WOLips 3.4.6040
    Wonder from approx. 2010-05-10
                Reporter: Paul Hoadley
                Priority: Minor

    There seems to be a problem with escaped single quotes in OGNL expressions that appear as values for inline bindings. To create a minimal example, create a new Wonder Application. Replace Main.html with:

    {code}
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
    <html>
            <head>
                    <title>Untitled</title>
            </head>
            <body>
                    <wo:string value="~'Hello \\'' + index + '\\''"></wo:string>
            </body>
    </html>
    {code}

    and replace Main.java with:

    {code}
    package your.app.components;

    import com.webobjects.appserver.WOContext;

    import er.extensions.components.ERXComponent;

    public class Main extends ERXComponent {
            public Main(WOContext context) {
                    super(context);
            }
            
            public String index() {
                    return "1";
            }
    }
    {code}

    The app's output should be:

    Hello '1'

    The component editor should complain that "Binding 'value' is required for WOString." That is, the expression with the escaped single quotes is parsed by OGNL during app execution, but is not parsed correctly by the component editor.

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.objectstyle.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Fri May 14 2010 - 04:08:43 UTC