Hi all,
I'm new to this forum and I've a problem while loading my data into a decorator.
Let me explain the scenario

I need to get the columns from the table dynamically and assign it to the decorator header. I did it. But taking the column header I need to get the entire table data dynamically. So i did like this

In my jsp page
<%String s="phoneNo("+dataLst.get(i).toString+")"%>

and while displaying the row
<display:column property=<%=s%> title='<%headerLst.get(i).toString%>'
But it's throwing me a class cast exception

Hereby i'm attaching the JSP and mentioning the values for the List which I used

finalLst is the main list which contains list of values

JSP Used

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<%@page import="java.util.*" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="/WEB-INF/lib/displaytag.tld" prefix="display"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<%java.util.ArrayList lst= new ArrayList();
lst=(ArrayList)request.getAttribute("headerlist"); %>
<%java.util.ArrayList fullDataLst= new ArrayList();
fullDataLst=(ArrayList)request.getAttribute("final List");
java.util.ArrayList dataLst=null;
int len=fullDataLst.size();
int count=lst.size();
String s="";
<display:table id="data" name="requestScope.finalList" requestURI="/Decorator.do" pagesize="5" >
<% for(int i=0;i<count;i++)
dataLst=new ArrayList();
for(int k=0;k<dataLst.size();k++)
System.out.println("dataLst.get(i).toString()"+dat aLst.get(k).toString());
s = "phoneNo("+dataLst.get(i).toString()+")";


<display:column property='<%=s %>' title='<%=lst.get(i).toString()%>' decorator="Struts.SampleDecorator"/>


Plz help me
Thanks in advance