PDA

View Full Version : DefaultColumnModel::setRenderer()



christocracy
18 Oct 2006, 4:05 PM
Hello again.

I have a need to render a list of items, which will include an image thumbnail. it happens to be a list of Albums



+-----+ Album Title
| img | Release Date
| |
+-----+

+-----+ Album Title
| img | Release Date
| |
+-----+

+-----+ Album Title
| img | Release Date
| |
+-----+



Jack...what in your toolkit can I take advantage of?

currently, I do manual DOMNode creation.

shall I use DomHelper.Template?

I've had a look at how things are done in ext.grid.GridView::render()

* this list will never be longer than a page. most artists have < 10 albums.

jack.slocum
18 Oct 2006, 4:17 PM
This is exactly what DomHelper.Template is for. You can even include an already created template in your HTML document and just use it's innerHTML.

christocracy
18 Oct 2006, 4:19 PM
right on time.

ok. DomHelper.Template it is.

I'll create a template on server and send it back in the JSON response.

Cheers, Jack

Chris

jack.slocum
18 Oct 2006, 4:21 PM
Yep that's perfect. The templates + named parameters work great with JSON data.

By the way, I put up the new layout manager post. :D