I'd keep the combo boxes in an array list. When the form was submitted, I'd read through the array list, capture the values into some structure, and send that structure in my RPC method call. If the values were submitted in a FormPanel, I'd put the values into a JSON list and assign a Hidden field the string value.
On Monday, February 27, 2012 5:00:34 AM UTC-5, pimuri wrote:
Hi All,--
I'm new to using GWT (Version 2.4 with Eclipse).
I have a question about dynamic forms.
For a web application I would like to make a dynamic form with two
columns of comboboxes. At the beginning only one combobox (cb1_1) on
the left column exists. As soon as a value has been chosen from this
first combobox, a new combobox will be created in the the right column
(cb1_2). When a value is chosen in that combobox a new line will be
started (again first only the left column combobox, etc). The right
column combobox is always dependant on the chosen value in the right
column combobox.
Following a bad timeline sketch of the two columns:
- = new combobox (no value chosen yet)
O = combobox where user has chosen a value
1)
- row 1
2)
O- row 1
3)
OO row 1
- row 2
4)
OO row 1
O- row 2
5)
OO row 1
OO row 2
- row 3
etc
My questions to you....
- How would you implement this? Would you first define a limit of rows
and prepare the comboboxes in the background, hide them and disable
them until needed or would you create them dynamically?
- How would you create a common handler for either all of the
comboboxes or at least for each column?
Thank you for any help/comments.
pimuri
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/0mOAiT0l3YQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment