ICEfaces
  1. ICEfaces
  2. ICE-2500

ice:selectInputDate doesn't allow for partialSubmit=false

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#2
    • Fix Version/s: 1.7.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java :: Line 222
          dateText.setAttribute(HTML.ONBLUR_ATTR, "setFocus('');"+ this.ICESUBMITPARTIAL);

      It looks like selectInputDate is unconditionally making the text field use partialSubmit=true, when it should check the component attribute.

        Issue Links

          Activity

          Hide
          Asdasdasdasd Sdasd added a comment -

          In 1.7DR calenadar works well but slow.

          Is communication with server really neccesery when partialSubmit="false" and rendered="true" and user
          don't need any submit's?

          Show
          Asdasdasdasd Sdasd added a comment - In 1.7DR calenadar works well but slow. Is communication with server really neccesery when partialSubmit="false" and rendered="true" and user don't need any submit's?
          Hide
          Asdasdasdasd Sdasd added a comment -

          Parameter immediate="false" probalbly also do not work.

          When user enter invalid date and press tab key validation is done immediatly and displayed in <ice:message>

          Show
          Asdasdasdasd Sdasd added a comment - Parameter immediate="false" probalbly also do not work. When user enter invalid date and press tab key validation is done immediatly and displayed in <ice:message>
          Hide
          Mark Collette added a comment -

          Right, when partialSubmit="false", it should not communicate with the server, until and actual form submission takes place. Although I do believe that immediate="true" and immediate="false" do work as intended. I believe that the issue you mentioned is still because of partialSubmit.

          Show
          Mark Collette added a comment - Right, when partialSubmit="false", it should not communicate with the server, until and actual form submission takes place. Although I do believe that immediate="true" and immediate="false" do work as intended. I believe that the issue you mentioned is still because of partialSubmit.
          Hide
          Scott Johnston added a comment -

          I too, am in need of something done here. Currently, we have quite a few date fields in our application. The selectInputDate component does a partialSubmit 3 times when 0 are required (1 when the calendar button is first clicked, 1 when a date is selected, and 1 when the date input field loses focus).

          There is one case in which unexpected behavior can occur. On any given form with a selectInputDate, if a user fills out a date field manually and then immediately clicks the submit button, 2 posts are sent (1 for the date field losing focus and 1 for the submit button). In this case, unexpected behaviour can occur.

          Show
          Scott Johnston added a comment - I too, am in need of something done here. Currently, we have quite a few date fields in our application. The selectInputDate component does a partialSubmit 3 times when 0 are required (1 when the calendar button is first clicked, 1 when a date is selected, and 1 when the date input field loses focus). There is one case in which unexpected behavior can occur. On any given form with a selectInputDate, if a user fills out a date field manually and then immediately clicks the submit button, 2 posts are sent (1 for the date field losing focus and 1 for the submit button). In this case, unexpected behaviour can occur.
          Hide
          Mark Collette added a comment -

          The calendar rendering code is all server side, that is why it uses partialSubmits as you interact with it. The only thing that would be done, when partialSubmit=false, is to make it so that onblur of the text input field will not cause a partialSubmit. The calendar interactions would still necessitate partialSubmits.

          Show
          Mark Collette added a comment - The calendar rendering code is all server side, that is why it uses partialSubmits as you interact with it. The only thing that would be done, when partialSubmit=false, is to make it so that onblur of the text input field will not cause a partialSubmit. The calendar interactions would still necessitate partialSubmits.
          Hide
          Scott Johnston added a comment -

          Thanks Mark,

          I understand now the reason for the submit on the calendar, since when the calendar button is used, a server action must take place.

          To solve my problem, I've added the following to my custom SelectInputDateRenderer encodeEnd class:

          inputNode.setAttribute(HTML.ONBLUR_ATTR, "setFocus('');");

          (FYI I needed a custom renderer class already to allow for the component to be disabled, so it was a very simple change)!

          Show
          Scott Johnston added a comment - Thanks Mark, I understand now the reason for the submit on the calendar, since when the calendar button is used, a server action must take place. To solve my problem, I've added the following to my custom SelectInputDateRenderer encodeEnd class: inputNode.setAttribute(HTML.ONBLUR_ATTR, "setFocus('');"); (FYI I needed a custom renderer class already to allow for the component to be disabled, so it was a very simple change)!
          Hide
          Mark Collette added a comment -

          Now, for selectInputDate components with renderAsPopup="true", if you set partialSubmit="false" then the text INPUT field's onblur will not cause a partialSubmit. No submission to the server will happen at all, in that case. Setting partialSubmit="false" will not affect any other aspect of submissions for selectInputDate.

          TRUNK
          Subversion 17456
          ICEfaces 1.7 branch
          Subversion 17457
          icefaces\component-metadata\src\main\resources\conf\extended-faces-config.xml
          icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-selectInputDate-props.xml
          icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-att-partialsubmit-props.xml
          icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-att-partialsubmit-true-props.xml
          icefaces\component\src\com\icesoft\faces\component\ext\HtmlInputText.java
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java
          icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java

          Show
          Mark Collette added a comment - Now, for selectInputDate components with renderAsPopup="true", if you set partialSubmit="false" then the text INPUT field's onblur will not cause a partialSubmit. No submission to the server will happen at all, in that case. Setting partialSubmit="false" will not affect any other aspect of submissions for selectInputDate. TRUNK Subversion 17456 ICEfaces 1.7 branch Subversion 17457 icefaces\component-metadata\src\main\resources\conf\extended-faces-config.xml icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-selectInputDate-props.xml icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-att-partialsubmit-props.xml icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-att-partialsubmit-true-props.xml icefaces\component\src\com\icesoft\faces\component\ext\HtmlInputText.java icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
          Hide
          Mark Collette added a comment -

          ICEfaces 1.7 branch
          Subversion 17458
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\DomBasicRenderer.java

          Show
          Mark Collette added a comment - ICEfaces 1.7 branch Subversion 17458 icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\DomBasicRenderer.java

            People

            • Assignee:
              Unassigned
              Reporter:
              Mark Collette
            • Votes:
              8 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: