File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

adding a value to bean:write property="???"

 
satish jupalli
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want to concatenate the empFirstName with empno and set it as a property for bean:write. please suggest me a way out after having look at the following code.

<c:forEach var="empNo" begin="1" end="${numberOfEmployees}">

<bean:write name="EmpInfoForm" property="empFirstName (concatinate the empNo here so that it will become a property)" filter="true" />

</c:forEach>

Is there is any way i can do it, without writing a separate scriptlet.

something like
<bean:write name="EmpInfoForm" property=
"empFirstName${empNo} " filter="true" />

Thx in advance.
satish
 
alan do
Ranch Hand
Posts: 354
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you missed the basic of c:forEach and c ut using simple Collection and java beans. you are forcing iteration through counter index instead of using the iterators supported by JSTL. please see http://javaboutique.internet.com/tutorials/Struts_EL/ for better approaches.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic