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. regards pradip Robbert Vergeten wrote: > > 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.foreach(function(tf,i) { if (tf!=t) { tf.setstyle >> ("display:none;");}} >> } >> >> -igor >> >> >> On 4/17/07, Robbert Vergeten <[EMAIL PROTECTED]> wrote: >> >> > 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. >> > <script type="text/javascript"> >> > function test(x){ >> > alert(x.value); >> > } >> > </script> >> > <input type="text" onchange="test(this)"> >> > >> > On 4/17/07, Igor Vaynberg < [EMAIL PROTECTED]> wrote: >> > >> > > 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 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. >> > > > >> > > > >> > > > thanks in advance. >> > > > pradip >> > > > >> > > > >> > > > -- >> > > > View this message in context: >> http://www.nabble.com/Listview-listitem-onchange-tf3588422.html#a10028153 >> > > > >> > > > Sent from the Wicket - User mailing list archive at >> Nabble.com<http://nabble.com/> >> > > > . >> > > > >> > > > >> > > > >> ------------------------------------------------------------------------- >> > > > >> > > > This SF.net email is sponsored by DB2 Express >> > > > Download DB2 Express C - the FREE version of DB2 express and take >> > > > control of your XML. No limits. Just data. Click to get it now. >> > > > http://sourceforge.net/powerbar/db2/ >> > > > _______________________________________________ >> > > > Wicket-user mailing list >> > > > Wicket-user@lists.sourceforge.net >> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > >> > > >> > > >> > > >> > > >> ------------------------------------------------------------------------- >> > > This SF.net email is sponsored by DB2 Express >> > > Download DB2 Express C - the FREE version of DB2 express and take >> > > control of your XML. No limits. Just data. Click to get it now. >> > > http://sourceforge.net/powerbar/db2/ >> > > _______________________________________________ >> > > Wicket-user mailing list >> > > Wicket-user@lists.sourceforge.net >> > > https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > >> > > >> > >> > >> > >> ------------------------------------------------------------------------- >> > This SF.net email is sponsored by DB2 Express >> > Download DB2 Express C - the FREE version of DB2 express and take >> > control of your XML. No limits. Just data. Click to get it now. >> > http://sourceforge.net/powerbar/db2/ >> > _______________________________________________ >> > Wicket-user mailing list >> > Wicket-user@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/wicket-user >> > >> > >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/Listview-listitem-onchange-tf3588422.html#a10037362 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user