novi border
unread,Nov 1, 2011, 4:30:33 PM11/1/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
Hi,
I come from a Tapestry and GWT backgrounds so I am learning the play way of doing stuff..
I love it for simple pages and server apis, but now I am trying to make a more complex page,
which are not to hard with Tapestry or GWT, but I am learning play and would like to hear what
the play gurus recommend..
Task:
I want to have a single page in which to edit some interconnected objects. I want to have one
edit page with Parent object, which has many Child, which in turn have many Grandchild.
All objects are JPA entities. I am using jquery as a helper for showing/hiding parts of ui and other
simple stuff.
I would like to edit all of them as one unit, on the same page. As there are usually only few Children
per parent, and also Grandchildren, it seems that i could render a form with fields for all the needed
objects and subobjects, with most of them initially hidden from user. More details would be displayed
when the user clicks/expands portions of the form.
So far so good..
The part I am wandering about is how to structure form field ids to get the most from the automatic
binding. Ideally it would all bind to a single Parent instance in controller method which would also
understand ids of entities and perform insert, update or delete as needed. Or maybe bind to a Parent,
List<Child> and a List<Grandchild> and managing the JPA sync manually..
What would you recommend? Other approaches? Ajax seems like an overkill for this as the amount
of data is not too large and it would require having the current object graph stored somewhere on
the server, probably the cache, and having it synchronized withe the database on save. I kind
of prefer simple html form and updating in a single step where all the state is stored in the form.
NB