ICEfaces
  1. ICEfaces
  2. ICE-5861

Enter key does not trigger submit of screen name in chat of Auction application

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Beta1, 2.0.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2

      Description

      When running the Auction application, if you put focus in the input text field for the screen name used for chat, hitting the Enter key does not result in an update to the page. Once you are in the chat, the Enter key does work to submit chat messages. The issues seems confined to pure ICEfaces 2.0 as the AuctionMonitor application in compatibility mode appears to behave properly.

        Activity

        Hide
        Deryk Sinotte added a comment -

        Looks like everything is happening basically the way it's supposed to when the Enter key is pressed but the update that comes back when trying to Join the chat is rather sparse - so perhaps there is something about the DOM diffing that's not quite right.

        <partial-response>
        <changes>
        <update id="chat:default">
        <input id="chat:default" name="chat:default" src="./images/x.gif" type="image" />
        </update>
        <update id="javax.faces.ViewState">525100616217277955:-2989719190345398102</update>
        </changes>
        </partial-response>

        I also noticed that in the page markup, the button used to send the chat messages shows a slightly different strategy (action vs actionListener on the button):

        <h:inputText immediate="false" id="messageIn" size="50"
        value="#

        {UserBean.message}

        "
        title="Enter your message text"
        styleClass="textField"/>

        <h:commandButton id="button_send_message"
        value="Send Message" action="send"
        styleClass="orangeButtons"
        title="Send your message text"/>

        than the inputText and button for Joining the chat:

        <h:inputText id="text_nickname_chat"
        value="#

        {UserBean.nick}

        "
        title="Enter a nickname used in the chat"
        styleClass="textField"
        />

        <h:commandButton
        id="join_chat_button" styleClass="orangeButtons"
        value="Join Chat"
        title="Join the chat conversation"
        actionListener="#

        {UserBean.enterConversation}

        "/>

        Show
        Deryk Sinotte added a comment - Looks like everything is happening basically the way it's supposed to when the Enter key is pressed but the update that comes back when trying to Join the chat is rather sparse - so perhaps there is something about the DOM diffing that's not quite right. <partial-response> <changes> <update id="chat:default"> <input id="chat:default" name="chat:default" src="./images/x.gif" type="image" /> </update> <update id="javax.faces.ViewState">525100616217277955:-2989719190345398102</update> </changes> </partial-response> I also noticed that in the page markup, the button used to send the chat messages shows a slightly different strategy (action vs actionListener on the button): <h:inputText immediate="false" id="messageIn" size="50" value="# {UserBean.message} " title="Enter your message text" styleClass="textField"/> <h:commandButton id="button_send_message" value="Send Message" action="send" styleClass="orangeButtons" title="Send your message text"/> than the inputText and button for Joining the chat: <h:inputText id="text_nickname_chat" value="# {UserBean.nick} " title="Enter a nickname used in the chat" styleClass="textField" /> <h:commandButton id="join_chat_button" styleClass="orangeButtons" value="Join Chat" title="Join the chat conversation" actionListener="# {UserBean.enterConversation} "/>
        Hide
        Deryk Sinotte added a comment -

        In the original AuctionMonitor application, based on 1.8, we used ice: components. For this version of Auction, everything was ported to use h:components. The problem here is that the h:inputText does not support action or actionListener attributes like the ice:components. Our new captureEnterKey logic was working, but the code for entering the chat room was never being called. What used to be triggered in the actionListener code for entering the chat room was not executing. By adding the enterConversation method call to the end of setNick in UserBean, the Auction chat now works as expected when the nickname is submitted using the Enter key.

        Show
        Deryk Sinotte added a comment - In the original AuctionMonitor application, based on 1.8, we used ice: components. For this version of Auction, everything was ported to use h:components. The problem here is that the h:inputText does not support action or actionListener attributes like the ice:components. Our new captureEnterKey logic was working, but the code for entering the chat room was never being called. What used to be triggered in the actionListener code for entering the chat room was not executing. By adding the enterConversation method call to the end of setNick in UserBean, the Auction chat now works as expected when the nickname is submitted using the Enter key.

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: