struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kiley" <jhki...@summa-tech.com>
Subject Re: [Struts 2] Set action parameter - simple
Date Mon, 02 Jun 2008 16:13:32 GMT
Either use a more complex object than an int array, or use one of the
examples at http://cwiki.apache.org/WW/iterator.html.

On Mon, Jun 2, 2008 at 12:10 PM, Milan Milanovic <milanmilanovich@yahoo.com>
wrote:

> O.K. Thanks. But how can I get its value then in param ?
>
> Jim Kiley <jhkiley@summa-tech.com> wrote: Because integers don't have
> "property" fields.  You are essentially asking
> for pages.iterator().next().getProperty().
>
> On Mon, Jun 2, 2008 at 12:05 PM, Milan Milanovic
> wrote:
>
> > The real question is following, why this doesn't work in Struts 2, i.e.,
> > value parameter for
> >
> >
> >
> >
> >
> >
> >
> > where "pages" is a simple int [] ?
> >
> > --
> > Thx in advance, Milan
> >
> >
> >
> >
> >
> > Milan Milanovic  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
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>
>
>



-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message