be careful to set the index on the right DOM node
you need to use $("form1:listbox1_list").selectedIndex=-1
this is because we are pointing to the listbox html element without using
the public APIs
Vijaya Bhaskar Tsaliki wrote:
>
> I have included prototype library (prototype.js). Now the show() and
> hide() functions are working very nicely.
>
> But I could not find anything to unselect selection in list box. I tried
> with the following... but NO SUCCESS.. is it a problem with Woodstock
> 4.x comps>
>
> $("form1:listbox1").selectedIndex=-1
> $("form1:listbox1").select(-1)
>
> Any Idea... how to do this at client side.
>
> I cannot use server side solution as it is taking long time to refresh
> as my list contains thousands of items.
>
> Thanks,
> Vijay
>
>
>
>
> -----Original Message-----
> From: autozoom [mailto:cioni_mauro_at_yahoo.com]
> Sent: Monday, August 04, 2008 3:57 PM
> To: users_at_woodstock.dev.java.net
> Subject: RE: RE: Re: dynamic display of panelLayouts
>
>
> try with
>
> $("form1:myListBox_list").selectedIndex=-1
>
> this is not a good solution because it doesn't use a public API, but
> there
> doesn't seem to be something similar for javascript api.
>
> I insist you embed the prototype library in your project though
>
>
> Vijaya Bhaskar Tsaliki wrote:
>>
>> Hi,
>>
>> Thanks... It is working... thanks for your timely help. But I had to
> use
>> document.getElementById instead of dollar symbol $.
>>
>> I have some other problem... how do I deselect an item from listbox
>> using javascript. It has been giving me hard time for two months... No
>> success...
>> It used to work in Netbeans 5.5.1. NOT in 6.1
>>
>> I have two list boxes. I need to allow users to select only one
> listbox
>> at any point of time.
>>
>> Regards,
>> Vijay
>>
>> -----Original Message-----
>> From: autozoom [mailto:cioni_mauro_at_yahoo.com]
>> Sent: Friday, August 01, 2008 6:46 PM
>> To: users_at_woodstock.dev.java.net
>> Subject: RE: Re: dynamic display of panelLayouts
>>
>>
>> .hide() and .show() are functions from the Prototype library, that I
>> warmly
>> suggest you to get used to.
>> It's very very powerful.
>> But in the meanwhile you can replace it with
>> $("form1:panel").style.display="block" and
>> $("form1:panel").style.display="none" respectively
>>
>>
>>
>> Vijaya Bhaskar Tsaliki wrote:
>>>
>>> Hi,
>>>
>>> Thank you very much for the solutions.
>>>
>>> It tried client side using $("form1:mypanel").hide() in java script
>>> function and called this function in onClick of button group. It is
>>> showing java script error - object expected. My reference
>>> (form1:xxxpanel)to the panelLayout is also correct.
>>>
>>> I am using Netbeans6.1 and jboss.
>>>
>>> Server solution is cool and worked. I need to add ajax stuff. At this
>>> point of time I do not know how to add ajax transactions to
> Woodstock.
>> I
>>> will try this.
>>>
>>> Can you provide more info on client side solution?
>>>
>>> Regards,
>>> Vijay
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: autozoom [mailto:cioni_mauro_at_yahoo.com]
>>> Sent: Friday, August 01, 2008 4:20 PM
>>> To: users_at_woodstock.dev.java.net
>>> Subject: Re: dynamic display of panelLayouts
>>>
>>>
>>> there are may ways to accomplish this:
>>>
>>> -pure client side by binding something like $("form1:mypanel").hide()
>>> (or
>>> .show()) to the onClick event of the radio buttong group
>>>
>>> -pure server side, by setting autosubmit on change of the group to
>> true
>>> and
>>> then bind the "visible" property of each panel to something that
>>> evaluates
>>> to true or false depending on radio buttons status
>>>
>>> - you can use approach #2 and extend it with ajax transactions to
> have
>>> the
>>> power of server side code without a full refresh
>>>
>>>
>>> Vijaya Bhaskar Tsaliki wrote:
>>>>
>>>> Hi,
>>>>
>>>> Can anyone help me in my problem
>>>>
>>>> I have two radio buttons (in group) and two panelLayouts under the
>>> radio
>>>> buttons. At any point of time I need to show only one panelLayout
>>> based
>>>> on the radio button selected.
>>>>
>>>> I tried lot of ways - using javascript and serverside - without
>>> success.
>>>>
>>>> It would be great help if anyone has this kind of problem and
>> solution
>>>>
>>>>
>>>>
> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>>>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Table-Question-tp18742553p18772014.html
>>> Sent from the Project Woodstock - Users mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Table-Question-tp18742553p18774069.html
>> Sent from the Project Woodstock - Users mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Table-Question-tp18742553p18808796.html
> Sent from the Project Woodstock - Users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>
>
--
View this message in context: http://www.nabble.com/Table-Question-tp18742553p18810184.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.