2013-10-02 33 views
1

说,片段name="<%=(String) curItr.next()%>"返回shoppingList。在html:text标记中。连接字符串的名称属性Struts

我该如何使DOM元素的结果为shoppingList[0].anotherList[1]?我试图

name="<%=(String) curItr.next()%>" + shoppingList[0].anotherList[1],但它并不完全工作

完整的代码片段:

<html:text indexed="true" name="<%=(String) 
curItr.next()%>"+"[0]" property="<%=(String) curItr.next()%>"/> 
+0

DOM元素与什么? –

+0

只有一个字符串说“[0] .anotherList [1]” – LaneLane

+0

这是一个问题或答案? –

回答

0

这是不可读的,你不应该使用小脚本,使用JSTL了点。

<html:text property="propertyNameOfYourBean"/> 

对于您应该使用<c:forEach>标记的列表。

相关问题