struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Beal <jbb...@gmail.com>
Subject Re: Trouble with <html:link> and params
Date Wed, 12 Oct 2005 19:35:19 GMT
On 10/12/05, Faisal Mahmoud <faisalmahmoud33@gmail.com> wrote:
> I need to construct a table of files available for download. A file is
> downloaded by hitting the /download.do?jobId=2 action. The info for
> each row in the table is stored in an action form called
> retrieveJobsFormBean. This actionform contains a List of DownloadJob
> objects. Each of these objects is a javabean with 3 fields: jobId,
> numberFiles and fileSize.
>
> I wish to put the job id value that I print out in the first division
> of a table row into the download link as a param. But I'm not sure how
> to do it. I tried the following code, but it didn't work.

What about it didn't work?  Did the link text not show up or did
clicking on the link fail?  If clicking on the link failed, do a View
Source and see what shows up.  That should help to pinpoint the
problem.

> <tr><td>Job ID</td><td>Number of Files</td><td>File
Size</td></tr>
> <logic:iterate id="job" name="retrieveJobsFormBean" property="jobs"
> scope="request">
> <tr>
>         <td><bean:write name="job" property="jobId"/></td>
>         <td><bean:write name="job" property="numberFiles"/></td>
>         <td><bean:write name="job" property="fileSize"/><bean:message
> key="retrievejob.page.defaultfilesize"/></td>
>         <td><html:link name="job"  action="downloadFile.do" paramId="jobId"
> paramName="retrieveJobsFormBean" paramProperty="jobId"><bean:message
> key="retrievejog.page.downloadlink"/></html:link></td>
> </tr>
> </logic:iterate>
> </table>

If the link text didn't show up, my guess is that you need to change
'retrievejog' to 'retrievejob' in the last <bean:message /> element.

>
> --
> http://www.quidprocode.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message