Re: Set the HTML id programmatically

2009-03-17 Thread OjO

I had run into the same situation even I setOutputMarkupId(true), the
setMarkupId just wouldn't work for me. What worked for me is
SimpleAttributeModifier. You may try:

 description.add ( new SimpleAttributeModifier (id, myDescription));



Martin Letendre wrote:
 
 I am usign this version of Wicket: 1.3.5
 
 1- I would like to override an id for a TextArea programmatically
 
 textarea wicket:id=description 
   id=toOverride
   name=description
   rows=10 
   cols=50   /textarea
  
 
 2- In my java code I tried this method
 
   TextArea description =  new TextArea(description);
   description.setMarkupId(myDescription);
   form.add(description);
 
 
 3- But it's not setting anything... Here is the generated HTML
 
 textarea cols=50 rows=10 wicket:id=description name=description
 id=toOverride/textarea
 
 :confused:
 
 Question: Is it possible to override the id programatically. Because it
 would be usefull in my integration between YUI and Wicket...
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p22568696.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Set the HTML id programmatically

2009-03-17 Thread Stephen Swinsburg
Wouldn't it be best to change the ID that the YUI is looking for to be  
the dynamic ID of your textarea?


Or set it in HTML and don't set outputMarkupId(true) so that the HTML  
one is used instead.
ie textarea wicket:id=somefield id=mytextarea rows=10  
cols=10default content/textarea


That will mean that Wicket will know about the 'somefield' textarea  
but won't output it's ID, and then YUI can access it by a static ID.


At least that is how I do it with jQuery.


--Steve





On 17/03/2009, at 9:55 PM, OjO wrote:



I had run into the same situation even I setOutputMarkupId(true), the
setMarkupId just wouldn't work for me. What worked for me is
SimpleAttributeModifier. You may try:

description.add ( new SimpleAttributeModifier (id,  
myDescription));




Martin Letendre wrote:


I am usign this version of Wicket: 1.3.5

1- I would like to override an id for a TextArea programmatically

textareawicket:id=description
id=toOverride
name=description
rows=10
cols=50   /textarea


2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);
   

3- But it's not setting anything... Here is the generated HTML

textarea cols=50 rows=10 wicket:id=description  
name=description

id=toOverride/textarea

:confused:

Question: Is it possible to override the id programatically.  
Because it

would be usefull in my integration between YUI and Wicket...





--
View this message in context: 
http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p22568696.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Set the HTML id programmatically

2009-03-17 Thread Jeremy Thomerson
Yes - this is the proper way to do it.  You should not be trying so hard to
override the ID generated by Wicket.  Lest, you will fail and then write
back to the list in a month and ask why such and such behavior or ajax
feature is not working, and it will be because of the messed up IDs.

See the YUI integration (or any JS integration) in wicketstuff.  Basically,
create a behavior that outputs:

YUI.doSomething( + component.getMarkupId() + );

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Mar 17, 2009 at 5:04 PM, Stephen Swinsburg 
s.swinsb...@lancaster.ac.uk wrote:

 Wouldn't it be best to change the ID that the YUI is looking for to be the
 dynamic ID of your textarea?

 Or set it in HTML and don't set outputMarkupId(true) so that the HTML one
 is used instead.
 ie textarea wicket:id=somefield id=mytextarea rows=10
 cols=10default content/textarea

 That will mean that Wicket will know about the 'somefield' textarea but
 won't output it's ID, and then YUI can access it by a static ID.

 At least that is how I do it with jQuery.


 --Steve






 On 17/03/2009, at 9:55 PM, OjO wrote:


 I had run into the same situation even I setOutputMarkupId(true), the
 setMarkupId just wouldn't work for me. What worked for me is
 SimpleAttributeModifier. You may try:

 description.add ( new SimpleAttributeModifier (id, myDescription));



 Martin Letendre wrote:


 I am usign this version of Wicket: 1.3.5

 1- I would like to override an id for a TextArea programmatically

 textarea   wicket:id=description
id=toOverride
name=description
rows=10
cols=50   /textarea


 2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);
   

 3- But it's not setting anything... Here is the generated HTML

 textarea cols=50 rows=10 wicket:id=description name=description
 id=toOverride/textarea

 :confused:

 Question: Is it possible to override the id programatically. Because it
 would be usefull in my integration between YUI and Wicket...




 --
 View this message in context:
 http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p22568696.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Set the HTML id programmatically

2008-11-24 Thread Martin Letendre

Works fine: thank you !


igor.vaynberg wrote:
 
 also need to call setoutputmarkupid(true)
 
 -igor
 
 On Fri, Nov 21, 2008 at 12:08 PM, Martin Letendre
 [EMAIL PROTECTED] wrote:

 I am usign this version of Wicket: 1.3.5

 1- I would like to override an id for a TextArea programmatically

 textarea   wicket:id=description
id=toOverride
name=description
rows=10
cols=50   /textarea


 2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);


 3- But it's not setting anything... Here is the generated HTML

 textarea cols=50 rows=10 wicket:id=description name=description
 id=toOverride/textarea

 :confused:

 Question: Is it possible to override the id programatically. Because it
 would be usefull in my integration between YUI and Wicket...


 --
 View this message in context:
 http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20665440.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Set the HTML id programmatically

2008-11-21 Thread Martin Letendre

I am usign this version of Wicket: 1.3.5

1- I would like to override an id for a TextArea programmatically

textarea   wicket:id=description 
id=toOverride
name=description
rows=10 
cols=50   /textarea
 

2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);


3- But it's not setting anything... Here is the generated HTML

textarea cols=50 rows=10 wicket:id=description name=description
id=toOverride/textarea

:confused:

Question: Is it possible to override the id programatically. Because it
would be usefull in my integration between YUI and Wicket...


-- 
View this message in context: 
http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Set the HTML id programmatically

2008-11-21 Thread James Carman
Have you tried using setMarkupId()?

On Fri, Nov 21, 2008 at 3:08 PM, Martin Letendre
[EMAIL PROTECTED] wrote:

 I am usign this version of Wicket: 1.3.5

 1- I would like to override an id for a TextArea programmatically

 textarea   wicket:id=description
id=toOverride
name=description
rows=10
cols=50   /textarea


 2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);


 3- But it's not setting anything... Here is the generated HTML

 textarea cols=50 rows=10 wicket:id=description name=description
 id=toOverride/textarea

 :confused:

 Question: Is it possible to override the id programatically. Because it
 would be usefull in my integration between YUI and Wicket...


 --
 View this message in context: 
 http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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]



RES: Set the HTML id programmatically

2008-11-21 Thread Bruno Cesar Borges
AttributeModifier does not work?

-Mensagem original-
De: Martin Letendre [mailto:[EMAIL PROTECTED]
Enviada em: sexta-feira, 21 de novembro de 2008 18:09
Para: users@wicket.apache.org
Assunto: Set the HTML id programmatically



I am usign this version of Wicket: 1.3.5

1- I would like to override an id for a TextArea programmatically

textarea   wicket:id=description 
id=toOverride
name=description
rows=10 
cols=50   /textarea
 

2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);


3- But it's not setting anything... Here is the generated HTML

textarea cols=50 rows=10 wicket:id=description name=description
id=toOverride/textarea

:confused:

Question: Is it possible to override the id programatically. Because it
would be usefull in my integration between YUI and Wicket...


-- 
View this message in context: 
http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

***
Atenção: Esta mensagem foi enviada para uso exclusivo do(s) destinatários(s) 
acima identificado(s),
podendo conter informações e/ou documentos confidencias/privilegiados e seu 
sigilo é protegido por 
lei. Caso você tenha recebido por engano, por favor, informe o remetente e 
apague-a de seu sistema.
Notificamos que é proibido por lei a sua retenção, disseminação, distribuição, 
cópia ou uso sem 
expressa autorização do remetente. Opiniões pessoais do remetente não refletem, 
necessariamente, 
o ponto de vista da CETIP, o qual é divulgado somente por pessoas autorizadas.


Warning: This message was sent for exclusive use of the addressees above 
identified, possibly 
containing information and or privileged/confidential documents whose content 
is protected by law. 
In case you have mistakenly received it, please notify the sender and delete it 
from your system. 
Be noticed that the law forbids the retention, dissemination, distribution, 
copy or use without 
express authorization from the sender. Personal opinions of the sender do not 
necessarily reflect 
CETIP's point of view, which is only divulged by authorized personnel.
***


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



Re: Set the HTML id programmatically

2008-11-21 Thread James Carman
Sorry, didn't see that second point there.  Disregard

On Fri, Nov 21, 2008 at 3:18 PM, James Carman
[EMAIL PROTECTED] wrote:
 Have you tried using setMarkupId()?

 On Fri, Nov 21, 2008 at 3:08 PM, Martin Letendre
 [EMAIL PROTECTED] wrote:

 I am usign this version of Wicket: 1.3.5

 1- I would like to override an id for a TextArea programmatically

 textarea   wicket:id=description
id=toOverride
name=description
rows=10
cols=50   /textarea


 2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);


 3- But it's not setting anything... Here is the generated HTML

 textarea cols=50 rows=10 wicket:id=description name=description
 id=toOverride/textarea

 :confused:

 Question: Is it possible to override the id programatically. Because it
 would be usefull in my integration between YUI and Wicket...


 --
 View this message in context: 
 http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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: Set the HTML id programmatically

2008-11-21 Thread Marc-Andre Houle
The attributeModifier behavior should do the trick.
description.add(new AttributeModifier(id, true, myDescription));

See here
http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/AttributeModifier.htmlfor
mor details.

Marc-Andre
On Fri, Nov 21, 2008 at 3:19 PM, Bruno Cesar Borges 
[EMAIL PROTECTED] wrote:

 AttributeModifier does not work?

 -Mensagem original-
 De: Martin Letendre [mailto:[EMAIL PROTECTED]
 Enviada em: sexta-feira, 21 de novembro de 2008 18:09
 Para: users@wicket.apache.org
 Assunto: Set the HTML id programmatically



 I am usign this version of Wicket: 1.3.5

 1- I would like to override an id for a TextArea programmatically

 textarea   wicket:id=description
id=toOverride
name=description
rows=10
cols=50   /textarea


 2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);


 3- But it's not setting anything... Here is the generated HTML

 textarea cols=50 rows=10 wicket:id=description name=description
 id=toOverride/textarea

 :confused:

 Question: Is it possible to override the id programatically. Because it
 would be usefull in my integration between YUI and Wicket...


 --
 View this message in context:
 http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 ***
 Atenção: Esta mensagem foi enviada para uso exclusivo do(s)
 destinatários(s) acima identificado(s),
 podendo conter informações e/ou documentos confidencias/privilegiados e seu
 sigilo é protegido por
 lei. Caso você tenha recebido por engano, por favor, informe o remetente e
 apague-a de seu sistema.
 Notificamos que é proibido por lei a sua retenção, disseminação,
 distribuição, cópia ou uso sem
 expressa autorização do remetente. Opiniões pessoais do remetente não
 refletem, necessariamente,
 o ponto de vista da CETIP, o qual é divulgado somente por pessoas
 autorizadas.


 Warning: This message was sent for exclusive use of the addressees above
 identified, possibly
 containing information and or privileged/confidential documents whose
 content is protected by law.
 In case you have mistakenly received it, please notify the sender and
 delete it from your system.
 Be noticed that the law forbids the retention, dissemination, distribution,
 copy or use without
 express authorization from the sender. Personal opinions of the sender do
 not necessarily reflect
 CETIP's point of view, which is only divulged by authorized personnel.

 ***


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




Re: Set the HTML id programmatically

2008-11-21 Thread Igor Vaynberg
also need to call setoutputmarkupid(true)

-igor

On Fri, Nov 21, 2008 at 12:08 PM, Martin Letendre
[EMAIL PROTECTED] wrote:

 I am usign this version of Wicket: 1.3.5

 1- I would like to override an id for a TextArea programmatically

 textarea   wicket:id=description
id=toOverride
name=description
rows=10
cols=50   /textarea


 2- In my java code I tried this method

TextArea description =  new TextArea(description);
description.setMarkupId(myDescription);
form.add(description);


 3- But it's not setting anything... Here is the generated HTML

 textarea cols=50 rows=10 wicket:id=description name=description
 id=toOverride/textarea

 :confused:

 Question: Is it possible to override the id programatically. Because it
 would be usefull in my integration between YUI and Wicket...


 --
 View this message in context: 
 http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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]