unique ids for a select boxes

2008-11-17 Thread Chris Hannam
Hi,
I`m trying to find the id of a select component from the following .tml
file:

t:select id=addTo model=playlistNames blankOption=NEVER
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


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:

 t:select id=addTo model=playlistNames blankOption=NEVER
 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 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 :

select id=addTo:11dab2a7236 name=addTo

From:
select id=addTo name=addTo

Any ideas why?

CH

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


 Try this:

 t:select id=addTo clientId=addTo model=playlistNames
 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:
 
  t:select id=addTo model=playlistNames blankOption=NEVER
  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
Thanks for the help, but I still cant see the problem.

I only have one instance of t:select id=addTo in the tml file. There must
be some sort of state being saved but I am unable to see where. Any ideas
how I can track down why this item is still there? I have no variables using
@persist.


CH

On Mon, Nov 17, 2008 at 4:00 PM, Gabriel Rodriguez 
[EMAIL PROTECTED] 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 :

 select id=addTo:11dab2a7236 name=addTo

 From:
 select id=addTo name=addTo

 Any ideas why?

 CH

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

 
  Try this:
 
  t:select id=addTo clientId=addTo model=playlistNames
  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:
  
   t:select id=addTo model=playlistNames blankOption=NEVER
   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]