Hi Michael,

> Thanks Josh, but do you have also a title property with getter and
> setter in your page class ?
>

No, I only have the video getter/setter


> And if yes (as I guess) whish value is updated when you submit the form
> : MyPage.title or MyPage.video.title  ?


The title property of the video object is updated, I don't have a title
property on my page class.

I can't compile anything right now, but I'll try to put together a small
example tonight, if someone else hasn't posted something by then.

Josh

On Nov 14, 2007 11:01 AM, Michael Courcy <[EMAIL PROTECTED]> wrote:

>
> Thanks Josh, but do you have also a title property with getter and
> setter in your page class ?
>
> And if yes (as I guess) whish value is updated when you submit the form
> : MyPage.title or MyPage.video.title  ?
>
> Josh Canfield a écrit :
>  >> I want to populate from the form directly to the bean. But this
> require
> >> to use either the beanEditForm or a custom component.
> >>
> >>
> >
> >
> > You can get this to work. I use the textfield component for editing my
> bean
> > objects. This is from a working emplate:
> > <input t:id="*title*" t:type="*textfield*" t:size="*40*" t:value="*
> > video.title*" t:validate="*required*" type="*text*" />
> >
> > My page class has a getVideo method which returns an object that has a
> > getTitle method.
> >
> > Good luck,
> > Josh
> >
> > On Nov 14, 2007 9:05 AM, Michael Courcy <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >> You're right
> >>
> >> here it is,  I remove the "offending input"
> >>
> >> and use this instead
> >>
> >> ${user}-- ${user.name}
> >>
> >> And I get
> >>
> >> [EMAIL PROTECTED] -- A name
> >>
> >> Obviously user is not null.
> >>
> >> I think the problem does not come from tapestry but from me.
> >> I want to populate from the form directly to the bean. But this require
> >> to use either the beanEditForm or a custom component.
> >>
> >> I 'm just influenced by other framework like struts2 for instance :
> >>
> >> If you have something like that in your form
> >>
> >> <input name="user.name" value="bla" />
> >>
> >> When the form is submitted struts2 tries to find if the controller
> >> features a user property, and then if user features a name property
> >> If the answer is yes to both it calls controller.getUser
> ().setName("bla");
> >>
> >>
> >>
> >>
> >>
> >> Ezra Epstein a écrit :
> >>  > I always pause when hearing "100% sure."  An easy check/test is to
> >> remove the offending <input> and stick in a simple ${user} and see if
> indeed
> >> you get the toString() value for your user object.
> >>
> >>> Michael Courcy <[EMAIL PROTECTED]> wrote: I'm 100% sure, user
> is
> >>>
> >> not null
> >>
> >>> I have a getter and a setter for both : name and user
> >>>
> >>> Thanks
> >>> Thiago H de Paula Figueiredo a écrit :
> >>>
> >>>
> >>>> On Wed, 14 Nov 2007 12:47:06 -0200, Michael Courcy
> >>>>  wrote:
> >>>>
> >>>>
> >>>>
> >>>>>  [input]
> >>>>>
> >>>>> I have to provide the setter and the getter for name and I still get
> >>>>> an error when I submit.
> >>>>>
> >>>>>
> >>>> What error? Make sure your user field is not null when the form is
> >>>> submited. Also make sure you have public getters and setters, because
> >>>> otherwise Tapestry cannot access them.
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >> --
> >> Michael Courcy
> >> http://courcy.blogspot.com
> >>
> >>
> >>
> >
> >
> >
>
>
> --
> Michael Courcy
> http://courcy.blogspot.com
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to