1. javaserverfaces-spec-public

Immediately process update HtmlInputHidden values during conversion/validation phase


    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Lifecycle
    • Labels:
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
    • Status Whiteboard:

      cat2 frame javadoc size_medium importance_small

      cat2 frame javadoc size_medium importance_small


      Requested by use balusc

      Imagine a request scoped bean with a h:inputHidden field and another UIInput
      field which is to be converted and/or validated. If the h:inputHidden already
      has a value but the conversion and/or validation of the another UIInput field
      fails, then the value of the h:inputHidden will get lost.

      Truly, this is behaviour by specification, but it is not very intuitive. One
      would expect that hidden input values (read: the values which aren't to be
      filled in by the client, but by the server) should retain its value. In real
      world web applications the sole purpose of hidden input elements is to transfer
      values from request to request without any client interaction.

      Thus, hereby my request for an enhancement in the API: make sure that the API
      retains hidden input values regardless of the global outcome of the
      conversion/validation phase. And only if the hidden input value itself is
      already successfully converted and validated.

      In theory this can simply be achieved by adding the following lines at the
      bottom of the if (isValid()) {} block which starts at line 887 of
      javax.faces.component.UIInput in 2.0.0 EDR1:

      if (this instanceof HtmlInputHidden) {

      If necessary you can also let it implement a certain marker interface, e.g.
      RetainableValueHolder or so (I just say something) so that one can decide to let
      some custom component implement it.

      I am almost sure that this will be greatly appreciated by the web development
      world. It is certainly much more intuitive. And it is much more elegant than the
      'workaround' to bind the h:inputHidden and using the UIInput#getValue() /
      setValue() instead.


        Jason Lee created issue -
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 437 20042
        Ed Burns made changes -
        Assignee sheetalv [ sheetalv ] Ed Burns [ edburns ]
        Ed Burns made changes -
        Assignee Ed Burns [ edburns ]
        Ed Burns made changes -
        Fix Version/s 2.3 [ 16372 ]
        Fix Version/s 2.2 [ 10403 ]
        Ed Burns made changes -
        Priority Major [ 3 ] Trivial [ 5 ]
        Fix Version/s 2.3 [ 16372 ]
        Manfred Riem made changes -
        Priority Trivial [ 5 ] Minor [ 4 ]


          • Assignee:
            Jason Lee
          • Votes:
            2 Vote for this issue
            3 Start watching this issue


            • Created: