5 Replies Latest reply on Oct 21, 2008 2:27 PM by nickarls

    EL issues

    amitev

      Hi all! I have issues with EL chaining ?: operators. The scenario is:


      Having the following expression:


      #{disabled ? 'disabled' : !valid ? 'invalid' : required ? 'required' : ''}
      



      when
      disabled == false
      valid == true
      required == true
      the result is 'required' which is fine


      but when
      disabled == false
      valid == false
      required == true
      the result is '' but it should be 'invalid'


      Other scenario:


      #{(5==5)?'5':(4!=4)?'':'4'}
      



      This expression evaluations to 4. But it should evaluate to 5, shouldn't it?


      Am i doing something wrong or this is a bug in EL?