View Full Version : Ext.Grid in Domino forms?
philiphachey
06-14-2007, 12:46 PM
I've used a variation of the following in the past:
http://www.vincedimascio.com/members/vince/vpd.nsf/All/796AF9EE7337EA158825712D008198EB
Basically, using Domino multi-value fields to represent column data of a table, and various fields on the form to act as the "Input Area" for the table -- to both create new rows, and edit existing ones.
However, I'm interested in using Ext's Grid (and maybe Ext's Form) to render (and access) this kind of Domino data.
It would do something like:
- Load columns from hidden multi-value fields.
- Keep hidden multi-value fields updated as the table changes
- Additions and Editing of table to be done using various INPUT fields and action buttons
For example:
Name: [ ]
Address: [ ]
[[Add/Save Record]]
Name Address
----- --------
John 123 Abc St. [[Remove]] [[Edit]]
Jane 789 Xyz Rd. [[Remove]] [[Edit]]
Hidden Fields:
NameCol: "John" : "Jane"
AddressCol: "123 Abc St." : "789 Xyz Rd."
Has anyone coded (or thought about coding) something similar to this and willing to share your work and/or advice?
I've spent a couple of hours trying to figure out the best way to approach this using Ext's API, and while I've got some idea, I'm not seeing any easy way to go about it. I'm not even clear how to dynamically add a new record to the table -- perhaps add it to the Store and redraw the table, then use a listener on the Store to update the multi-value fields?
jratcliff
06-14-2007, 06:53 PM
I've used a variation of the following in the past:
http://www.vincedimascio.com/members/vince/vpd.nsf/All/796AF9EE7337EA158825712D008198EB
Basically, using Domino multi-value fields to represent column data of a table, and various fields on the form to act as the "Input Area" for the table -- to both create new rows, and edit existing ones.
However, I'm interested in using Ext's Grid (and maybe Ext's Form) to render (and access) this kind of Domino data.
It would do something like:
- Load columns from hidden multi-value fields.
- Keep hidden multi-value fields updated as the table changes
- Additions and Editing of table to be done using various INPUT fields and action buttons
For example:
Name: [ ]
Address: [ ]
[[Add/Save Record]]
Name Address
----- --------
John 123 Abc St. [[Remove]] [[Edit]]
Jane 789 Xyz Rd. [[Remove]] [[Edit]]
Hidden Fields:
NameCol: "John" : "Jane"
AddressCol: "123 Abc St." : "789 Xyz Rd."
Has anyone coded (or thought about coding) something similar to this and willing to share your work and/or advice?
I've spent a couple of hours trying to figure out the best way to approach this using Ext's API, and while I've got some idea, I'm not seeing any easy way to go about it. I'm not even clear how to dynamically add a new record to the table -- perhaps add it to the Store and redraw the table, then use a listener on the Store to update the multi-value fields?
I've been thinking about this one as well. I'll probably play around with this over the next few days and if I get something working I'll post it here. My plan is to take these multi-value fields and load their data into an array and then use Ext's ArrayReader to read in the data from the array to populate a grid.
becomcs
06-15-2007, 04:30 AM
I've used a variation of the following in the past:
http://www.vincedimascio.com/members/vince/vpd.nsf/All/796AF9EE7337EA158825712D008198EB
I've spent a couple of hours trying to figure out the best way to approach this using Ext's API, and while I've got some idea, I'm not seeing any easy way to go about it. I'm not even clear how to dynamically add a new record to the table -- perhaps add it to the Store and redraw the table, then use a listener on the Store to update the multi-value fields?
As you said, it's an Ext issue, not an Ext.nd ;). (subtil difference) I maid some similar GUI when I used YUI.
Look into http://extjs.com/deploy/ext/docs/index.html and go to
-Example and Demos/Grid/Basic grid from data array.
Then convert your multivalues fields into js array using a js function. In YUI ther were JSFunction datasource kind. Perhaps you need to find a workaround to do this, because I don't know If Ext provide similar process.
You have also to handle delete, add and modify from the grid to manage and update your background datasource. This imply having all multivalues field used to simulate a table into your grid (some can be hidden ex UNID).
If your table contain many multivalues fields then your issue is out there (as truth somtimes :"> ).
You certainly have to pull out all multivalues fields into another form as monovalues fields and manage a foreign key (could be $REF).
In this case your complexe Ext issue became a simple Ext.nd issue.
Hope this help you. Cheer up!
philiphachey
06-15-2007, 02:57 PM
You have also to handle delete, add and modify from the grid to manage and update your background datasource. This imply having all multivalues field used to simulate a table into your grid (some can be hidden ex UNID).
This part is a little muddy for me, but I haven't yet had time to fully get my head around Ext's Grid and Store. When adding a row using user-input "form" or dialog data, does one add a new Record to the Store and use Ext's event model to update the Grid and synchronize the hidden multivalue fields?
If your table contain many multivalues fields then your issue is out there (as truth somtimes :"> ).
You certainly have to pull out all multivalues fields into another form as monovalues fields and manage a foreign key (could be $REF).
In this case your complexe Ext issue became a simple Ext.nd issue.
Thanks for the suggestion. My tables are rarely more than a half dozen columns wide and are less than 20 rows, which is why I chose to use multivalue fields -- it's more convenient to keep all the data with the document, especially for things like full-text searching.
Thank you for this reply!
becomcs
06-15-2007, 04:57 PM
When adding a row using user-input "form" or dialog data, does one add a new Record to the Store and use Ext's event model to update the Grid and synchronize the hidden multivalue fields?
As I said I done It with YUI. So I think it can be done with Ext.
My tables are rarely more than a half dozen columns wide and are less than 20 rows
Half-dozen column, 20 rows? response/multivalues fields? Somes deal with that for centuries.
It's more a philosophical point of view than a technical constraint.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.