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

          eray created issue -
          Hide
          eray added a comment -

          Attached are the web pages and seam components

          Show
          eray added a comment - Attached are the web pages and seam components
          eray made changes -
          Field Original Value New Value
          Attachment cms.zip [ 10352 ]
          Hide
          eray added a comment -

          Further investigation reveals that this issue is somehow tied to the <ice:commandButton>. Leaving everything else the same and changing to <h:commandButton> works.

          Show
          eray added a comment - Further investigation reveals that this issue is somehow tied to the <ice:commandButton>. Leaving everything else the same and changing to <h:commandButton> works.
          Hide
          eray added a comment -

          Sorry guys. Please disregard the last statement. My code was in a different state than I though it was. However, the original issue as reported is still valid.

          Show
          eray added a comment - Sorry guys. Please disregard the last statement. My code was in a different state than I though it was. However, the original issue as reported is still valid.
          Hide
          eray added a comment -

          Platform: JBoss-4.0.5.GA, Seam-1.2.1.GA, ICEfaces-1.5.3

          Show
          eray added a comment - Platform: JBoss-4.0.5.GA, Seam-1.2.1.GA, ICEfaces-1.5.3
          eray made changes -
          Attachment CustomerManagementSystem.ear [ 10353 ]
          Hide
          Philip Breau added a comment -

          resetHiddenFieldsFor() in submit.js is resetting the values for all hidden input components, which makes using inputHidden components impossible. We might want to use some prefix for all hidden inputs that need resetting and not blank out all of them indiscrimantly

          Show
          Philip Breau added a comment - resetHiddenFieldsFor() in submit.js is resetting the values for all hidden input components, which makes using inputHidden components impossible. We might want to use some prefix for all hidden inputs that need resetting and not blank out all of them indiscrimantly
          Ken Fyten made changes -
          Assignee Mark Collette [ mark.collette ]
          Ken Fyten made changes -
          Assignee Priority P1
          Hide
          Ted Goddard added a comment -

          As far as we know, resetHiddenFieldsFor() is no longer necessary. Since it interferes with third-party component compatibility and the current implementation of Spring integration (ICE-1573), we should disable it unless testing shows otherwise.

          Show
          Ted Goddard added a comment - As far as we know, resetHiddenFieldsFor() is no longer necessary. Since it interferes with third-party component compatibility and the current implementation of Spring integration ( ICE-1573 ), we should disable it unless testing shows otherwise.
          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.
          Ted Goddard made changes -
          Fix Version/s 1.6 [ 10031 ]
          Ted Goddard made changes -
          Link This issue blocks ICE-1573 [ ICE-1573 ]
          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" />
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #14041 Tue Jun 05 16:05:18 MDT 2007 mark.collette ICE-1391 : <ice:inputHidden> does not submit data back to server
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          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
          Mark Collette made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 1.6DR#6 [ 10090 ]
          Fix Version/s 1.6 [ 10031 ]
          Ken Fyten made changes -
          Fix Version/s 1.6 [ 10031 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1
          Assignee Mark Collette [ mark.collette ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: