That's a shame. I was hoping that Tapestry would have some native solution.
At least I'll be able to wrap it in a component. Otherwise, I will not get
approval to introduce Tapestry into our code base.

Thanks for your help. Could you please point me to any resources you used in
building this solution. I'm still learning a lot about Tapestry, and will
probably need a crutch or two.

Thanks

On 10/8/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
>
>
> Tom,
>
> I solved a problem similar to what you're describing, but I had to
> do an end-run around Tapestry to do it. Basically I've got a
> "dynamicblock"
> component that takes as its input a java bean and a list of field names.
> It
> then uses existing metadata and introspection to sort out the proper
> widgets
> for each field you want displayed.
>
> Then it writes out the widgets using good, old fashioned, java and
> sets their ids manually (they're not tapestry widgets). On the rewind, I
> then pull the widget's back out of the servletrequest by their IDs and use
> some old code of mine to set the bean's fields by name.
>
> It all works just fine for me, but it's basically an end-run around
> Tapestry.
>
> --- Pat
>
> > -----Original Message-----
> > From: news [mailto:[EMAIL PROTECTED] On Behalf Of tom
> > Sent: Saturday, October 08, 2005 8:23 AM
> > To: [email protected]
> > Subject: Re: Dynamic Web Forms
> >
> > Thanks for the quick reply. I believe this will help. However, a larger
> > problem
> > seems to be conditional display and validation. Is there a way to
> specify
> > conditional behavior? What I mean is that suppose I have queried my db
> for
> > the
> > questions to display on the form and I get back something like:
> >
> > ID Text Type DataType
> > 123 How many widgets do you want? TextField Numeric
> > 124 What's your favorite widget color? TextField String
> > 125 Do you ski? Checkbox Boolean
> >
> > I will then package this data into some kind of collection of objects
> and
> > make
> > this available to my Tapestry page.
> >
> > I see that it is possible to display these form elements. Is it possible
> > to show
> > different types of form elements based on the Type? Furthermore, is it
> > possible
> > to use the Tapestry validation mechanism that is appropriate for a
> > DataType
> > conditionally based on the DataType returned?
> >
> > I know how this type of situation is handled in CF. It usually requires
> a
> > lot of
> > hand coding of html and if-thens in a loop. Tapestry is much more
> elegant
> > in how
> > it handles Web forms, etc. so I am hoping that there is an equally
> elegant
> > solution for my problem.
> >
> > Forgive me for asking so many questions. I do not see any type of
> article
> > anywhere on the internet even slightly similar to my query. I very much
> > appreciate the insights of the users on this list.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to