Gaurav,

>  I need to get values of selected items from list i.e.
> 
> list.getManager().addEventListener("changeSelection", function(e) {
> 
> var currentItem = list.getManager().getSelectedItems();
> 
> });
>
> but I am getting object of the selected items only....
> 
> I need to get the original values from the list
> And is there any method to flush the values of the items of the
> List.....
> 
> Need urgent help

The objects are just objects - so when setting up the array that is used to 
initialise the list, simply add a couple more properties of the things you 
want. Here are some snippets:

on init:
   this._m_lData = []; 
   this._m_oThread = new qx.ui.listview.ListView(this._m_lData, dCols); 

   this._m_oThread.getPane().getManager().
     addEventListener("changeSelection", this._onThreadSelectionChanged,
     this);

loading new data:
   this._m_oThread.hide();
   while (this._m_lData.pop() != null)
      {
      ;
      }
   for (var nF = 0; nF < oResponse.length; nF++)
      {
      this._m_lData.push
         ({ 
         title : 
            {
            html : oResponse[nF].title, 
            icon : oResponse[nF].image, 
            iconWidth : 16, 
            iconHeight : 16 
            }, 
         author : {text : oResponse[nF].author}, 
         time :   {text : oResponse[nF].time}, 
         m_sFragmentID : oResponse[nF].id, 
         m_nFragmentTypeID : oResponse[nF].typeid
         });
      }
   this._m_oThread.update();
   this._m_oThread.show(); 

 
new selection:
qx.Proto._onThreadSelectionChanged = function(oEvent)
   {
   var oThreadItem = oEvent.getData()[0];
   //
   // Our viewer panel handles its own loading and displaying
   //
   this._m_oMessageViewer.LoadFragment(oThreadItem.m_sFragmentID,
           oThreadItem.m_nFragmentTypeID);
   }


Note that we access the properties of the object in the list when handling a 
selection.

Hugh

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to