繁体   English   中英

如何从表中的struts标记发送带有操作URL的参数

[英]How to send a parameter with an action URL from struts tag in a table

我正在表的struts 1中的标记中填充一些值。现在,我想使用URL(该表的超链接)发送该表的值。我可以调用该操作,但是无法使用网址。到目前为止,我所做的是,

<script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            $('#metalPager').dataTable( {

                "bFilter":true,
                "aoColumns": [ 
                    { "bSortable": true },              
                    { "bSortable": true },
                    { "bSortable": true },                  
                    { "bSortable": true }                                           
                ]                   

            } );
        } );
</script>




<table width='70%' align="center" cellpadding="0" cellspacing="0" border="1" name="userSTPForm" id="metalPager">
    <thead>
    <tr>
        <th>STATUS</th>
        <th>SAPCODE</th>
        <th>FIRST NAME</th>     
        <th>LAST NAME</th>                          



    </tr>
    </thead>
    <tbody>
        <logic:iterate name="listOfSTPUsers" id="listOfSTPUsersId" >
            <tr>
            <td><bean:write name="listOfSTPUsersId"  property="value"/></td>
            <td><html:link href="exelunitUpload.do?action_name=" ><bean:write name="listOfSTPUsersId"  property="sapcode"/></html:link></td>
            <td><bean:write name="listOfSTPUsersId"  property="firstname"/></td>
            <td><bean:write name="listOfSTPUsersId"  property="lastname"/></td>                                         
            </tr>
        </logic:iterate>
    </tbody>


</table>

这是我正在调用的操作。现在,如果我想发送带有URL的stpcode,我该怎么办? 有人请帮忙。

您正在建立html链接,可以使用JSP EL来获取参数的值。

<html:link href="exelunitUpload.do?stpcode=${listOfSTPUsersId.stpcode}" ><bean:write name="listOfSTPUsersId"  property="sapcode"/></html:link>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM