woensdag 21 oktober 2009

Xpage: Selected value of a Listbox

I'm buiding a new Xpage application, now I'm facing a problem.
On the Xpage is a Listbox, with possibilty to store multiple values.

Is there an easy way to get the selected value of the Listbox with Server Side Javascript?

2 opmerkingen:

  1. Hi there,

    Depending on the situation then you can use either "getComponent("myfield").getValue()" or getComponent("myfield").getSubmittedValue()"

    The choice will depend on when you are trying to get the value and whether you are validating fields etc.

    Matt

    BeantwoordenVerwijderen
  2. or use a hidden field and some client side javascript, check out my recent blog entry for details on how I am using a similar trick.

    BeantwoordenVerwijderen