input field actions
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
input field actions  XML
Forum Index -> Development Build Feedback
Author Message
nickarls

Joined: 14/11/2006 00:00:00
Messages: 262
Offline


Hi,

Has anyone noticed some strangeness with input fields and action attributes? I'm seeing the issue of the first(?) available button action being called instead of what the field action points to...
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1196
Offline


Do you have an example for us? Perhaps a jira and attach the sample to it?
nickarls

Joined: 14/11/2006 00:00:00
Messages: 262
Offline


judy.guglielmin wrote:
Do you have an example for us? Perhaps a jira and attach the sample to it? 


For something like

Code:
<h:body>
 	<ice:form>
 		<ice:messages globalOnly="false" />
 		<ice:inputText value="#{credentials.username}"/>
 		<ice:inputText value="#{credentials.password}"/>
 		<ice:commandButton value="Login" action="#{credentials.login}" />
 	</ice:form>
 </h:body>
 


the action is called whenever enter is pressed in one of the fields. Is this the intended behaviour?
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1196
Offline


The default behaviour is to add ajax to each component automatically.
You could try <f:ajax disabled="true".....

as per jira 5651
ken.fyten

Joined: 26/10/2004 00:00:00
Messages: 809
Online


Hi,

Yes, this is the intended behavior, as per http://jira.icefaces.org/browse/ICE-5574.

It's meant as a feature, as many browsers already treat "enter" on an input field as a trigger to submit the form, we thought it would be best if we implemented that so that the behavior would be identical across all browsers, regardless of their individual HTML policy on that.

If you feel this is too inflexible, etc. please provide detailed feedback.

Note that you can also prevent this from occurring by adding a "onKeypress" event listener to the inputText components and having that JS listener consume the key event to prevent it from bubbling up the DOM, and thus, being processed by the ICEfaces bridge to trigger the submit.

Regards,
Ken

Ken Fyten
VP Product Development
ICEsoft Technologies, Inc.
 
Forum Index -> Development Build Feedback
Go to:   
Powered by JForum 2.1.7ice © JForum Team