You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Juan Maya <ma...@gmail.com> on 2007/05/23 06:09:47 UTC
T5: Obtain Select Component.
Hi all,
I am creating a new component that has 3 embedded Select components inside
of him. From this component i need to have references to the select
components. Any suggestions to do it?
For example, in my code i have:
@Component(id=???)
private Select monthSelect;
@Component(id=???)
private Select daySelect;
@Component(id=???)
private Select yearSelect;
how can i know or assign the id to a select component?
I have already tried to get them using the clientId property in the
template but it was useless.
Thanks
--
Juan
Re: T5: Obtain Select Component.
Posted by alvaro tovar <al...@gmail.com>.
thanks juan
On 5/23/07, Juan Maya <ma...@gmail.com> wrote:
>
> Sure..
> in the page template i have:
>
> <select t:id="month" model="monthModel" value="month" />
>
> and in tha java file
> @Component (id="month")
> private Select monthSelect;
>
> /**
> * @return the monthsModel
> */
> public SelectModel getMonthsModel() {
> if (this.monthsModel == null){
> this.monthsModel = SelectModelUtil.getMonthsModel(messages.get
> ("month-label"));
> }
> return this.monthsModel;
> }
>
>
> and the getters and setters.
>
> On 5/23/07, alvaro tovar <al...@gmail.com> wrote:
> >
> > hi juan, i am new user in t5, if you can show your code?
> >
> > alvaro
> >
> > On 5/22/07, Juan Maya <ma...@gmail.com> wrote:
> > >
> > > So i found out that i can change the id of the component with
> > > t:id. Pretty
> > > obvious.
> > > Sorry
> > >
> > > On 5/22/07, Juan Maya <ma...@gmail.com> wrote:
> > > >
> > > > Hi all,
> > > >
> > > > I am creating a new component that has 3 embedded Select components
> > > inside
> > > > of him. From this component i need to have references to the select
> > > > components. Any suggestions to do it?
> > > > For example, in my code i have:
> > > >
> > > >
> > > > @Component(id=???)
> > > > private Select monthSelect;
> > > >
> > > > @Component(id=???)
> > > > private Select daySelect;
> > > >
> > > > @Component(id=???)
> > > > private Select yearSelect;
> > > >
> > > > how can i know or assign the id to a select component?
> > > > I have already tried to get them using the clientId property in the
> > > > template but it was useless.
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > Juan
> > > >
> > >
> >
>
Re: T5: Obtain Select Component.
Posted by Juan Maya <ma...@gmail.com>.
Sure..
in the page template i have:
<select t:id="month" model="monthModel" value="month" />
and in tha java file
@Component (id="month")
private Select monthSelect;
/**
* @return the monthsModel
*/
public SelectModel getMonthsModel() {
if (this.monthsModel == null){
this.monthsModel = SelectModelUtil.getMonthsModel(messages.get
("month-label"));
}
return this.monthsModel;
}
and the getters and setters.
On 5/23/07, alvaro tovar <al...@gmail.com> wrote:
>
> hi juan, i am new user in t5, if you can show your code?
>
> alvaro
>
> On 5/22/07, Juan Maya <ma...@gmail.com> wrote:
> >
> > So i found out that i can change the id of the component with
> > t:id. Pretty
> > obvious.
> > Sorry
> >
> > On 5/22/07, Juan Maya <ma...@gmail.com> wrote:
> > >
> > > Hi all,
> > >
> > > I am creating a new component that has 3 embedded Select components
> > inside
> > > of him. From this component i need to have references to the select
> > > components. Any suggestions to do it?
> > > For example, in my code i have:
> > >
> > >
> > > @Component(id=???)
> > > private Select monthSelect;
> > >
> > > @Component(id=???)
> > > private Select daySelect;
> > >
> > > @Component(id=???)
> > > private Select yearSelect;
> > >
> > > how can i know or assign the id to a select component?
> > > I have already tried to get them using the clientId property in the
> > > template but it was useless.
> > >
> > > Thanks
> > >
> > > --
> > > Juan
> > >
> >
>
Re: T5: Obtain Select Component.
Posted by alvaro tovar <al...@gmail.com>.
hi juan, i am new user in t5, if you can show your code?
alvaro
On 5/22/07, Juan Maya <ma...@gmail.com> wrote:
>
> So i found out that i can change the id of the component with
> t:id. Pretty
> obvious.
> Sorry
>
> On 5/22/07, Juan Maya <ma...@gmail.com> wrote:
> >
> > Hi all,
> >
> > I am creating a new component that has 3 embedded Select components
> inside
> > of him. From this component i need to have references to the select
> > components. Any suggestions to do it?
> > For example, in my code i have:
> >
> >
> > @Component(id=???)
> > private Select monthSelect;
> >
> > @Component(id=???)
> > private Select daySelect;
> >
> > @Component(id=???)
> > private Select yearSelect;
> >
> > how can i know or assign the id to a select component?
> > I have already tried to get them using the clientId property in the
> > template but it was useless.
> >
> > Thanks
> >
> > --
> > Juan
> >
>
Re: T5: Obtain Select Component.
Posted by Juan Maya <ma...@gmail.com>.
So i found out that i can change the id of the component with t:id. Pretty
obvious.
Sorry
On 5/22/07, Juan Maya <ma...@gmail.com> wrote:
>
> Hi all,
>
> I am creating a new component that has 3 embedded Select components inside
> of him. From this component i need to have references to the select
> components. Any suggestions to do it?
> For example, in my code i have:
>
>
> @Component(id=???)
> private Select monthSelect;
>
> @Component(id=???)
> private Select daySelect;
>
> @Component(id=???)
> private Select yearSelect;
>
> how can i know or assign the id to a select component?
> I have already tried to get them using the clientId property in the
> template but it was useless.
>
> Thanks
>
> --
> Juan
>