Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xpages Combobox setting values in managed bean

I am trying to pass arguments to a managed bean. The bean is configured and works, has two methods "getResponsible" and "setResponsible". Calling "myLookup.responsible" works.

I cannot pass arguments to my bean, and can't figure out why. The below code does not work.

  <xp:comboBox id="comboBox1">
  <xp:selectItems>
  <xp:this.value><![CDATA[#{myLookup.setResponsible("Something")}]]>
  </xp:this.value>
  </xp:selectItems>
  </xp:comboBox>

As soon as I type paranthesis ")", "(" or semicolon ";" i get error "Error in EL syntax". I guess I am making some fundamental mistake here.

like image 230
Kermit Avatar asked Dec 11 '25 13:12

Kermit


1 Answers

The version of expression language does not allow parameters to easily be passed. This option may work http://blog.defrog.nl/2012/04/settings-bean-parameterized-method-call.html.

If parameters are required, I usually use SSJS, so:

#{javascript:myLookup.setResponsible("Something");

If the options won't vary during the page's life, you can always compute on page load, so:

${javascript:myLookup.setResponsible("Something");
like image 169
Paul Stephen Withers Avatar answered Dec 14 '25 09:12

Paul Stephen Withers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!