struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [SCAFFOLD] Elegant way to expose more than one object using Proc essAction
Date Mon, 22 Sep 2003 23:18:25 GMT

When using the Scaffold ProcessAction, a data-bean is instantiated by the
framework and it's execute() method is called, returning a ProcessResult
object to the view layer.

The ProcessResult object may contain a single object or a collection (of
values or objects).

Suppose I want to return to the view layer a collection of some sort AND a
single object which has nothing to do with that collection.

In order to do that, what I do now is to create another helper collection in
which I store both the single object\s and the collection I wish to send to
the view layer. Then I return this helper collection as a ProcessResult
object to the view layer, where I have to extract back both the collection
and the single object as separate entities, and define them as beans.

Is there a more elegant way to expose a number of objects\collections of
different types using a single call to ProcessAction?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message