This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Problem with html:link paramName and paramId Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with html:link paramName and paramId" Watch "Problem with html:link paramName and paramId" New topic
Author

Problem with html:link paramName and paramId

Pramod Kumar
Ranch Hand

Joined: Oct 05, 2007
Posts: 40
I have a HashSet(users) in the session scope.

I need to generate hyperlinks dynamically with the parameters in the HashSet

following is the code..



<logic:iterate name="users" id="usr" scope="session">

<html:link action="/updateuser.do" paramId="user" paramName="user" paramProperty="userId"><bean:write name="usr" property="userId"/></html:link>
</logic:iterate>


I am able to print the userId and the same value is not generating to the parameter.


How can I bulid the hyperlink dynamically?

Thanks
Ranjit Gopinathan
Ranch Hand

Joined: Jul 03, 2007
Posts: 46
<logic:iterate name="users" id="usr" scope="session">

<html:link action="/updateuser.do" paramId="user" paramName="usr" paramProperty="userId"><bean:write name="usr" property="userId"/></html:link>
</logic:iterate>

paramName should be "usr" isnt it??.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with html:link paramName and paramId
 
Similar Threads
problem with url rewriting in sturts link
Struts. How to submit ID of the selected object.
Bean-based hyperlink not working
Hidden variable
html:link in logic:iterate