Mailing List webobjects-dev@wocommunity.org Message #75
From: Paul Hoadley <webobjects-dev@wocommunity.org>
Subject: WOActionURL and WOContext.componentActionURL()
Date: Mon, 22 Feb 2021 15:28:13 +1030
To: <webobjects-dev@wocommunity.org>
Hello,

I have a page component with an action method someMethod(). In the page template, I use this to get the URL for the action method into some Javascript:

<wo:WOActionURL action="$someMethod" />

This is the advertised purpose of that component, and it works as designed.

However, suppose I don't like intermixing component output like that into Javascript in the page template. What I actually want is just the text output of that WOActionURL component. (Suppose, for example, I want to generate the Javascript some other way, and all I want is that URL itself.) I would have thought that WOContext.componentActionURL() would be the solution—indeed, somewhere inside WOActionURL that's what is being called. What I cannot see is how WOActionURL is using the 'action' binding to target that method, or, indeed, any way to specify that action method to any of the variants of componentActionURL(). I must be missing something here—what is it?


-- 
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster