That thing works great with normal links. But I have a problem with
Ajax(Fallback)Links. The created JavaScript looks good but it does not work.
Since I really don't understand JavaScript I don't have a clue what to
do next. I have modified the example to reproduce the problem:


Add to HomePage.html:

 <hr><a href="#" wicket:id="ajaxLink">Ajax here!</a>


Added to HomePage.java:

 AjaxLink<Object> ajaxLink = new AjaxLink<Object>("ajaxLink") {
      @Override
      public void onClick( AjaxRequestTarget ajaxRequestTarget ) {
        System.out.println( "#########" );
      }
    };

    ajaxLink.add( new InputBehavior( new KeyType[]{KeyType.n} ) );
    add( ajaxLink );



Any ideas?


Thanks,

Johannes


danisevsky wrote:
> look at
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/
> 
> 2009/8/26 Johannes Schneider <[email protected]>
> 
>> Hi,
>>
>> I have here several AjaxLinks that should be triggered using a shortcut
>> (e.g. PageDown or Delete).
>> Does anybody have some lines of code or a hint how that could be done?
>>
>> Alternatively a AjaxBehaviour could be used to start the action.
>>
>>
>> Any ideas?
>> Thanks,
>>
>>
>> Johannes
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 

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

Reply via email to