PDA

View Full Version : Hoping for a design suggestion



chrisz
17 Mar 2009, 7:48 AM
I'm just starting with ExtJS and was hoping for some suggestions from veterans. I have a LAMP, and need to implement a basic DB interface. However some of the data needs to be represented '3D' rather than a straight 2D matrix.
For example, assume a "Workers" DB table and an "Attributes" DB table. Workers are defined by Name, Dept, Phone#... and they have a 0-to-many relationship to Attributes.

Name | Dept | Phone# | Attributes
bob | r&d | xxx-xxxx | tall, happy
sally | hr | xxx-xxxx |
hulk | acc't | xxx-xxxx | huge, green, mad

In practice, the attribute list for each 'worker' can be quite large. I'd like to display some sort of matrix for Name | Dept | Phone#, and then on an event (click, mouseover, etc) Ajax the attributes and display them as well. Of course I also want to *edit* the records & corresponding attributes... so I can't really just concatenate the the attributes & dump them into a single display element.

Does anyone have UI design suggestions on how to display, and then edit, data like this? Maybe the "Grid Data Binding" thingy or the "Binding Grid to Form" doohicky?

Thanks much

mjlecomte
17 Mar 2009, 7:51 AM
Data binding example sounds ok. Saki has an example displaying the 1:n using tooltips on his site: www.extjs.eu

harley.333
17 Mar 2009, 10:19 AM
I've written a FormWindow class (derived from Ext.Window and contains a Ext.form.FormPanel). I also wrote a custom plugin for my grids which displays a toolbar. The toolbar contains add/edit/delete buttons and shows the FormWindow. The FormWindow allows edits to the details of the grid's selected row.

It works very well. :)