struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milan Milanovic <milanmilanov...@yahoo.com>
Subject Re: [Struts 2] Set action parameter - simple
Date Mon, 02 Jun 2008 16:05:52 GMT
The real question is following, why this doesn't work in Struts 2, i.e., value parameter for
<s:param is not generated:

<s:iterator value="pages"
    <s:url id="url" action="list.action" >    
      <s:param name="currentPage" value="%{property}"
</s:url>
</s:iterator>

where "pages" is a simple int [] ?

--
Thx in advance, Milan





Milan Milanovic <milanmilanovich@yahoo.com> wrote: I found what is the problem. I tried
to set this link in both ways, as:



       


and

 
value of this param is not written at all ? When I manually write
here e.g., value="2", then it works!

--
Thx, Milan



Milan Milanovic  wrote: I checked now and setCurrentPage method is not called at all ?

Musachy Barroso  wrote: That means it is not finding a value for that variable, try printing
it to the page and see if it has a value.

musachy

On Mon, Jun 2, 2008 at 9:34 AM, Milan Milanovic
 wrote:
> I tried this, but it doesn't set "currentPage" at all.
>
> Musachy Barroso  wrote: use this instead:
>
>
>
> musachy
>
> On Fri, May 30, 2008 at 11:48 AM, Milan Milanovic
>  wrote:
>> Hi,
>>
>> I have currentPage int attribute in my action class and I want when user click in
my jsp to set currentPage attribute. I tried it like this (pages is a list of int values):
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> But, curentPage is not set at all ? I checked in method which is response to the
"list.action", it is always 0. What is wrong here ?
>>
>> --
>> Thx, Milan
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



       

       

       
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message