X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) X-Junk-Score: 10 [X] X-KAS-Score: 10 [X] From: "Paul Hoadley" Received: from out1-smtp.messagingengine.com ([66.111.4.25] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 25445531 for webobjects-dev@wocommunity.org; Mon, 22 Feb 2021 08:52:18 +0100 Received-SPF: none receiver=post.selbstdenker.com; client-ip=66.111.4.25; envelope-from=paulh@logicsquad.net Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 911E25C0081 for ; Mon, 22 Feb 2021 02:51:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 22 Feb 2021 02:51:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=0eu2HH /r9MrvXXCL1Di+/gICW3eOhuGSEVF/BJNQvS4=; b=ks/fASBFPYx2FJEs0Xz8r+ 7sirEpFxk91D6XpX1AP2NKMEkZEy+sGdxXqC4656r5+QczAPbqTBnDlXPnhIcQNv 7MX0v+P3PEI7z4hWAUrMihyCi2luy+fkJdrmM2CP8JyTTudNNXblmN64dOMZ+68P LrHdDxuSzydMaf684X1RETdKNQ/F3NQGqCUELzFaNmCC68TIic+VU3Wl5DI8MVOx LyX0K5Y+MJ6IO/0CIYyaJR+tDbQiRjxzlD6vkHthaBN0HzNnizZpmkQwqqF0c4E7 JZCpNiCAxdAgWrq6ck8im9z1iwzVF02ngvOTGGSNZrl40eeb4RAK+c5CXXf7JaOg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkedvgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfgtggfuffhfvfgjkffosegrtdhmrehhtddvnecuhfhrohhmpefrrghulhcu jfhorggulhgvhicuoehprghulhhhsehlohhgihgtshhquhgrugdrnhgvtheqnecuggftrf grthhtvghrnheptddufeefkeetjeevtdejjeefudffudevfeejueelkeeihefhgeehfeek ueehtdegnecuffhomhgrihhnpehlohhgihgtshhquhgrugdrnhgvthdplhhinhhkvgguih hnrdgtohhmnecukfhppedugedrvddruddugedrudehjeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehprghulhhhsehlohhgihgtshhquhgrug drnhgvth X-ME-Proxy: Received: from [192.168.142.181] (ppp14-2-114-157.adl-apt-pir-bras32.tpg.internode.on.net [14.2.114.157]) by mail.messagingengine.com (Postfix) with ESMTPA id 6EC01108005F for ; Mon, 22 Feb 2021 02:51:57 -0500 (EST) Content-Type: multipart/alternative; boundary="Apple-Mail=_F1A392C1-78E5-42D0-9EC2-CD0E550E789E" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [WO-DEV] WOActionURL and WOContext.componentActionURL() Date: Mon, 22 Feb 2021 18:21:54 +1030 References: To: WebObjects & WOnder Development In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3608.120.23.2.4) --Apple-Mail=_F1A392C1-78E5-42D0-9EC2-CD0E550E789E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Ramsey, On 22 Feb 2021, at 5:23 pm, Ramsey Gurley = wrote: > Have a look in the ERXComponentRequestHandler. If I remember = correctly, basically what happens is a component action url is just a = numbered path back into an existing page object in memory. The context = id lets the handler know which page to pull from the session page cache, = then the element id is where in the page to find the component action = targeted. Something like 5.3.2.4 means context id 5 (page with key of 5 = in the cache), with element id 3.2.4 (The fourth element of the second = element of the third element of the parent page). Once that happens, it = knows where to call lifecycle methods = (invokeAction/appendToResponse/etc) in response to the URL request.=20 >=20 > Which means, if you really want to see where the action is executed, = look for the invokeAction in the component hierarchy, which appears to = be in superclass WOHyperlink. >=20 > invokedElement =3D = (WOActionResults)_action.valueInComponent(component); >=20 > Where _action is a WOAssociation, probably a WOBindingNameAssociation, = where valueInComponent is calling valueForKeyPath on the binding value = on the component. That executes the method and receives a = WOActionResult. >=20 > I install the Enhanced Class Decompiler plugin to view the code for = that. It's a quite nice plugin for eclipse. Yeah, it's great! To be honest, I'm almost at the point where I'll probably just deal with = having a WOActionURL embedded in the Javascript in the page. I can see = what you're looking at in WOHyperlink.invokeAction(). I take it that = this line in WOActionURL is generating the URL: String actionURL =3D = aContext.componentActionURL(WOApplication.application().componentRequestHa= ndlerKey(), = this.secureInContext(aContext)); And it can do that because it (the WOActionURL) is already a component = with the appropriate WOAssocations (that is, including the 'action' = binding)? This is starting to seem all a bit hard. Unless someone has done it = before, I think I'll skip it. --=20 Paul Hoadley https://logicsquad.net/ https://www.linkedin.com/company/logic-squad/ --Apple-Mail=_F1A392C1-78E5-42D0-9EC2-CD0E550E789E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi = Ramsey,

On 22 Feb 2021, at = 5:23 pm, Ramsey Gurley <webobjects-dev@wocommunity.org> wrote:

Have a look in the = ERXComponentRequestHandler. If I remember correctly, basically what = happens is a component action url is just a numbered path back into an = existing page object in memory. The context id lets the handler know = which page to pull from the session page cache, then the element id is where in the page to find the = component action targeted. Something like 5.3.2.4 means context id 5 = (page with key of 5 in the cache), with element id 3.2.4 (The fourth = element of the second element of the third element of the parent page). Once that happens, it knows where to call lifecycle = methods (invokeAction/appendToResponse/etc) in response to the URL = request. 

Which means, if you really want to see where the action = is executed, look for the invokeAction in the component hierarchy, which = appears to be in superclass WOHyperlink.

invokedElement= =3D (WOActionResults)_action.valueInComponent(component);

Where _action is a WOAssociation, probably a = WOBindingNameAssociation, where valueInComponent is calling = valueForKeyPath on the binding value on the component. That executes the = method and receives a WOActionResult.

I install the Enhanced Class Decompiler plugin to view the = code for that. It's a quite nice plugin for = eclipse.

Yeah, it's great!

To be honest, I'm almost at the point where I'll = probably just deal with having a WOActionURL embedded in the Javascript = in the page. I can see what you're looking at in = WOHyperlink.invokeAction(). I take it that this line in WOActionURL is = generating the URL:

= String actionURL =3D aContext.componentActionURL(WOA= pplication.application().componentRequestHandlerKey(),
= this.secureInContext(aContext));

And it can do that because it (the WOActionURL) is = already a component with the appropriate WOAssocations (that is, = including the 'action' binding)?

This = is starting to seem all a bit hard. Unless someone has done it before, I = think I'll skip it.


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

= --Apple-Mail=_F1A392C1-78E5-42D0-9EC2-CD0E550E789E--