On Mon, 12 Jan 2015 09:46:12 -0200, Thilo Tanner
<[email protected]> wrote:
Hi all,
Hi!
I'm currently working on a report generation tool (using JasperReports
in the background). The reports will consist of multiple components.
Beside having "static" parameters, I will need runtime parameters shared
across the different components. The challenge I'm facing now, is to
create a dynamic form for this runtime parameters. I imagine to have a
Map<String, Class> or a similar construct calculated from the from the
different components. For example, the Map could look this:
"title" => java.lang.String
"date" => java.util.Date
"companies" => java.util.List<Company>
I think BeanEditor/BeanEditForm with BeanModel and one or more
custom-written PropertyConduits is the way to go. BeanEditor already
creates form fields dinamycally. In this case, the values you need to edit
don't come from Java properties, so create a BeanModel using
BeanModelSource and use BeanModel.add(String propertyName, PropertyConduit
conduit) to add your Map-backed properties. PropertyModel is in interface
used by BeanModel to get and set value.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]