« Return to Thread: How to build table from List data

Re: How to build table from List<Hashtable> data

by Ashish Kulkarni-2 :: Rate this Message:

Reply to Author | View in Thread

Hi
Got the solution, this is how it is done

function showRouting(list)
{

document.getElementById("routing").style.visibility = "visible";
if(list !=null)
  {
    dwr.util.addRows("routingBody", list, cellFuncs,  { escapeHtml:false });
  }
}
var cellFuncs = [
  function(data) { return data.["NYNAME"]; },
   function(data) { return data.["ABC"]; },
   
 ];

This will build table row from data as from list containing hashtable List<Hashtable<String, Object>>



On Wed, Jul 1, 2009 at 4:50 PM, Ashish Kulkarni <ashish.kulkarni13@...> wrote:
Hi
One of my method returns data as List<Hashtable<String, String>> data
How can i build a table from this sort of data, i tried as below

function showRouting(list)
{

document.getElementById("routing").style.visibility = "visible";
if(list !=null)
  {
    dwr.util.addRows("routingBody", list, cellFuncs,  { escapeHtml:false });
  }
}
var cellFuncs = [
  function(data) { return data.get('NYNAME'); },
   function(data) { return data.get('ABC'); },
   
 ];

 « Return to Thread: How to build table from List data