struts-user mailing list archives

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

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?

Thanks,
Noam


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message