azizlabib2015 / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

${bean.firstname} does not display the real values #219

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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!

Original issue reported on code.google.com by ptma2...@gmail.com on 30 Sep 2009 at 3:25

GoogleCodeExporter commented 8 years ago
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.

Original comment by jeff.johnston.mn@gmail.com on 30 Sep 2009 at 3:46

GoogleCodeExporter commented 8 years ago
It's fixed with code <%@ page isELIgnored="false" %>.

Because EL Expression was ignored in Struts2.

Thanks!

Original comment by ptma2...@gmail.com on 30 Sep 2009 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by jeff.johnston.mn@gmail.com on 20 Oct 2009 at 8:17