<logic:iterate id="aaa" name="arraylistxxx" scope="request">
<bean:define id="b" name="aaa" property="b"></bean:define>
<bean:define id="c" name="aaa" property="c"></bean:define>
<%
String url = "upd_showSingleWindow('"+b+"','"+c+"')";
%>
<bean:write name="aaa" property="a"/>
<html:link href="#" onclick="<%=url%>">修 改</html:link>
</logic:iterate>

解决方案 »

  1.   

    提示Define tag cannot set a null value的错误???
    <logic:present name="returnAllExch" scope="request">
    <logic:iterate id="allExch" name="returnAllExch" indexId="index" scope="request">
    <tr>
    <td class="td_select">
    joke,here is checkbox
    </td>
    <td><bean:write name="allExch" property="code"/></td>
    <bean:define id="ls_exchId" name="allExch" property="exchId"></bean:define>
    <bean:define id="ls_areaId" name="allExch" property="areaId"></bean:define>
    <%
    String scriptFunction = "upd_showSingleWindow('"+ls_exchId+"','"+ls_areaId+"')";
    %>
    <td class="td_update">
    <html:link styleClass="b" href="#" onclick="<%=scriptFunction%>">修 改</html:link>
    </td>
    </tr>
    </logic:iterate></logic:present>这是我的部分代码真实搞不懂啊感觉上是可以的阿
      

  2.   

    提示Define tag cannot set a null value的错误???说明你的javaBean中的 b 或 c为 null,你在看看!
      

  3.   

    可是试试<a href="#" onclick="upd_showSingleWindow('<bean:write name="aaa" property="b"/>','<bean:write name="aaa" property="c"/>')">修 改</a>如果可以变通的话,就不一定非得用struts标签嘛