Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2915

UIComponent attribute defaults are not used when bound to managed bean property by EL, even if the managed bean property is null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 2.0.1
    • None
    • JSR-314
    • None

    Description

      As asked by Leonardo I open this issue in relation to issue https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1805 on mojarra to check if MyFaces can do the same. For full description see issue above, short description below:

      Assigning a UIComponent attribute with EL expression disables the default value handling that some attribute feature (e.g. rendered==null is the same as rendered==true). Since EL expression never evaluates to null an expression like rendered="#

      {bean.rendered}

      with bean.rendered=null will evaluate to False, since for the rendered attribute the expected type for the ValueExpression is Boolean.
      The proposed change would be to use Object as expected type to allow null evaluation from EL and convert to the really expected type later in TagValueExpression. For details see original issue 1805 on mojarra.

      Attachments

        1. ComponentAttributeValueExpression.patch
          7 kB
          Hanspeter Dünnenberger

        Activity

          People

            Unassigned Unassigned
            hpdueni Hanspeter Dünnenberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: