ICEfaces
  1. ICEfaces
  2. ICE-1391

<ice:inputHidden> does not submit data back to server

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6DR#6, 1.6
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Windows Vista, JDK 1.5.0_11, JBoss AS 4.0.5, Seam 1.2.1.GA, ICEfaces 1.5.3

      Description

      When using <ice:inputHidden> to hold data in form, the data is not submitted to the server. Changing to <ice:inputText> works.

      Also, changing back to non icefaces components using <h:inputHidden> works just fine.

      I have not been able to figure out a work around.

      Note: I'm using seam to back the form data. I'll send files if requested.

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          At the very least, for 1.6 we should determine whether this function is necessary.

          Show
          Ted Goddard added a comment - At the very least, for 1.6 we should determine whether this function is necessary.
          Hide
          Ted Goddard added a comment -

          Resetting hidden fields has been with us for a while ... no wonder nobody remembered what it was for (icefaces-d2d.js):

          9 tedg // handle the hidden command links
          9 tedg if (form_elm.type == "hidden") {
          9 tedg var elm_name = form_elm.name;
          9 tedg var len = elm_name.length;
          9 tedg var test = elm_name.substring((len-5),len);
          9 tedg if (test == "_idcl")

          { 9 tedg document.forms[form.id][elm_name].value=""; 9 tedg }


          9 tedg }

          The difficulty is that commandLink (and potentially other components) stores a value in a particular hidden field to indicate that the commandLink has been clicked. If the hidden field is not cleared, another click on the commandLink will be registered on the next user event. Clearing the hidden field in an update from the server is not practical as the server may not have the opportunity to reply in time (if the user events are rapid). By default, most components will assume that their hidden fields are cleared, because this would be the typical behavior on a full-page refresh.

          Since many components are likely expecting this behaviour, we should likely keep it; however, it is also desirable to indicate that certain hidden fields not be reset.

          If a naming scheme is used (such as name="retain:name") the prefix should be stripped off upon submission to allow parameters of a specified name to be used.

          A reserved value of the alt tag could be used alt="retain".

          A new attribute could be set: icefaces_hidden="retain".

          Show
          Ted Goddard added a comment - Resetting hidden fields has been with us for a while ... no wonder nobody remembered what it was for (icefaces-d2d.js): 9 tedg // handle the hidden command links 9 tedg if (form_elm.type == "hidden") { 9 tedg var elm_name = form_elm.name; 9 tedg var len = elm_name.length; 9 tedg var test = elm_name.substring((len-5),len); 9 tedg if (test == "_idcl") { 9 tedg document.forms[form.id][elm_name].value=""; 9 tedg } 9 tedg } The difficulty is that commandLink (and potentially other components) stores a value in a particular hidden field to indicate that the commandLink has been clicked. If the hidden field is not cleared, another click on the commandLink will be registered on the next user event. Clearing the hidden field in an update from the server is not practical as the server may not have the opportunity to reply in time (if the user events are rapid). By default, most components will assume that their hidden fields are cleared, because this would be the typical behavior on a full-page refresh. Since many components are likely expecting this behaviour, we should likely keep it; however, it is also desirable to indicate that certain hidden fields not be reset. If a naming scheme is used (such as name="retain:name") the prefix should be stripped off upon submission to allow parameters of a specified name to be used. A reserved value of the alt tag could be used alt="retain". A new attribute could be set: icefaces_hidden="retain".
          Hide
          Ted Goddard added a comment -

          <input type="hidden" name="n" value="v" icefaces-retain="true" />

          Show
          Ted Goddard added a comment - <input type="hidden" name="n" value="v" icefaces-retain="true" />
          Hide
          Ted Goddard added a comment -

          After discussion with Mark, yet another option is (in the bridge) to not reset hidden fields with ids. This would fix ice:inputHidden. For other uses, it would simply be necessary to assign the component an id (typically derived from the form, to allow multiple forms on the same page).

          Show
          Ted Goddard added a comment - After discussion with Mark, yet another option is (in the bridge) to not reset hidden fields with ids. This would fix ice:inputHidden. For other uses, it would simply be necessary to assign the component an id (typically derived from the form, to allow multiple forms on the same page).
          Hide
          Mark Collette added a comment -

          Added code to only clear the hidden form fields that don't have ids. (Plus all the other criteria)

          Subversion 14041
          icefaces\bridge\src\submit.js

          Show
          Mark Collette added a comment - Added code to only clear the hidden form fields that don't have ids. (Plus all the other criteria) Subversion 14041 icefaces\bridge\src\submit.js

            People

            • Assignee:
              Unassigned
              Reporter:
              eray
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: