Also check out Form#appendDefaultButtonField

        /**
         * If a default button was set on this form, this method will be called 
to
         * render an extra field with an invisible style so that pressing enter 
in
         * one of the textfields will do a form submit using this button. This
         * method is overridable as what we do is best effort only, and may not 
what
         * you want in specific situations. So if you have specific usability
         * concerns, or want to follow another strategy, you may override this
         * method.
         *
         * @param markupStream
         *            The markup stream
         * @param openTag
         *            The open tag for the body
         */
        protected void appendDefaultButtonField(final MarkupStream markupStream,
                        final ComponentTag openTag)
        {

On 8/17/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> There is a best attempt to do this via Wicket, in Form#defaultButton:
>
>         /**
>          * Sets the default button. If set (not null), a hidden submit button 
> will
>          * be rendered right after the form tag, so that when users press 
> enter in a
>          * textfield, this button's action will be selected. If no default 
> button is
>          * set (so unset by calling this method with null), nothing 
> additional is
>          * rendered.
>          * <p>
>          * WARNING: note that this is a best effort only. Unfortunately 
> having a
>          * 'default' button in a form is ill defined in the standards, and of 
> course
>          * IE has it's own way of doing things.
>          * </p>
>          *
>          * @param button
>          *            The button to set as the default button, or null when 
> you want
>          *            to 'unset' any previously set default button
>          */
>         public final void setDefaultButton(Button button)
>         {
>                 this.defaultButton = button;
>         }
>
>
> Eelco
>
> On 8/15/06, Bruno Borges <[EMAIL PROTECTED]> wrote:
> > How to set the default operation when ENTER is pressed any field in the
> > form? There's a form with 4 buttons (in html and in java) that simply send
> > user to others pages, and the normal button to submit data with no
> > corresponding button in Java,  only in the html.
> >
> > Thanks
> > --
> > Bruno Borges
> > Summa Technologies Inc.
> > www.summa-tech.com
> > (11) 8565-7739 - (11) 3846-1622
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to