Uploaded image for project: 'Seam Faces'
  1. Seam Faces
  2. SEAMFACES-57

Use InputElement<T> instead of @InputField for injection of form input

    Details

      Description

      The idea for @InputField is nice, but having access to only the converted value of a field is limiting. We should switch to a wrapper type at the injection point to provide access to the id, clientId and component. The implementation could also leverage the narrowing bean facility in Weld Extensions to make the producer more strongly typed.

      Proposal:

      @Inject
      private InputElement<String> firstName;

      @Inject
      private InputElement<String> lastName;

      @Inject
      private InputElement<Date> dateOfBirth;

      InputElement<T>
      String id
      String clientId
      T value
      UIInput component

      The input element thus allows much more flexibility in terms of what the developer can accomplish in the validation method. One of those is being able to assign a message to a particular input field.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                spinner José Freitas
                Reporter:
                dan.j.allen Dan Allen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: