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

          jhook created issue -
          kenaiadmin made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 57 19662
          made changes -
          made changes -
          Manfred Riem made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: