you can call component.setoutputmarkupid(true); this will add a unique
id="foo" attr to the component's tag.
then somewhere in the code that generates javascript you can get the id by
calling component.getoutputmarkupid()
-igor
On 4/18/07, wicketmarsh <[EMAIL PROTECTED]> wrote:
I fully agre
I fully agree that I need to do it on client side,
can somebody tell me how to access wicket id compoent (in my case it is
addresscomponent which is not html element ) inside javascript.
thanks,
pradip
igor.vaynberg wrote:
>
> however/whatever he wants to do it needs to be done on the client.
however/whatever he wants to do it needs to be done on the client. having a
roundtrip to the server will not really work for something like this.
-igor
On 4/17/07, wicketmarsh <[EMAIL PROTECTED]> wrote:
I have address component added to form . this addresscompoent has address
details field.
I have address component added to form . this addresscompoent has address
details field.
onchange of listview's textbox I want to hide the address component.
since address component has only wicket id and it is not html element ,
how do i access this address compoent inside the script ?
thanks
As far as I can tell he did not want to hide just all other textfields but
other form parts.
Oh and the nulled/duplicated id's is only if you forget to add
.setOutputMarkupId(*true*);
to the individual components within the listview... (like me)
On 4/17/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote
why would all the ids be the same?
and why would you use the id. i would add a special class to the textfields,
and then using something like prototype do
onchange=hideothers(this);
function hideothers (t) {
var textfields=$$(class:myclass); // or whatever prototype syntax is
textfields.forea
Because id's will be all the same for a listview's generated textfields and
you want to read out the value I suppose try using "this" in the event.
function test(x){
alert(x.value);
}
On 4/17/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
you should do this through javascript, it would be kind
you should do this through javascript, it would be kinda insane to do a
roundtrip in textfield.onchange to do something like this.
-igor
On 4/16/07, wicketmarsh <[EMAIL PROTECTED]> wrote:
Hi
I am using Listview to render a list of TextField. I would like to add
onchnage event on textfield
Hi
I am using Listview to render a list of TextField. I would like to add
onchnage event on textfield so that any change in textfield value would make
other components invisible which are part the form.
Inside the form I tried to access the children of listview component but it
return null.