Re: unique ids for a select boxes

2008-11-18 Thread Steven Woolley
On Mon, Nov 17, 2008 at 10:24 AM, Peter Stavrinides <
[EMAIL PROTECTED]> wrote:

> This should be as straightforward as this:
>
>   blankOption="NEVER" value="selectedPlaylist"/>
>
> //gets the object on the client
> var selectList = document.getElementById("addSelect");
>


I ran into this same problem a while back.  It was very frustrating, I
believe it's because you are updating using a zone or another XHR call, so
even though your component is only rendered once, it's rendered multiple
times without a full page refresh, which is why tapestry adds the uniquifier
(not a real word).  There were two workaround proposed at the time (search
the list), one is a modified getElementById which searches for the prefix
(your original id), but this was too slow for my tastes, I instead now use
getElementbyId on something outside of the ajax updated stuff, then get the
appropriate select by type (this isn't very refactor friendly but worked
well enough for me).  If the above code works (can't test it myself right
now, but I think I tried that before and it didn't work as I wanted) then it
would be much more elegant.  IIRC it instead overwrites your id="" with the
unique t:id
Steve



>
>
>
> - Original Message -
> From: "Gabriel Rodriguez" <[EMAIL PROTECTED]>
> To: "Tapestry users" 
> Sent: Monday, 17 November, 2008 6:00:50 PM GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: RE: unique ids for a select boxes
>
>
> If I remember correctly, this will happen if you're creating more than
> one instance of it per page. Any id should be unique and Tapestry will
> help you achieve this whether you want it to or not. Anything else is
> bad form.
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:58 AM
> To: Tapestry users
> Subject: Re: unique ids for a select boxes
>
> Hi,
> Its gets stranger. That works for the first time I visit the page. The
> select box has the correct name. When I revisit the page the id has
> changed
> to :
>
> 
>
> From:
> 
>
> Any ideas why?
>
> CH
>
> On Mon, Nov 17, 2008 at 3:31 PM, Gabriel Rodriguez <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Try this:
> >
> >  > blankOption="NEVER" value="selectedPlaylist"/>
> >
> > -Original Message-
> > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 17, 2008 8:26 AM
> > To: Tapestry users
> > Subject: Re: unique ids for a select boxes
> >
> > Yes, it sets a unique id on the name e.g. select:12o34nkasi98
> >
> > I need to know the id to access the select box.
> >
> > CH
> >
> > On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
> > [EMAIL PROTECTED]> wrote:
> >
> > >
> > > Have you tried setting the clientId property?
> > >
> > > -Original Message-
> > > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, November 17, 2008 8:11 AM
> > > To: users@tapestry.apache.org
> > > Subject: unique ids for a select boxes
> > >
> > > Hi,
> > > I`m trying to find the id of a select component from the following
> > .tml
> > > file:
> > >
> > >  > > value="selectedPlaylist"/>
> > >
> > > The tapestry generated id when rendered in the browser has a unique
> > > identifier e.g. select:11daaf3019f  when means I cant access the
> > select
> > > box
> > > from my javascript.
> > >
> > > Can anyone point me in the right direction?
> > >
> > > CH
> > >
> > >
> -
> > > 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]
>
>


Re: unique ids for a select boxes

2008-11-18 Thread Paul Rayner
 
--
Paul Rayner ~ 07739143763 ~ [EMAIL PROTECTED]
Sent using BlackBerry®

-Original Message-
From: "Chris Hannam" <[EMAIL PROTECTED]>

Date: Mon, 17 Nov 2008 16:29:10 
To: Tapestry users
Subject: Re: unique ids for a select boxes


Thanks for the help, but I still cant see the problem.

I only have one instance of  wrote:

>
> If I remember correctly, this will happen if you're creating more than
> one instance of it per page. Any id should be unique and Tapestry will
> help you achieve this whether you want it to or not. Anything else is
> bad form.
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:58 AM
> To: Tapestry users
> Subject: Re: unique ids for a select boxes
>
> Hi,
> Its gets stranger. That works for the first time I visit the page. The
> select box has the correct name. When I revisit the page the id has
> changed
> to :
>
> 
>
> From:
> 
>
> Any ideas why?
>
> CH
>
> On Mon, Nov 17, 2008 at 3:31 PM, Gabriel Rodriguez <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Try this:
> >
> >  > blankOption="NEVER" value="selectedPlaylist"/>
> >
> > -Original Message-
> > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 17, 2008 8:26 AM
> > To: Tapestry users
> > Subject: Re: unique ids for a select boxes
> >
> > Yes, it sets a unique id on the name e.g. select:12o34nkasi98
> >
> > I need to know the id to access the select box.
> >
> > CH
> >
> > On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
> > [EMAIL PROTECTED]> wrote:
> >
> > >
> > > Have you tried setting the clientId property?
> > >
> > > -Original Message-
> > > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, November 17, 2008 8:11 AM
> > > To: users@tapestry.apache.org
> > > Subject: unique ids for a select boxes
> > >
> > > Hi,
> > > I`m trying to find the id of a select component from the following
> > .tml
> > > file:
> > >
> > >  > > value="selectedPlaylist"/>
> > >
> > > The tapestry generated id when rendered in the browser has a unique
> > > identifier e.g. select:11daaf3019f  when means I cant access the
> > select
> > > box
> > > from my javascript.
> > >
> > > Can anyone point me in the right direction?
> > >
> > > CH
> > >
> > >
> -
> > > 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]
>
>



Re: unique ids for a select boxes

2008-11-17 Thread Peter Stavrinides
have you tried to change "id" to "t:id" ? and add id as separate client side 
value? 

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Chris Hannam" <[EMAIL PROTECTED]>
To: "Tapestry users" 
Sent: Monday, 17 November, 2008 6:29:10 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: unique ids for a select boxes

Thanks for the help, but I still cant see the problem.

I only have one instance of  wrote:

>
> If I remember correctly, this will happen if you're creating more than
> one instance of it per page. Any id should be unique and Tapestry will
> help you achieve this whether you want it to or not. Anything else is
> bad form.
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:58 AM
> To: Tapestry users
> Subject: Re: unique ids for a select boxes
>
> Hi,
> Its gets stranger. That works for the first time I visit the page. The
> select box has the correct name. When I revisit the page the id has
> changed
> to :
>
> 
>
> From:
> 
>
> Any ideas why?
>
> CH
>
> On Mon, Nov 17, 2008 at 3:31 PM, Gabriel Rodriguez <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Try this:
> >
> >  > blankOption="NEVER" value="selectedPlaylist"/>
> >
> > -Original Message-
> > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 17, 2008 8:26 AM
> > To: Tapestry users
> > Subject: Re: unique ids for a select boxes
> >
> > Yes, it sets a unique id on the name e.g. select:12o34nkasi98
> >
> > I need to know the id to access the select box.
> >
> > CH
> >
> > On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
> > [EMAIL PROTECTED]> wrote:
> >
> > >
> > > Have you tried setting the clientId property?
> > >
> > > -Original Message-
> > > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, November 17, 2008 8:11 AM
> > > To: users@tapestry.apache.org
> > > Subject: unique ids for a select boxes
> > >
> > > Hi,
> > > I`m trying to find the id of a select component from the following
> > .tml
> > > file:
> > >
> > >  > > value="selectedPlaylist"/>
> > >
> > > The tapestry generated id when rendered in the browser has a unique
> > > identifier e.g. select:11daaf3019f  when means I cant access the
> > select
> > > box
> > > from my javascript.
> > >
> > > Can anyone point me in the right direction?
> > >
> > > CH
> > >
> > >
> -
> > > 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]



Re: unique ids for a select boxes

2008-11-17 Thread Chris Hannam
Thanks for the help, but I still cant see the problem.

I only have one instance of  wrote:

>
> If I remember correctly, this will happen if you're creating more than
> one instance of it per page. Any id should be unique and Tapestry will
> help you achieve this whether you want it to or not. Anything else is
> bad form.
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:58 AM
> To: Tapestry users
> Subject: Re: unique ids for a select boxes
>
> Hi,
> Its gets stranger. That works for the first time I visit the page. The
> select box has the correct name. When I revisit the page the id has
> changed
> to :
>
> 
>
> From:
> 
>
> Any ideas why?
>
> CH
>
> On Mon, Nov 17, 2008 at 3:31 PM, Gabriel Rodriguez <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Try this:
> >
> >  > blankOption="NEVER" value="selectedPlaylist"/>
> >
> > -----Original Message-
> > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 17, 2008 8:26 AM
> > To: Tapestry users
> > Subject: Re: unique ids for a select boxes
> >
> > Yes, it sets a unique id on the name e.g. select:12o34nkasi98
> >
> > I need to know the id to access the select box.
> >
> > CH
> >
> > On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
> > [EMAIL PROTECTED]> wrote:
> >
> > >
> > > Have you tried setting the clientId property?
> > >
> > > -Original Message-
> > > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, November 17, 2008 8:11 AM
> > > To: users@tapestry.apache.org
> > > Subject: unique ids for a select boxes
> > >
> > > Hi,
> > > I`m trying to find the id of a select component from the following
> > .tml
> > > file:
> > >
> > >  > > value="selectedPlaylist"/>
> > >
> > > The tapestry generated id when rendered in the browser has a unique
> > > identifier e.g. select:11daaf3019f  when means I cant access the
> > select
> > > box
> > > from my javascript.
> > >
> > > Can anyone point me in the right direction?
> > >
> > > CH
> > >
> > >
> -
> > > 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]
>
>


Re: unique ids for a select boxes

2008-11-17 Thread Peter Stavrinides
This should be as straightforward as this:



//gets the object on the client
var selectList = document.getElementById("addSelect");



- Original Message -
From: "Gabriel Rodriguez" <[EMAIL PROTECTED]>
To: "Tapestry users" 
Sent: Monday, 17 November, 2008 6:00:50 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: RE: unique ids for a select boxes


If I remember correctly, this will happen if you're creating more than
one instance of it per page. Any id should be unique and Tapestry will
help you achieve this whether you want it to or not. Anything else is
bad form.

-Original Message-
From: Chris Hannam [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2008 8:58 AM
To: Tapestry users
Subject: Re: unique ids for a select boxes

Hi,
Its gets stranger. That works for the first time I visit the page. The
select box has the correct name. When I revisit the page the id has
changed
to :



From:


Any ideas why?

CH

On Mon, Nov 17, 2008 at 3:31 PM, Gabriel Rodriguez <
[EMAIL PROTECTED]> wrote:

>
> Try this:
>
>  blankOption="NEVER" value="selectedPlaylist"/>
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:26 AM
> To: Tapestry users
> Subject: Re: unique ids for a select boxes
>
> Yes, it sets a unique id on the name e.g. select:12o34nkasi98
>
> I need to know the id to access the select box.
>
> CH
>
> On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Have you tried setting the clientId property?
> >
> > -Original Message-
> > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 17, 2008 8:11 AM
> > To: users@tapestry.apache.org
> > Subject: unique ids for a select boxes
> >
> > Hi,
> > I`m trying to find the id of a select component from the following
> .tml
> > file:
> >
> >  > value="selectedPlaylist"/>
> >
> > The tapestry generated id when rendered in the browser has a unique
> > identifier e.g. select:11daaf3019f  when means I cant access the
> select
> > box
> > from my javascript.
> >
> > Can anyone point me in the right direction?
> >
> > CH
> >
> >
-
> > 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]



RE: unique ids for a select boxes

2008-11-17 Thread Gabriel Rodriguez

If I remember correctly, this will happen if you're creating more than
one instance of it per page. Any id should be unique and Tapestry will
help you achieve this whether you want it to or not. Anything else is
bad form.

-Original Message-
From: Chris Hannam [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2008 8:58 AM
To: Tapestry users
Subject: Re: unique ids for a select boxes

Hi,
Its gets stranger. That works for the first time I visit the page. The
select box has the correct name. When I revisit the page the id has
changed
to :



From:


Any ideas why?

CH

On Mon, Nov 17, 2008 at 3:31 PM, Gabriel Rodriguez <
[EMAIL PROTECTED]> wrote:

>
> Try this:
>
>  blankOption="NEVER" value="selectedPlaylist"/>
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:26 AM
> To: Tapestry users
> Subject: Re: unique ids for a select boxes
>
> Yes, it sets a unique id on the name e.g. select:12o34nkasi98
>
> I need to know the id to access the select box.
>
> CH
>
> On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Have you tried setting the clientId property?
> >
> > -Original Message-
> > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 17, 2008 8:11 AM
> > To: users@tapestry.apache.org
> > Subject: unique ids for a select boxes
> >
> > Hi,
> > I`m trying to find the id of a select component from the following
> .tml
> > file:
> >
> >  > value="selectedPlaylist"/>
> >
> > The tapestry generated id when rendered in the browser has a unique
> > identifier e.g. select:11daaf3019f  when means I cant access the
> select
> > box
> > from my javascript.
> >
> > Can anyone point me in the right direction?
> >
> > CH
> >
> >
-
> > 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]



Re: unique ids for a select boxes

2008-11-17 Thread Chris Hannam
Hi,
Its gets stranger. That works for the first time I visit the page. The
select box has the correct name. When I revisit the page the id has changed
to :



From:


Any ideas why?

CH

On Mon, Nov 17, 2008 at 3:31 PM, Gabriel Rodriguez <
[EMAIL PROTECTED]> wrote:

>
> Try this:
>
>  blankOption="NEVER" value="selectedPlaylist"/>
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:26 AM
> To: Tapestry users
> Subject: Re: unique ids for a select boxes
>
> Yes, it sets a unique id on the name e.g. select:12o34nkasi98
>
> I need to know the id to access the select box.
>
> CH
>
> On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Have you tried setting the clientId property?
> >
> > -Original Message-
> > From: Chris Hannam [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 17, 2008 8:11 AM
> > To: users@tapestry.apache.org
> > Subject: unique ids for a select boxes
> >
> > Hi,
> > I`m trying to find the id of a select component from the following
> .tml
> > file:
> >
> >  > value="selectedPlaylist"/>
> >
> > The tapestry generated id when rendered in the browser has a unique
> > identifier e.g. select:11daaf3019f  when means I cant access the
> select
> > box
> > from my javascript.
> >
> > Can anyone point me in the right direction?
> >
> > CH
> >
> > -
> > 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]
>
>


RE: unique ids for a select boxes

2008-11-17 Thread Gabriel Rodriguez

Try this:



-Original Message-
From: Chris Hannam [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2008 8:26 AM
To: Tapestry users
Subject: Re: unique ids for a select boxes

Yes, it sets a unique id on the name e.g. select:12o34nkasi98

I need to know the id to access the select box.

CH

On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
[EMAIL PROTECTED]> wrote:

>
> Have you tried setting the clientId property?
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:11 AM
> To: users@tapestry.apache.org
> Subject: unique ids for a select boxes
>
> Hi,
> I`m trying to find the id of a select component from the following
.tml
> file:
>
>  value="selectedPlaylist"/>
>
> The tapestry generated id when rendered in the browser has a unique
> identifier e.g. select:11daaf3019f  when means I cant access the
select
> box
> from my javascript.
>
> Can anyone point me in the right direction?
>
> CH
>
> -
> 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]



Re: unique ids for a select boxes

2008-11-17 Thread Chris Hannam
Yes, it sets a unique id on the name e.g. select:12o34nkasi98

I need to know the id to access the select box.

CH

On Mon, Nov 17, 2008 at 3:21 PM, Gabriel Rodriguez <
[EMAIL PROTECTED]> wrote:

>
> Have you tried setting the clientId property?
>
> -Original Message-
> From: Chris Hannam [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2008 8:11 AM
> To: users@tapestry.apache.org
> Subject: unique ids for a select boxes
>
> Hi,
> I`m trying to find the id of a select component from the following .tml
> file:
>
>  value="selectedPlaylist"/>
>
> The tapestry generated id when rendered in the browser has a unique
> identifier e.g. select:11daaf3019f  when means I cant access the select
> box
> from my javascript.
>
> Can anyone point me in the right direction?
>
> CH
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: unique ids for a select boxes

2008-11-17 Thread Gabriel Rodriguez

Have you tried setting the clientId property?

-Original Message-
From: Chris Hannam [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2008 8:11 AM
To: users@tapestry.apache.org
Subject: unique ids for a select boxes

Hi,
I`m trying to find the id of a select component from the following .tml
file:



The tapestry generated id when rendered in the browser has a unique
identifier e.g. select:11daaf3019f  when means I cant access the select
box
from my javascript.

Can anyone point me in the right direction?

CH

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