DataGrid

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

DataGrid

SpiffyJr
I was curious what everyone is using for DataGrids. I am aware of
http://petala-azul.com/blog/ as well as
http://code.google.com/p/zend-framework-datagrid/ and there is also the
possibility of Dojo Grids. Any input would be appreciated.

--
Kyle Spraggs (SpiffyJr)
http://www.spiffyjr.me

Kyle S
blogs @ www.spiffyjr.me
github @ www.github.com/spiffyjr
follow @ www.twitter.com/spiffyjr
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

weierophinney
Administrator
-- Kyle Spraggs <[hidden email]> wrote
(on Tuesday, 22 September 2009, 08:10 AM -0500):
> I was curious what everyone is using for DataGrids. I am aware of  
> http://petala-azul.com/blog/ as well as  
> http://code.google.com/p/zend-framework-datagrid/ and there is also the  
> possibility of Dojo Grids. Any input would be appreciated.

I use dojox.grid.DataGrid exclusively for grids -- it's trivial to feed
from ZF, and incredibly flexible.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

Matthew Ratzloff
In reply to this post by SpiffyJr
Ext JS (primarily Ext.grid.GridPanel).  We have some pretty stringent needs for data grid functionality, and--with plugins--this meets our needs.  I've written quite a bit of code for facilitating communication with the back end which perhaps I'll release at some point in early 2010.

-Matt

On Tue, Sep 22, 2009 at 6:10 AM, Kyle Spraggs <[hidden email]> wrote:
I was curious what everyone is using for DataGrids. I am aware of http://petala-azul.com/blog/ as well as http://code.google.com/p/zend-framework-datagrid/ and there is also the possibility of Dojo Grids. Any input would be appreciated.

--
Kyle Spraggs (SpiffyJr)
http://www.spiffyjr.me
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

Cameron
In reply to this post by SpiffyJr
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

weierophinney
Administrator
-- Cameron <[hidden email]> wrote
(on Wednesday, 23 September 2009, 09:42 AM +0800):
> Dojo grids. I've actually just moved a lot of my functionality over to Dojo
> JsonRestStore so I can do in-grid editing, it's not completed yet, but so far
> it is coming together really smoothly.

I'm planning on doing a blog post on this combination (Zend_Rest_Route +
dojox.data.JsonRestStore + dojox.grid.DataGrid) -- the three work
together incredibly well, and make CRUD interfaces a breeze.

> On Tue, Sep 22, 2009 at 9:10 PM, Kyle Spraggs <[hidden email]> wrote:
>
>     I was curious what everyone is using for DataGrids. I am aware of http://
>     petala-azul.com/blog/ as well as http://code.google.com/p/
>     zend-framework-datagrid/ and there is also the possibility of Dojo Grids.
>     Any input would be appreciated.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

Cameron
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

Cameron
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

weierophinney
Administrator
-- Cameron <[hidden email]> wrote
(on Thursday, 24 September 2009, 02:53 PM +0800):

> On Thu, Sep 24, 2009 at 8:38 AM, Cameron <[hidden email]> wrote:
>     On Wed, Sep 23, 2009 at 6:49 PM, Matthew Weier O'Phinney <[hidden email]>
>     wrote:
>         -- Cameron <[hidden email]> wrote
>         (on Wednesday, 23 September 2009, 09:42 AM +0800):
>         > Dojo grids. I've actually just moved a lot of my functionality over
>         to Dojo
>         > JsonRestStore so I can do in-grid editing, it's not completed yet,
>         but so far
>         > it is coming together really smoothly.
>
>         I'm planning on doing a blog post on this combination (Zend_Rest_Route
>         +
>         dojox.data.JsonRestStore + dojox.grid.DataGrid) -- the three work
>         together incredibly well, and make CRUD interfaces a breeze.
>
>
>     So far I'm finding the same, it's a match made in heaven, except for some
>     reason the grid doesn't seem to be triggering on edits. I can't see any
>     ajax hits in firebug. Anyway, I'm sure it's my fault, I'll work it out!
>
>
> Ok, so I'm dumb, you need to manually call store.save().

I was about to write back and mention that you need to trigger
store.save() -- glad you found it. (In my identifier column, I typically
add a "save" button to trigger this.)

> Matthew, one thing that your post should cover over is the handling of error
> conditions - I'm struggling to find any examples of neatly dealing with what
> happens if your controller decides it's not happy with the data and has to let
> the store know so it can deal with the situation appropriately.

When you call store.save(), you can pass onError and onComplete
callbacks. In the case of an error, I return an HTTP 400 status with a
JSON payload with my error messages, and then popup a dialog indicating
what needs to be changed; for success messages, I use a notification
system (currently one derived from
http://blog.uxdriven.com/2009/09/08/making-your-own-growl-widget-with-dojo/)

The place that problems occur is when I add new rows -- Dojo generates a
unique hash for the ID, but that means that if I save() a second time,
JsonRestStore tries to do a PUT (update) request -- and I have an
invalid identifier. I'm still trying to work out that part of the
equation.


>         > On Tue, Sep 22, 2009 at 9:10 PM, Kyle Spraggs <[hidden email]>
>         wrote:
>         >
>         >     I was curious what everyone is using for DataGrids. I am aware of
>         http://
>         >     petala-azul.com/blog/ as well as http://code.google.com/p/
>         >     zend-framework-datagrid/ and there is also the possibility of
>         Dojo Grids.
>         >     Any input would be appreciated.
>
>         --
>         Matthew Weier O'Phinney
>         Project Lead            | [hidden email]
>         Zend Framework          | http://framework.zend.com/
>
>
>
>

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

SpiffyJr
In reply to this post by weierophinney

Matthew Weier O'Phinney-3 wrote
-- Cameron <themselves@gmail.com> wrote
(on Wednesday, 23 September 2009, 09:42 AM +0800):
> Dojo grids. I've actually just moved a lot of my functionality over to Dojo
> JsonRestStore so I can do in-grid editing, it's not completed yet, but so far
> it is coming together really smoothly.

I'm planning on doing a blog post on this combination (Zend_Rest_Route +
dojox.data.JsonRestStore + dojox.grid.DataGrid) -- the three work
together incredibly well, and make CRUD interfaces a breeze.

> On Tue, Sep 22, 2009 at 9:10 PM, Kyle Spraggs <theman@spiffyjr.me> wrote:
>
>     I was curious what everyone is using for DataGrids. I am aware of http://
>     petala-azul.com/blog/ as well as http://code.google.com/p/
>     zend-framework-datagrid/ and there is also the possibility of Dojo Grids.
>     Any input would be appreciated.

--
Matthew Weier O'Phinney
Project Lead            | matthew@zend.com
Zend Framework          | http://framework.zend.com/
I don't mean to steal your thunder but that's exactly what I'm using and am in the middle of writing a blog post. :)
Kyle S
blogs @ www.spiffyjr.me
github @ www.github.com/spiffyjr
follow @ www.twitter.com/spiffyjr
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

Fabio Napoleoni
In reply to this post by SpiffyJr
I use (and I'm very happy with it) Jquery Grid: http://www.trirand.com/blog/ 

I use ZendX_JQuery* for ZF integration and it works like a charm...

Kyle Spraggs wrote
I was curious what everyone is using for DataGrids. I am aware of
http://petala-azul.com/blog/ as well as
http://code.google.com/p/zend-framework-datagrid/ and there is also the
possibility of Dojo Grids. Any input would be appreciated.

--
Kyle Spraggs (SpiffyJr)
http://www.spiffyjr.me
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

Cameron
In reply to this post by SpiffyJr
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

ajgarlag
In reply to this post by weierophinney
Hi folks, I've just subscribed the mailing lists.

Matthew Weier O'Phinney-3 wrote
The place that problems occur is when I add new rows -- Dojo generates a
unique hash for the ID, but that means that if I save() a second time,
JsonRestStore tries to do a PUT (update) request -- and I have an
invalid identifier. I'm still trying to work out that part of the
equation.
Matthew, I had a similar problem last week working with a dijit.Tree widget and a JsonRestStore at the client side (with dojo 1.3.2), and a Zend_Rest_Controller at the server side. The key to solve it is that when you create a new item, the model should make a POST request to create it at the server. This post request sends an additional header with de Content-Id that dojo has assigned to the new created item.

When the item it's created at the server side, that content-id it's stored at a temporary array as the key, and the real id for that item as the value. Then, when a PUT request is received to update an item with an ID that match this pattern /^[\da-f]{12}@\w*$/, the action looks at the temporary array, and find the real ID of the item which should be updated.

You can find some info at http://www.sitepen.com/blog/2009/01/26/new-in-jsonreststore-13-dates-deleting-conflict-handling-and-more/ (Section: In Transaction Referencing)

--
Antonio José García Lagar
http://aj.garcialagar.es
aj@garcialagar.es
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

weierophinney
Administrator
In reply to this post by Cameron
-- Cameron <[hidden email]> wrote
(on Friday, 25 September 2009, 03:57 PM +0800):

> On Fri, Sep 25, 2009 at 2:28 AM, Kyle Spraggs <[hidden email]> wrote:
>     Matthew Weier O'Phinney-3 wrote:
>     > -- Cameron <[hidden email]> wrote
>     > (on Wednesday, 23 September 2009, 09:42 AM +0800):
>     >> Dojo grids. I've actually just moved a lot of my functionality over to
>     >> Dojo
>     >> JsonRestStore so I can do in-grid editing, it's not completed yet, but
>     so
>     >> far
>     >> it is coming together really smoothly.
>     >
>     > I'm planning on doing a blog post on this combination (Zend_Rest_Route +
>     > dojox.data.JsonRestStore + dojox.grid.DataGrid) -- the three work
>     > together incredibly well, and make CRUD interfaces a breeze.
>     >
>     >> On Tue, Sep 22, 2009 at 9:10 PM, Kyle Spraggs <[hidden email]>
>     wrote:
>     >>
>     >>     I was curious what everyone is using for DataGrids. I am aware of
>     >> http://
>     >>     petala-azul.com/blog/ as well as http://code.google.com/p/
>     >>     zend-framework-datagrid/ and there is also the possibility of Dojo
>     >> Grids.
>     >>     Any input would be appreciated.
>     >
>     > --
>     > Matthew Weier O'Phinney
>     > Project Lead            | [hidden email]
>     > Zend Framework          | http://framework.zend.com/
>     >
>     >
>
>     I don't mean to steal your thunder but that's exactly what I'm using and am
>     in the middle of writing a blog post. :)
>
> I've got the whole lot working pretty nicely at the moment, just trying to work
> out how best to do inline Selects - trying to get a dojox.data.KeyValueStore to
> attach. It'd be nice to have a KVS and just grab the options autocomplete style
> from a json-providing url!

I wrote a grid cell widget for that. Look in dojox/grid/cells/_base.js
and dijit.js for the ComboBox widget; it's pretty easy to use that as a
template for a FilteringSelect that can be used as an editor widget in
the cells.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
Reply | Threaded
Open this post in threaded view
|

Re: DataGrid

weierophinney
Administrator
In reply to this post by ajgarlag
-- ajgarlag <[hidden email]> wrote
(on Friday, 25 September 2009, 01:56 AM -0700):

> Hi folks, I've just subscribed the mailing lists.
> Matthew Weier O'Phinney-3 wrote:
> > The place that problems occur is when I add new rows -- Dojo generates a
> > unique hash for the ID, but that means that if I save() a second time,
> > JsonRestStore tries to do a PUT (update) request -- and I have an
> > invalid identifier. I'm still trying to work out that part of the
> > equation.
>
> Matthew, I had a similar problem last week working with a dijit.Tree widget
> and a JsonRestStore at the client side (with dojo 1.3.2), and a
> Zend_Rest_Controller at the server side. The key to solve it is that when
> you create a new item, the model should make a POST request to create it at
> the server. This post request sends an additional header with de Content-Id
> that dojo has assigned to the new created item.
>
> When the item it's created at the server side, that content-id it's stored
> at a temporary array as the key, and the real id for that item as the value.
> Then, when a PUT request is received to update an item with an ID that match
> this pattern /^[\da-f]{12}@\w*$/, the action looks at the temporary array,
> and find the real ID of the item which should be updated.
>
> You can find some info at
> http://www.sitepen.com/blog/2009/01/26/new-in-jsonreststore-13-dates-deleting-conflict-handling-and-more/
> (Section: In Transaction Referencing)

Awesome - I'll look into that some more. Thanks for the information!

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/