Food for future thought - the way the event return value is used for
multiple purposes and may, or may not be passed to your callback seems
a little messy. Currently we have -

in ComponentPageElementImpl:

  ComponentEventCallback wrapped = new ComponentEventCallback() {
    public boolean handleResult(Object result) {
      // Boolean value is not passed to the handler; it will be true
(abort event)
      // or false (continue looking for event handlers).

      if (result instanceof Boolean)
          return (Boolean) result;

      return providedHandler.handleResult(result);
    }
  };

I guess I would rather the callback not be wrapped and instead have an
abstract implmentation for the default Boolean behaviour.

Steve.

--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"


On 21 March 2012 20:19, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> On Wed, 21 Mar 2012 00:28:25 -0300, Steve Eynon
> <steve.ey...@alienfactory.co.uk> wrote:
>
>> Hi,
>
>
> Hi!
>
>
>> So it seems Boolean is a 'reserved' event return value.
>
>
> 100% correct.
>
>
>> Is there
>> another way to determine if an event was aborted via a true return
>> value or do need to make my own Boolean enum?
>
>
> As you said, create your own class for the return value.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to