This is my approach which works well for me.

I use the following method for dynamic columns, where:

-rowList is an extended List containing row beans
-rowList also holds column titles in an array
-row beans are a List of column beans
-the column beans could be e.g. just plain Strings, but in my case they are
of different custom types and I use the decorator to get their formatted
values

Simplified table configuration:

<display:table id="table1" name="pageScope.rowList">
  <c:forEach items="${rowList.titles}" var="title" varStatus="status">
    <display:column property="[${status.index}]" title="${title}"
decorator="columnDecorator"/>
  </c:forEach>
</display:table>


-Kurt



jill juneja wrote:
> 
> I have made further progress.
> 
> To me it looks like jstl issue rather than display tag.
> Some how I can not use ${variablename}  in display tag.
> 
> cout works. but i can not c out inside title.
> so following code works - but i am not able to get title. I have hardcoded
> title as a.  Any help is apprecited
> 
>    <display:table uid="item" name="items">
>        <c:forEach var="cl" items="${item.innerBeans }" varStatus="index1">
>            <display:column title="a"><c:out value="${item.innerBeans [
> index1.index].currYearExpenditure}"/></display:column>
>        </c:forEach>
>    </display:table>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-Column-Creation-tf3634653.html#a10177047
Sent from the DisplayTag - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to