Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

How to pass params with 'URL herf'

Mead Lai

2008-10-12

Replies: Find Java Web Hosting

Author LoginPost Reply
How to pass params with 'URL herf'?
well, the params data wanne pass to Model's property.
such, I have a "page" object in myAction, with get and set method.

public class myAction{
 private Page page;
}

public class Page{
public int index;
public int next;
}

my struts tag is :
<s:url id="url" action="myAction!list.action">
<s:param name="page.index">
12</s:param>
</s:url>

<s:a href="%{url}">Index Page</s:a>

and the url gen .action?page.index=12
can't set model value "page.index" in myAction

How shall I do wiht this?

--
BestRegards,
Mead
http://yayisoft.com

Spike Milligan - "All I ask is the chance to prove that money can't make me
happy."
©2008 gg3721.com - Jax Systems, LLC, U.S.A.