[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: Re: CaptureResultCallback doesnt return anything
From: Taha Hafeez Siddiqi <tawus.tapestry () gmail ! com>
Date: 2013-06-30 9:43:41
Message-ID: E704BB18-1D09-461A-A488-DC9E105342B4 () gmail ! com
[Download RAW message or body]
Hi
You won't get the result as true/false are used by Tapestry itself(e.g. to see \
whether the event should be propagated further or not). Try returning some other type \
of value like an enumeration.
regards
Taha
On 30-Jun-2013, at 2:56 PM, Boris Horvat <horvat.z.boris@gmail.com> wrote:
> I have the code such as this
>
> CaptureResultCallback<Boolean> callback = new
> CaptureResultCallback<Boolean>();
> List<Object> eventContext = new ArrayList<Object>();
> if (context != null) {
> eventContext.addAll(Arrays.asList(context));
> }
> eventContext.add(value);
> this.resources.triggerEvent(UPDATE_EVENT, eventContext.toArray(),
> callback);
>
> Boolean isSuccess = callback.getResult();
> if (!isSuccess) {
> formFlowEdit.recordError("Unable to save value");
> }
>
> As well as
>
> @OnEvent(value = Edit.UPDATE_EVENT, component = "a")
> public boolean inSaveEvent(String o) {
> a = o + " yap it is saved 1";
> ajaxResponseRenderer.addRender(zone);
> return true;
> }
>
> Now everything runs ok (ie the value is properly propagated and all of
> that). However I just cant seem to get a valid result back. My result value
> (ie 'isSuccess' ) is null.
>
> What am I doing wrong here? Any ideas?
>
> Thanks
>
> --
> Sincerely
> *Boris Horvat*
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic