cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <mlundqui...@comcast.net>
Subject Re: [Cforms] How to reproduce the selection state?
Date Tue, 28 Jun 2005 09:23:33 GMT
Hi Stephan,

> Hello,
> 
> I need to bind a bean to a form using Cforms. My bean looks like this:
> 
> public class MyBean {
> 
> 	String name;
> 	String description;
> 	List cars;
> 
> 	// ... Setter and Getter here
> 
> 	// Returns the selected car
> 	String getSelectedCar()...
> }
> 
> I know how to bind this values to the form using the binding xml.
> 
OK...

But I
> don't know how to repoduce the selection state of the cars list coming form
> a presistence layer like the database. Let's say the bean contains the
> following values right after loading it from the database:
> 
> name = Foo
> description = Bar
> cars = {BMW, Audi, Peugeot}
> getSelectedCar = Audi
> 
I don't see the problem.  If cars and selectedCar are both bean 
properties, why should it make a difference what the values are or that 
they came from a database?


> How can I reproduce the form in order to select "Audi" in the dropdown box
> for cars automatically?
> 
It should "just work" (;-)... have you tried it?

—ml—



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message