myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mick Knutson" <mickknut...@gmail.com>
Subject Re: ENTER key with a single form but multiple actions
Date Tue, 05 Dec 2006 01:28:19 GMT
I just tested it when I was in an input field, and it does not work. Nothing
happends at all. Just like before.


On 12/4/06, Simon Kitching <simon.kitching@rhe.co.nz> wrote:
>
> Hi,
>
> I expect that the browser is simply invoking a method on the HTML
> control that currently has the focus. If that HTML control happens to be
> a submit button then its default behaviour in that situation is to
> submit the associated form; if the control happens to be a text field
> then it will have a different effect. This isn't anything to do with JSF.
>
> Daniel, are you saying that your proposal works when the user clicks in
> a text box then presses return, or that it allows the user to press
> return immediately after the page is rendered (but not after they select
> a text field or other control)?
>
> Regards,
>
> Simon
>
> Daniel Young wrote:
> > I use the nasty "1-pixel image" hack, putting it first in the form so
> > the action I want ("your.action") is the default:
> >
> > <h:commandButton action="#{your.action}" image="/images/blank.gif"
> > type="button" tabindex="-1"/>
> >
> > That should get you going for now, but if somebody does have A Better
> > Way, I'd love to hear it…
> >
> >
> > ------------------------------------------------------------------------
> >
> > *From:* Mick Knutson [mailto:mickknutson@gmail.com]
> > *Sent:* Tuesday, 5 December 2006 10:56 AM
> > *To:* MyFaces Discussion
> > *Subject:* ENTER key with a single form but multiple actions
> >
> >
> >
> > I have a form with multiple actions and I want a default action to
> > happen when I click the enter key.
> >
> > Right now, I seem to get the 1st (default) action if I am NOT inside
> > another component like a text field. But when I am inside another
> > component, I get nothing submitted and have to manually mouse click the
> > submit button.
> >
>



-- 

Thanks

DJ MICK
http://www.djmick.com
http://www.myspace.com/mickknutson

Mime
View raw message