3 Replies Latest reply on Sep 9, 2013 1:52 PM by Christoph Germeier

    Conditional filling field value in EL

    Christoph Germeier Newbie

      I had described a work around to RF-12152  (see here).


      It is basically setting an empty string on focus to a field to activate the autocomplete function:


      onfocus="#{rich:component('region')}.setValue(' ');"


      Now there is another issue with it. It should obviously only overwrite the field contents with an empty string, if there is no value already in it, otherwise the value should stay as it is.


      I tried


      onfocus="#{empty rich:component('institutionName')} ? #{rich:component('institutionName')}.setValue(' ');"


      but this seems not working.


      Does anyone have a solution for that?


      Thanks in advance