You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-dev@incubator.apache.org by "James Margaris (JIRA)" <xa...@incubator.apache.org> on 2006/12/06 01:19:20 UTC

[jira] Created: (XAP-198) No escape syntax for MCO arguments

No escape syntax for MCO arguments
----------------------------------

                 Key: XAP-198
                 URL: http://issues.apache.org/jira/browse/XAP-198
             Project: XAP
          Issue Type: Bug
          Components: MCOs
            Reporter: James Margaris
            Priority: Blocker


<mco:mco 
	id="attributeSetter" 
	class="AttributeTester"
	src="AttributeTester.js"
	onLoad="mco:attributeSetter.reportEvent('called \'onload from mco')"
/>

In this example I want a ' (apostrophe) int he middle of a string. If I just use a plain apos that terminates the string argument, so I should be able to use \' instead. But that does not work either.


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

        

[jira] Closed: (XAP-198) No escape syntax for MCO arguments

Posted by "Trevor Oldak (JIRA)" <xa...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/XAP-198?page=all ]

Trevor Oldak closed XAP-198.
----------------------------


I'd also like to note that this was well implemented.
Backslashes escape apostraphes and themselves, but function as themselves if a non-escaped word follows.

> No escape syntax for MCO arguments
> ----------------------------------
>
>                 Key: XAP-198
>                 URL: http://issues.apache.org/jira/browse/XAP-198
>             Project: XAP
>          Issue Type: Bug
>          Components: MCOs
>            Reporter: James Margaris
>            Priority: Blocker
>
> <mco:mco 
> 	id="attributeSetter" 
> 	class="AttributeTester"
> 	src="AttributeTester.js"
> 	onLoad="mco:attributeSetter.reportEvent('called \'onload from mco')"
> />
> In this example I want a ' (apostrophe) int he middle of a string. If I just use a plain apos that terminates the string argument, so I should be able to use \' instead. But that does not work either.

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

        

[jira] Resolved: (XAP-198) No escape syntax for MCO arguments

Posted by "James Margaris (JIRA)" <xa...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/XAP-198?page=all ]

James Margaris resolved XAP-198.
--------------------------------

    Resolution: Fixed

Fixed and I changed the label widget sample to set text to 'hello world' (in apostrophes) to test.

Now if an mco string is delimited by an apostrophe \' is turned into a single apostrophe, and \\ is turned into \

Similarly if an mco string is delimited by quotes \" is turned into " and \\ into \

Example:

onCommand="mco:attributeSetter.setAttribute(testComponent, 'text', '\'Hello World!\'')" />

When this is called the string argument '\'Hello World!\'' is unescaped and passed to the method as:

'Hello World!'

Note that the \' have turned into \

> No escape syntax for MCO arguments
> ----------------------------------
>
>                 Key: XAP-198
>                 URL: http://issues.apache.org/jira/browse/XAP-198
>             Project: XAP
>          Issue Type: Bug
>          Components: MCOs
>            Reporter: James Margaris
>            Priority: Blocker
>
> <mco:mco 
> 	id="attributeSetter" 
> 	class="AttributeTester"
> 	src="AttributeTester.js"
> 	onLoad="mco:attributeSetter.reportEvent('called \'onload from mco')"
> />
> In this example I want a ' (apostrophe) int he middle of a string. If I just use a plain apos that terminates the string argument, so I should be able to use \' instead. But that does not work either.

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