View Full Version : Display images with DataView or Portlet

22 Sep 2009, 7:30 AM

I'm very new to Ext JS here at our company. So I currently am overloaded with questions. Right now I have a problem displaying thumbnails in a panel. There are two options we think about. Much talk is about a portlet with a grid showing the thumbnail, but i'd rather use a DataView.

But HOW?!

With the DataView, the images come from a mySQL database. I can fetch the filename and its location. But what to do with it and why is there no tutorial to develop a simple DataView for images? Oh, and we don't use JSONstore, but XmlStore.

If a portlet with a grid is better, I already have this code:

$this->addColumn('id', 'Id', 50, 'auto', array('align' => 'right', 'fixed' => true));
$this->addColumn('title', 'Title', 157, 'auto', array());
$this->addColumn('type', 'Type', 77, 'auto', array());
$this->addColumn(array('added', 'added_by_id'), 'Added', 200, 'auto', array('columnMulti' => "<br>by "));
$this->addColumn(array('changed', 'changed_by_id'), 'Changed', 200, 'auto', array('columnMulti' => "<br>by "));

I think I should use two columns combined. But how to add the <img> tag with its src property? I got no clue.

Hopefully someone is prepared to help such a beginner :">.

Thx anyhow.