CellTable - Editor Framework - Object deep hierarchy (objects of objects)

173 views
Skip to first unread message

Alfredo Quiroga-Villamil

unread,
Jun 14, 2012, 11:45:01 AM6/14/12
to google-we...@googlegroups.com
I would be interested in any advice/approaches I can get at this point
regarding the usage of CellTable in conjunction (if possible) with the
Editor Framework. More details below.

========
Hierarchy
========

- Suppose you have a Set of Objects of type A.

- A contains a Set of objects of Type B.

- B contains a Set of objects of Type C.

Say you now wanted to represent the previously described relation via
Grids (CellTable).

====
View
====

- A Table in a center panel showing an editable list of objects A.

- An East Panel with two regions (North/South). Where the North Region
shows the list of editable B object. The South region shows the list
of editable C objects.

The workflow for this would be something along these lines:

- Once the list of A objects is loaded into the CellTable, the
associated sub-editors should be all linked together. In other words,
something that comes to mind would be upon loading the list of A
objects, select the first row in the CellTable. Upon selection, all
sub-editors (List B and it's sub-editor C) would then be populated
(edit) in the UI. The first row of sub-editor B would also need to be
selected to trigger population of the C List.

- Since the A Editor along with it's subeditors can all perform
add/remove operations, the entire workflow would need to be kept in
sync for edit/flush operations.

=====
Driver:
=====

RequestFactory

I have some ideas on how to accomplish this, but would really
appreciate some feedback since I am not 100% sure on how to best go
about it.

Thanks in advance for any help.

Alfredo

--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton

Thomas Broyer

unread,
Jun 14, 2012, 12:13:06 PM6/14/12
to google-we...@googlegroups.com


On Thursday, June 14, 2012 5:45:01 PM UTC+2, Alfredo Quiroga-Villamil wrote:
I would be interested in any advice/approaches I can get at this point
regarding the usage of CellTable in conjunction (if possible) with the
Editor Framework. More details below.

========
Hierarchy
========

- Suppose you have a Set of Objects of type A.

- A contains a Set of objects of Type B.

- B contains a Set of objects of Type C.

Say you now wanted to represent the previously described relation via
Grids (CellTable).

====
View
====

- A Table in a center panel showing an editable list of objects A.

I'm really not sure the Editor framework is the best fit here.
To begin with, it doesn't play well with CellTable unless you're spending some time building a "queue of changes" (as in http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellSampler with an explicit "commit", which corresponds to the editor's flush())
 
- An East Panel with two regions (North/South). Where the North Region
shows the list of editable B object. The South region shows the list
of editable C objects.

If all you have are editable lists of objects, you'd probably better manage them "by hand", and directly editing the objects, rather than with the Editor framework and its edit/flush flow.

Alfredo Quiroga-Villamil

unread,
Jun 14, 2012, 12:53:07 PM6/14/12
to google-we...@googlegroups.com
Really appreciate the response and help.

This is definitely saving me a lot of time and confirms my previous
suspicions. It really felt like my idea was "forcing it to happen". It
wasn't flowing and that is usually a good indication for me to
hesitate and re-think the approach or look for guidance as I did in
this case.

"I'm really not sure the Editor framework is the best fit here"

This is the second time I think I see that statement, specifically
related to CellTable and Editors. I know this might be kind of a hard
question to answer, but here it goes. When should the Editor framework
be considered a good fit? In other words, what criteria can be used or
what do you recommend to more or less have an idea that the Editor
framework might be a good fit?

Thanks again for the help.
> --
> 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/-/V7KIzUeTP34J.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.

Thomas Broyer

unread,
Jun 14, 2012, 1:49:18 PM6/14/12
to google-we...@googlegroups.com
Basically when the editors fit nicely in the edit/flush flow.
This is not the case with CellTwble which notifies you whenever a property changes, vs. waiting for you to flush the changes in batch. This can be worked around quite easily by queueing the changes as in the Showcase, but when you *only* have CellTables it's probably not worth the trouble.

Alfredo Quiroga-Villamil

unread,
Jun 14, 2012, 1:52:26 PM6/14/12
to google-we...@googlegroups.com
Makes sense, thanks again for the help.

Alfredo

On Thu, Jun 14, 2012 at 1:49 PM, Thomas Broyer <t.br...@gmail.com> wrote:
> Basically when the editors fit nicely in the edit/flush flow.
> This is not the case with CellTwble which notifies you whenever a property changes, vs. waiting for you to flush the changes in batch. This can be worked around quite easily by queueing the changes as in the Showcase, but when you *only* have CellTables it's probably not worth the trouble.
>
> --
> 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/-/KqkRkx_CxHEJ.
Reply all
Reply to author
Forward
0 new messages