| Issue 219: | ${bean.firstname} does not display the real values | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I have a project working on Struts2.
1. In Action
List<Map> items = new ArrayList<Map>();
for(int i=1;i<50;i++){
Map p = new HashMap();
p.put("id", i);
p.put("firstname", "Name "+i);
p.put("nickname", "Nickname "+i);
items.add(p);
}
request.setAttribute("presidents", items);
2. In JSP
<form name="presidentsForm" action="test.action">
<jmesa:tableFacade
id="test"
items="<%=(java.util.List) request.getAttribute
("presidents")%>"
maxRows="15"
exportTypes="csv,excel,pdf"
maxRowsIncrements="15,30,50"
stateAttr="restore"
var="bean"
>
<jmesa:htmlTable caption="Presidents" width="100%">
<jmesa:htmlRow>
<jmesa:htmlColumn property="firstname"
title="First Name"> ${bean.firstname} </jmesa:htmlColumn>
<jmesa:htmlColumn property="nickname" title="Last
Name"/>
<jmesa:htmlColumn property="id"/>
</jmesa:htmlRow>
</jmesa:htmlTable>
</jmesa:tableFacade>
</form>
But the first column allways display "${bean.firstname}" in table.
??
thanks!
Sep 30, 2009
It's fixed with code <%@ page isELIgnored="false" %>. Because EL Expression was ignored in Struts2. Thanks!
Oct 20, 2009
(No comment was entered for this change.)
Status:
Invalid
|
What is your servlet container and the version (Tomct 6, Websphere 6)? The servlet 2.4 containers will resolve the EL expressions automatically. The ones before that have to use the <c:out value="${bean.firstname}"/> like syntax.