Flex: How can I use the @ContextRoot in a Button or LinkButton

Posted by Dave Meurer on Stack Overflow See other posts from Stack Overflow or by Dave Meurer
Published on 2010-05-13T20:39:21Z Indexed on 2010/05/14 15:14 UTC
Read the original article Hit count: 262

Filed under:
|
|
|
|

I'm trying to create a button that will simply link back to the context root. I noticed flex has a @ContextRoot attribute that appears to work only in certain cases. For example, if I try to use it in the following mxml:

<mx:Button label="Back to Root" click="navigateToURL(new URLRequest(@ContextRoot()), '_parent')"/>

I get the following error: Error: Attributes are not callable.

I can't seem to find this technique explained anywhere, is there another way?

Thanks for the help! Dave

© Stack Overflow or respective owner

Related posts about flex

Related posts about contextroot