You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mead Lai <la...@gmail.com> on 2008/10/13 05:58:18 UTC

How to pass Model.value params with 'URL herf'?

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

Mel Brooks  - "Tragedy is when I cut my finger. Comedy is when you fall into
an open sewer and die."