Yup, completely.

This is just an issue of getting @Parameter working properly then.  I defer
to Thiago.

Jonathan


> -----Original Message-----
> From: Keith Bottner [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 07, 2008 15:42
> To: Tapestry users
> Subject: Re: Treating a Component Like a Form Field
> 
> Jonathan,
> 
> Actually I use an underlying select with an Encoder, OptionModel and
> SelectionModel, I just wrap it all into a single component because it
> gets used in a number of places and it is easier to set the Encoder,
> OptionModel and SelectionModel once then to have multiple developers
> remember what to set each time they want a select control with a list
> of countries.
> 
> Make sense?
> 
> 
> On Oct 7, 2008, at 2:40 PM, Jonathan Barker wrote:
> 
> > Keith,
> >
> > Is there a particular reason that you created a custom component for
> > the
> > Country selection rather than just using the standard Select
> > component?  Is
> > it just that it gets used in a number of places, or was there another
> > reason?
> >
> > Jonathan
> >
> >
> >> -----Original Message-----
> >> From: Keith Bottner [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, October 07, 2008 14:59
> >> To: Tapestry users
> >> Subject: Re: Treating a Component Like a Form Field
> >>
> >> I have used @Parameter before but never like this. I am unsure how
> >> this would work.
> >>
> >> Right now inside of my component I have a field named selection and I
> >> have a public getter and setter so that I can retrieve this value
> >> from
> >> within the page that is using the component. I also have a @Property
> >> private Country country in a page that uses the component along
> >> with a
> >> @Component( id = "country" ) private CountrySelect countrySelect.
> >> After submitting the form the only way to retrieve what the user
> >> selected in the select drop down is to do
> >> countrySelect.getSelection(). The country field that is in the field
> >> does not get field. What I would like is to be able to NOT include
> >> the
> >> CountrySelect and just use the @Property Country country like the
> >> standard form controls.
> >>
> >> With all of that said, I do not see how @Parameter will make a
> >> difference. Is there some other use then the standard use supplying a
> >> parameter in a component template?
> >>
> >> Keith
> >>
> >> On Oct 6, 2008, at 5:22 PM, Thiago H. de Paula Figueiredo wrote:
> >>
> >>> Em Mon, 06 Oct 2008 18:03:13 -0300, Keith Bottner
> >>> <[EMAIL PROTECTED]> escreveu:
> >>>
> >>>> I created a custom component for displaying a selection list of
> >>>> countries. However, I have found that the only way for me to
> >>>> retrieve what the selection is from the component is to declare a
> >>>> @Component to that particular field and then request the value
> >>>> directly from the component. Is there no way to have a custom
> >>>> component act like a typical text field and have it assign the
> >>>> selection to a @Property without having to have a @Component
> >>>> designator?
> >>>
> >>> Have you tried adding a @Parameter to your component? This way, you
> >>> could bind it to page property (or page property property and so on
> >>> recursively).
> >>>
> >>> --
> >>> Thiago H. de Paula Figueiredo
> >>> Independent Java consultant, developer, and instructor
> >>> Consultor, desenvolvedor e instrutor em Java
> >>> http://www.arsmachina.com.br/thiago
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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]
> >
> >
> > ---------------------------------------------------------------------
> > 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to