You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by William Keller <Wi...@news.com.au> on 2004/06/15 01:09:18 UTC
Cascading selects (related menus)
Hi all,
I'm trying to implement a fairly complex form - something I'd do
quite easily in JSP's (if it wasn't for the painful session management). The
issue I have is, I'm implementing a form that has a select (let's call it,
make) and it has a related child select (called model), which has a related
child (called year). So, when I change Make, it resets Model and Year. If I
change Model, it resets Year. I've been able to get the guts of this to
work, but I can't for the life of me reset the other selects on the basis of
one changing. Has anyone had a similar problem they solved using Tapestry's
recommended practices?
Thanks in advance!
Will Keller
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Cascading selects (related menus)
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
What I do is use a Hidden component. The JavaScript on the PropertySelection components updates the
hidden field value on the client side before submitting the form. Inside the form'st listener
method, you can query the property set by the hidden field and use that to decide how to update the
models used by the PropertySelections. You'll want to set raw=true on the Hidden, and use a string
property.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: William Keller [mailto:William.Keller@news.com.au]
> Sent: Monday, June 14, 2004 7:09 PM
> To: 'tapestry-user@jakarta.apache.org'
> Subject: Cascading selects (related menus)
>
>
> Hi all,
> I'm trying to implement a fairly complex form - something I'd do
> quite easily in JSP's (if it wasn't for the painful session
> management). The
> issue I have is, I'm implementing a form that has a select
> (let's call it,
> make) and it has a related child select (called model), which
> has a related
> child (called year). So, when I change Make, it resets Model
> and Year. If I
> change Model, it resets Year. I've been able to get the guts
> of this to
> work, but I can't for the life of me reset the other selects
> on the basis of
> one changing. Has anyone had a similar problem they solved
> using Tapestry's
> recommended practices?
>
> Thanks in advance!
>
> Will Keller
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org