简体   繁体   中英

Pass bean:write value from Jsp to Action Class

I'm new to struts and I just can't get my head around this one.

candyViewJobs.jsp page has an array list displayed in a table like below

<form method="post" name="form">
                <table id='tableViewJobs'> 
                    <tr>
                        <th width="14%">Job Code</th>
                        <th width="14%">Job Name</th>
                        <th width="14%">Qualification Required</th>
                        <th width="16%">Skills</th>
                        <th width="14%">Experience Required</th>
                        <th width="14%">Vacancies</th>
                    </tr>
                    <logic:iterate name="view" id="jobs">
                    <tr>
                        <td><bean:write name="jobs" property="jcode"/></td>
                        <td><bean:write name="jobs" property="jname"/></td>
                        <td><bean:write name="jobs" property="qualify"/></td>
                        <td><bean:write name="jobs" property="skills"/></td>
                        <td><bean:write name="jobs" property="xp"/></td>
                        <td><bean:write name="jobs" property="vac"/></td>
                        <td><input type="button" value="Apply"/></td>
                        <td><input type="button" value="View More Details" onclick="location.href='viewDetails.do'"/></td>
                    </tr>                          
                    </logic:iterate>
                </table>      
            </form>

I need to call my action class and access the jcode which is unique to every mentioned job. How do i do it?

您可以使用<h:param value="jCode">传递jCode。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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