javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1803

Mojarra 1.2_15 ManagedBeanELResolver.setValue() broken/regression

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: unscheduled
    • Component/s: expression language
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,803

      Description

      In Mojarra 1.2_15 com.sun.faces.el.ManagedBeanELResolver.setValue() has been
      rewritten to rely on the resolveBean method (shared with getValue()).
      resolveBean() sets context.setPropertyResolved(true) if the targeted bean is a
      managed bean. setValue() however doesn't turn around and update the bean –
      rather it still is relying on the ScopedAttributeELResolver to do this.
      However, because it has now set the property as being resolved (in past versions
      of Mojarra it didn't set the property as resolved), the
      (Demux)CompositeELResolver skips further processing. I.e. the
      ScopedAttributeELResolver is never called and hence the setValue() actually
      never happens. Though my use case is from running the portlet bridge which in
      turn is using setValue to update a managed bean on the request scope you should
      be able to reproduce this merely by having a request scoped managed bean and
      then calling trying to update it by executing an EL expression on it.

      In case it makes a difference the code is doing:
      // now evaluate the expression
      ValueExpression valExpr =
      app.getExpressionFactory().createValueExpression(context.getELContext(),
      expr, String.class); where expr is #

      {modelPRP}

      and modelPRP is a
      requestscoped managed bean. This is followed by:
      valExpr.setValue(context.getELContext(), newVals[0]); where newVals[0] is the
      new string value being pushed/updated into the string valued bean.

        Activity

        Hide
        rogerk added a comment -

        Will take a look

        Show
        rogerk added a comment - Will take a look
        Hide
        bbaggett added a comment -

        Created an attachment (id=1296)
        Proposed fix from Blake. Fixes original failing issue.

        Show
        bbaggett added a comment - Created an attachment (id=1296) Proposed fix from Blake. Fixes original failing issue.
        Hide
        rogerk added a comment -

        Patch applied to Mojarra 2.0.4 code base.
        Mojarra and TCK tests pass.
        Awaiting verification from ADF team.

        Show
        rogerk added a comment - Patch applied to Mojarra 2.0.4 code base. Mojarra and TCK tests pass. Awaiting verification from ADF team.
        Hide
        rogerk added a comment -

        Checked into 2.0.4 (previously) and now Mojarra head (soon to be 2.1).

        Show
        rogerk added a comment - Checked into 2.0.4 (previously) and now Mojarra head (soon to be 2.1).
        Hide
        Manfred Riem added a comment -

        Closing issue out

        Show
        Manfred Riem added a comment - Closing issue out

          People

          • Assignee:
            rogerk
            Reporter:
            mfreedma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: