Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 1.7RC1
-
Fix Version/s: 1.7
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
-
Support Case References:
-
Workaround Exists:Yes
-
Workaround Description:Use ice components and add an on ice onkeypress="if (window.event.keyCode == 13) iceSubmitPartial(form,this,event);" to the ice:inputText to simulate h:inputText default behavior.
Description
The default behavior when hitting enter inside of an h:inputText is to execute the nearest command button. If you hit enter inside of the input text using the snippet below, a javascript runtime error occurs in IE. Attached is a screenshot. The run time error is ''form' is null or not an object'. Here is the snippet of code that reproduces the issue:
<ice:form>
<h:panelGrid>
<h:outputText value="Search" escape="false" />
<h:inputText id="ticketInput" value="" size="25" />
<hcommandButton action="action" value="temp" />
</h:panelGrid>
</ice:form>
<ice:form>
<h:panelGrid>
<h:outputText value="Search" escape="false" />
<h:inputText id="ticketInput" value="" size="25" />
<hcommandButton action="action" value="temp" />
</h:panelGrid>
</ice:form>
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
This wasn't really an issue with the h:inputText, but rather a code path in the javascript, that really only is used in IE, in the scenario where the user presses enter in a text input by a button, which causes the default form submission code to execute. Most other code paths involve a direct call to iceSubmit or iceSubmitPartial.
Subversion 16377
icefaces\bridge\lib\element.js
icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\FormRenderer.java