cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@sun3.oulu.fi>
Subject Re: Prepopulating
Date Tue, 05 Apr 2005 16:57:32 GMT
André Thénot wrote:
> On Apr 4, 2005, at 9:06, Andre Juffer wrote:
> 
>> You can also access the database directly in your script. You could 
>> return some object from persistence, which you could use to populate 
>> your bean. Maybe it is possible to use that object as the bean for the 
>> form (not tried).
> 
> 
> IIRC, direct database access from javascript flowscripts is no longer 
> supported. But you can create a java object that talks to the database 
> and grabs values to place in the form if it's a new one. In other words, 
> handle both the form submissions and the form prepopulating from your 
> flowscript.

You are correct. This is way how it should be done. My formulation was 
not accurate.

Just wondering, it is therefore possible to let some java-based 
com.foo.Values object act as the bean for a form? Or is always required 
to let a javascript-based object in the flowscript act as the bean for a 
form, as the examples seem to imply. I have used the second approach.

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


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
The Biocenter and            | Fax: +358-8-553-1141
     the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/

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


Mime
View raw message