Xpages: why var docIDs = '#{javascript:getComponent("viewPanel1").getSelectedIds()}' does not work in client side script?

Hi,

I want to check in a view control which has a check box in the first column if the user has made one and only one choice.

I want to be able to alert the user if an invalid choice has been made without leaving the page.

Is it possible to bind a display error control to a view control ?

Can you point me in the right direction ?

Thanks

Christophe

Subject: did it with scoped variable: is it the best way ?

ok i put a computed field above the view and binded it to a sessionscope variable.The script is fully server-side.

No way to bind a display error control ?

Christophe