MyFaces Core
  1. MyFaces Core
  2. MYFACES-2552

TagValueExpression.getType() returns null if the property in the managed bean is null and the expression points to a facelets composite component attribute

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.0.10, 2.1.4
    • Component/s: JSR-314
    • Labels:
      None

      Description

      if you have a facelets composite component with an attribute "test" that points to a property in a managed bean (e.g. #

      {myBean.property}

      ) which is currently null and you refer to that attribute in the implementation via #

      {cc.attrs.test} you can get the current value (null) or set a new value but you cannot get the type of the property (e.g. String[]). However if the property in the managed bean is non-null you can get the type.

      For example:

      <cc:interface name="mycomponent">
      <cc:attribute name="test" required="true"/>
      </cc:interface>
      <cc:implementation>
      <h:selectManyListbox value="#{cc.attrs.test}

      ">
      <f:selectItems value="#

      {some select items}

      "/>
      </h:selectManyListbox>
      </cc:implementation>

      --> calling #

      {cc.attrs.test}.getType() will fail if #{cc.attrs.test}

      resolves to null, but will work if #

      {cc.attrs.test}

      resolves to some valid value.

      This currently results in a NullPointerException in _SharedRendererUtils.getConvertedUISelectManyValue().

      1. MYFACES-2552-4.patch
        8 kB
        Leonardo Uribe
      2. MYFACES-2552-spec-proposal.patch
        2 kB
        Jakob Korherr
      3. spec745mf.patch.txt
        4 kB
        Matt Benson

        Issue Links

          Activity

          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Leonardo Uribe made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 2.0.10 [ 12317870 ]
          Fix Version/s 2.1.4 [ 12317868 ]
          Resolution Fixed [ 1 ]
          Leonardo Uribe made changes -
          Attachment MYFACES-2552-4.patch [ 12502946 ]
          Leonardo Uribe made changes -
          Attachment MYFACES-2552-3.patch [ 12502944 ]
          Leonardo Uribe made changes -
          Attachment MYFACES-2552-3.patch [ 12502944 ]
          Leonardo Uribe made changes -
          Assignee Jakob Korherr [ jakobkorherr ] Leonardo Uribe [ lu4242 ]
          Leonardo Uribe made changes -
          Link This issue is duplicated by MYFACES-3316 [ MYFACES-3316 ]
          Matt Benson made changes -
          Attachment spec745mf.patch.txt [ 12496330 ]
          Matt Benson made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Matt Benson made changes -
          Link This issue is duplicated by MYFACES-3311 [ MYFACES-3311 ]
          Jakob Korherr made changes -
          Affects Version/s 2.1.0 [ 12315190 ]
          Affects Version/s 2.0.0-beta-2 [ 12314539 ]
          Jakob Korherr made changes -
          Field Original Value New Value
          Attachment MYFACES-2552-spec-proposal.patch [ 12435866 ]
          Jakob Korherr created issue -

            People

            • Assignee:
              Leonardo Uribe
              Reporter:
              Jakob Korherr
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development