X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) X-Junk-Score: 0 [] X-KAS-Score: 0 [] From: "Ralf Schuchardt" Received: from mout.gmx.net ([212.227.17.21] verified) by selbstdenker.ag (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 25836790 for webobjects-dev@wocommunity.org; Sat, 08 May 2021 17:31:10 +0200 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=212.227.17.21; envelope-from=rasc@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620487850; bh=inaRRQDUr+yHY6YYqQQCEGMJO4A/h0VdhxRT+gum9Wg=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=Y3Ijc7B1x2LaEkrk9p9ax2/TrYghx/rVPCDWpXUQcRhCmlHPxj96ac8DD+x1RxbL/ +FOoKjDFaeM/VnDBEr+AXl5MUgA5Dld3ZqM4EP60skZUvZShNrfP8tCA/m9ZxAeiKo xiygTrq+/WzCDbiGeoC7pi0fDPv9+GYERBkdxGew= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.32] ([207.89.105.208]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MZTqg-1lznLT3G9W-00WW7L for ; Sat, 08 May 2021 17:30:49 +0200 To: "WebObjects & WOnder Development" Subject: Re: [WO-DEV] ERXRedirect unknownKeyException??? Date: Sat, 08 May 2021 17:30:18 +0200 X-Mailer: MailMate (1.14r5798) Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_76A698EF-D3CF-460F-9AAD-8FEAA31F3B92_=" Embedded-HTML: [{"plain":[1017,2069],"uuid":"537131C6-7311-4D0C-854C-F1AD31878D2A"}] X-Provags-ID: V03:K1:bWMiDYiYCaCi1zzdYWFj49zFfBJPKnprcF3LHUZ4GEk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earYCzqEXsdgd6/YsM5VxGwvqw5WrIMw3VAA/u1sgw03mue17T0shXQOR T/MSliPIovte0PZFFA6LTCYsRAYqcRhuWOzYubjNM10Gy0B37GeMNMXDi7/E2Ptiv1hUOs40h 93GDgQVX9My6JStLM0ncM0wPCWWYoDkp7GeYev+Atm9iYTYG4mJ2lweGXx05d6ngVYnaUYmCN QomGyIUGQQMmOU/Y35fHFeko+IUbCNb/UJqk9/WBl3a51Cc+rJtZ8glAbWu+i4DAgKm27oSUk RtSHNJ8kLfIwawSNjR5D1aJ8j7sNI9cnOQ4uZlkOYYvI3+Ksm8MQQ/Zu4j5/3zcanTZZw7ALp Jty+7ob9MNqtF9bePv/P1nV5AzlO++uXSp0PyuDgVRD7yEDczrVEbIFyu7J8QWbd1oTSw= --=_MailMate_76A698EF-D3CF-460F-9AAD-8FEAA31F3B92_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable I think you are getting the error because setting a binding also involves reading the value back, therefore all bindings should also have a getter method. ERXRedirect is supposed to be returned as a component in an action method. So instead of returning the thank you page, you would return an ERXRedirect instance. But this does probably not solve your problem, as you are already on the ThankYouPage. As most of the work is done in `ERXResponse.appendToResponse()` you may try to manually call this in ThankYouPage=E2=80=99s appendToResponse: ```Java public void appendToResponse(WOResponse aResponse, WOContext aContext) { if (noPayment) { ERXRedirect redirect =3D pageWithName(ERXRedirect.class); redirect.setComponent( redirectComponent ); redirect.appendToResponse(aResponse, aContext); } super.appendToResponse() } ``` This should set a location header and 302 response code and so redirect to the target page. Ralf On 8 May 2021, at 16:17, Markus Ruggiero (rucotec) wrote: > When I transfer to a payment page but this page sees that there is no > payment to be collected I want to directly jump further to the Thank > You page. Everything is component action, everything happens inside a > session. > > In my .wo, inside a WOConditional that triggers when there is no > payment needed > > >

No payment required at the moment

> > > > > > > > with the binding > > automaticallyContinue : ERXRedirect { > component =3D thankYouPage; > } > > In my java: > > public WOComponent thankYouPage() { > > invoiceRemoteRequest.setStatus(E_RemoteRequestStatus.DONE); > EOEditingContext ec =3D invoiceRemoteRequest.editingContext(); > ec.saveChanges(); > > notifyCoordinator(); > > RemoteActionThankYouPage nextPage =3D > pageWithName(RemoteActionThankYouPage.class); > nextPage.setInvoiceRemoteRequest(invoiceRemoteRequest); > return nextPage; > } > > And the result: > > message '[ er.extensions.appserver.ERXRedirect subcomponents: null > > valueForKey()]: lookup of unknown key: 'component'. > The WOComponent er.extensions.appserver.ERXRedirect does not have an > instance variable of the name component or _component, nor a method of > the name component, _component, getComponent, or _getComponent' object > ' er.extensions.appserver.ERXRedirect subcomponents: null >' key > 'component'> > > Calling the setter is ok, but why is it trying to call a getter? > What am I missing here? > > Thanks a lot > ---markus--- > > > Markus Ruggiero > > rucotec GmbH web https://rucotec.ch > Steinenvorstadt 79 email markus.ruggiero@rucotec.ch > 4051 Basel / Switzerland mobile +41 79 508 4701 --=_MailMate_76A698EF-D3CF-460F-9AAD-8FEAA31F3B92_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I think you are getting the error because setting a bindi= ng also involves reading the value back, therefore all bindings should al= so have a getter method.

ERXRedirect is supposed to be returned as a component in = an action method. So instead of returning the thank you page, you would r= eturn an ERXRedirect instance.

But this does probably not solve your problem, as you are= already on the ThankYouPage. As most of the work is done in ERXRes= ponse.appendToResponse() you may try to manually call this in Than= kYouPage=E2=80=99s appendToResponse:

public void appendToRe=
sponse(WOResponse aResponse<=
span style=3D"color: #333333">, WOContext aContext) {

    if (noPayment) {
        ERXRedirect redirect =3D pa=
geWithName(ERXRedirect.class);
        redirect.setComponent( r=
edirectComponent );
        redirect.appendToResponse(aResponse, aContext);
    }
    super.appendToRe=
sponse()
}

This should set a location header and 302 response code a= nd so redirect to the target page.

Ralf

On 8 May 2021, at 16:17, Markus Ruggiero (rucotec) wrote:=

When I transfe= r to a payment page but this page sees that there is no payment to be col= lected I want to directly jump further to the Thank You page. Everything = is component action, everything happens inside a session.

In my .wo, inside a WOConditional th= at triggers when there is no payment needed
<= div class=3D"">
<webobject name =3D "noPaymentRequested">
    <p>No<= /font> payment requi= red <= font color=3D"#acacac" class=3D"">at the moment<br /></p>
    <webobject name =3D "automaticallyContinue" />
</webobjec= t name =3D "noPaymentRequested=E2=80=9D<= span style=3D"color: #3f7f7f" class=3D"">>

<webobject name =3D "includePayment">
    <= /span><webobject= name =3D "paymentPanel" />
</webobject <= /span>name =3D "includePa= yment">

with the bindin= g

automati= callyContinue <= span style=3D"color: rgb(66, 66, 66);" class=3D"">: ERXRedirect {
    component =3D thankYouPage;
}

In my java:
<= /span>

public<= span style=3D"color: rgb(49, 49, 49);" class=3D""> WOComponent thankYouPage() {


    invoiceRemoteRequest.setStatus(E_RemoteRequestS= tatus.DONE);
    EOEditingContext ec =3D invoiceRemote= Request.= editingContext();
<= span style=3D"caret-color: rgb(49, 49, 49);" class=3D"">   &nbs= p;ec.saveChanges();


    notifyCoordinator();


&= nbsp;   RemoteActionThankYouPage nextPage =3D pageWithName(RemoteActionThankYouPage.class);
    nextPage.setInvoiceRemo= teRequest(invoiceRemoteRequest<= /span>);
<= div style=3D"margin: 0px; font-stretch: normal; font-size: 11px; line-hei= ght: normal; font-family: Monaco;" class=3D"">  &= nbsp; return nextPage;
}
And the result:
<= /span>

<com.webobjects.foundation.NSKeyValueCoding$UnknownKeyExcep= tion message '[<er.extensions.appserver.ERXRedirect name: er.ex= tensions.appserver.ERXRedirect subcomponents: null > valueForKey()]: l= ookup of unknown key: 'component'.
The WOComponent er.extensions.appse= rver.ERXRedirect does not have an instance variable of the name component= or _component, nor a method of the name component, _component, getCompon= ent, or _getComponent' object '<er.extensions.appserver.ERXRedirect na= me: er.extensions.appserver.ERXRedirect subcomponents: null >' key 'co= mponent'>

Calling the setter is ok, but why is it trying to call a getter? =
What am I missing here?

Thanks a lot
---marku= s---


Markus Ruggiero


rucotec GmbH        &n= bsp;               web https://rucotec.ch
Steinenvor= stadt 79&nbs= p;               email markus.ruggiero@rucotec.ch
4051 Basel / Switzerland         mobile +41 79 508 4701



<= /div>




--=_MailMate_76A698EF-D3CF-460F-9AAD-8FEAA31F3B92_=--