Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 2.0
    • Component/s: Uncategorized
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      57

      Description

      I believe it would simplify things greatly if Converters were not dependent on
      UIComponents in the API:

      public java.lang.Object getAsObject(javax.faces.context.FacesContext context,
      java.lang.String value)

      public java.lang.String getAsString(javax.faces.context.FacesContext context,
      java.lang.Object value)

      The PropertyResolver API could then allow developers to simply plug in
      converters into the struts config and allow auto-resolution of specialized
      property types.

      b = object we are mutating
      p = property descriptor that we are setting
      o = object to be assigned

      if (p.type not within EL spec & p.type is not assignable from o.class) {
      c = application.getConverterForType by p.type
      if (c)

      { o = c.getAsObject(context, o.toString) b.p = o; }

      }

      This behavior is similar to the popular Jakarta Common's Bean Utils.

      e.g. if my orderline has a Money property, just by having a type Money, if no
      converter is assigned on the inputText, the PropertyResolver will auto-convert
      the String input to a Money Object for that inputText's expression property.

        Issue Links

          Activity

          Hide
          jhook added a comment -

          changed issue type

          Show
          jhook added a comment - changed issue type
          Hide
          Ed Burns added a comment -

          move to P4

          push out to 2.0

          Show
          Ed Burns added a comment - move to P4 push out to 2.0
          Hide
          Ed Burns added a comment -

          19, 57, 63 (reason: can be done with custom component), 129
          (reason: handled in facelets)

          Show
          Ed Burns added a comment - 19, 57, 63 (reason: can be done with custom component), 129 (reason: handled in facelets)
          Hide
          Ed Burns added a comment -

          Prepare to delete "spec" subcomponent.

          Show
          Ed Burns added a comment - Prepare to delete "spec" subcomponent.
          Hide
          Manfred Riem added a comment -

          Closing resolved issue out

          Show
          Manfred Riem added a comment - Closing resolved issue out

            People

            • Assignee:
              javaserverfowner
              Reporter:
              jhook
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: