Hi,

On Wed, Oct 31, 2012 at 11:34 AM, dunekey <[email protected]> wrote:
> Hi,
>
> I have a textfield and add AjaxFormComponentUpdatingBehavior on it.
> I would like to press enter to search data.
> I override the updateAjaxAttributes and get keycode from
> Wicket.Event.keyCode(event)
> It fails in Firefox but it works fine in Chrome and IE.
> Is it wicket's bug?
>
> @Override
> protected void updateAjaxAttributes(AjaxRequestAttributes aAttributes) {
>         super.updateAjaxAttributes(aAttributes);
>         aAttributes.getAjaxCallListeners().add(new AjaxCallListener(){
>                 private static final long serialVersionUID = 1L;
>
>                 @Override
>                 public CharSequence getPrecondition(Component aComponent) {

>                 return " if(Wicket.Event.keyCode(event) != 13){ return 
> false;}";

Try with:               return " if(Wicket.Event.keyCode(attrs.event)
!= 13){ return false;}";

>                 }
>
>
>         });
> }
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Get-keycode-from-Wicket-6-2-0-tp4653479.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to