File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes problem in html:link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in html:link" Watch "problem in html:link" New topic

problem in html:link

Sh Rgh

Joined: Sep 20, 2006
Posts: 4
hi all,

I am using html:link in my project. when i click on the link
i need to get file name from the html:select.

<html:link action="">

In html:select multiple attribute is true. and user can select more than one from the list. i am using String array in the property attribute and which has getter and setter property in the form.

The problem is while i am clicking on the link the the getter and setter method was not called.The reset method in my form was called.
so the i could not get the filename which was selecte by the user.

This works well in the html:submit button.but not working in the html:link.

please help me

Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
The problem with using a basic link tag is that when the user clicks the link all the values that they have entered into the current page are lost. It seems like you could either 1) use JavaScript in your link tag to submit the page and add logic into the Action class or 2) use JavaScript to build a complete URL that included the needed values as parameters.

- Brent
I agree. Here's the link:
subject: problem in html:link
jQuery in Action, 3rd edition