Event with more then one Type

0 views
Skip to first unread message

Norman Maurer

unread,
Jun 25, 2009, 2:26:09 PM6/25/09
to gwt-mvc
Hi,

maybe I just missed something about gwt-mvc but there is something
which is not clear for me at the moment.

I need to fire a event which has more then one Type binded.. How could
I do so ? I suspect I could just do it via a List Object but that not
seems like a "clean" solution to me...

For example I need something like this:

Event(T,T.....,V)

Any ideas ?

Francois Wauquier

unread,
Jun 26, 2009, 4:29:44 AM6/26/09
to gwt-mvc
Hello

Why dont use a list as the value of the event?
with the simple use of Arrays.asList(Object... )
controller.call(new Event<List,MyAction>(MyAction.DO,Arrays.asList
(o1,o2)));

If you have different objects that you want to pass in the event,
maybe you can create an object that contains the different objects,
and maybe use a form instead of a simple view (because a view giving
many values is maybe a form).
Try to find an object/concept that fit to this aggregation.
It is a choice to have only one value per event, to avoid to pass too
much thing in an event.

--
François Wauquier
Reply all
Reply to author
Forward
0 new messages