You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Shanthi Vikas <sh...@msn.com> on 2004/09/11 01:59:46 UTC
CForms: Binding to Array Objects, is it possible?
Hi!
Is it possible to bind one form to array of objects?
Example:
I have a DB table top_picknic_spots with two foreign key columns:
frn_country_id
frn_pickic_location_id
In Cforms I can display country as drop down select box
and two multi valued select boxes(all available and top list) , one lists
all the picnick spots in the
selected state and admin user can select some from the list and add it to
top_list.
I have bean with two fields one mapped(bind) to frn_country and other to
frn_pick_location_id.
Now the question is: if user selects a state and some pickink spots (say 5)
and hits submit,
then I should get 5 bean objects(array) with frn_state_id (same for all
beans) and different picknick ids.
can some one help me how to achive this with CForms? is it possible with out
writing extra java code/classes?
I am using OJB, so If it is possible then I can use the OJB class as bean
and on submit I can take that array and directly store to DB using PB.store.
Thanks for the help and also thanks for the great product!!!!
_________________________________________________________________
Check out Election 2004 for up-to-date election news, plus voter tools and
more! http://special.msn.com/msn/election2004.armx
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org