Re: AjaxLink/Behaviour with shortcut

2009-08-28 Thread Johannes Schneider
Yes, I have seen the example project - thanks for that. Great stuff btw.
Extending "inputevent" class? I don't get it...

One more thing: What about adding some sort of direct ajax callback to
java without having to add a AjaxLink?
In my case I have a delete link that opens a popup. But now I try to add
a shortcut (e.g. ctrl+Delete) that shouldn't ask for confirmation.
I have solved this with a second link that is not visible - but that
seems to be a little bit strange..


Thanks,

Johannes

nino martinez wael wrote:
> Thanks for the feedback, the quick solution would be to extend the
> inputevent class. Did you see the example project?
> 
> 2009/8/28 Johannes Schneider :
>> And I think EventType shouldn't be an enum but instead a class with
>> several constants. So everybody could add own event types if necessary.
>>
>>
>> Regards
>>
>> Johannes
>>
>> Johannes Schneider wrote:
>>> I made some progress:
>>>
>>> When using the (newly created) EventType "onclick" the behvious seems to
>>> be improved.
>>>
>>> The first time it works great, but if I add the link to the
>>> AjaxRequestTarget (so that the link is updated), the event is executed
>>> multiple times...
>>>
>>>
>>> Regards,
>>>
>>> Johannes
>>>
>>>
>>> Johannes Schneider wrote:
 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:

  Ajax here!


 Added to HomePage.java:

  AjaxLink ajaxLink = new AjaxLink("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 
>
>> 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org

>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxLink/Behaviour with shortcut

2009-08-28 Thread nino martinez wael
Thanks for the feedback, the quick solution would be to extend the
inputevent class. Did you see the example project?

2009/8/28 Johannes Schneider :
> And I think EventType shouldn't be an enum but instead a class with
> several constants. So everybody could add own event types if necessary.
>
>
> Regards
>
> Johannes
>
> Johannes Schneider wrote:
>> I made some progress:
>>
>> When using the (newly created) EventType "onclick" the behvious seems to
>> be improved.
>>
>> The first time it works great, but if I add the link to the
>> AjaxRequestTarget (so that the link is updated), the event is executed
>> multiple times...
>>
>>
>> Regards,
>>
>> Johannes
>>
>>
>> Johannes Schneider wrote:
>>> 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:
>>>
>>>  Ajax here!
>>>
>>>
>>> Added to HomePage.java:
>>>
>>>  AjaxLink ajaxLink = new AjaxLink("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 

> 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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxLink/Behaviour with shortcut

2009-08-28 Thread Johannes Schneider
And I think EventType shouldn't be an enum but instead a class with
several constants. So everybody could add own event types if necessary.


Regards

Johannes

Johannes Schneider wrote:
> I made some progress:
> 
> When using the (newly created) EventType "onclick" the behvious seems to
> be improved.
> 
> The first time it works great, but if I add the link to the
> AjaxRequestTarget (so that the link is updated), the event is executed
> multiple times...
> 
> 
> Regards,
> 
> Johannes
> 
> 
> Johannes Schneider wrote:
>> 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:
>>
>>  Ajax here!
>>
>>
>> Added to HomePage.java:
>>
>>  AjaxLink ajaxLink = new AjaxLink("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 
>>>
 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: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxLink/Behaviour with shortcut

2009-08-27 Thread Johannes Schneider
I made some progress:

When using the (newly created) EventType "onclick" the behvious seems to
be improved.

The first time it works great, but if I add the link to the
AjaxRequestTarget (so that the link is updated), the event is executed
multiple times...


Regards,

Johannes


Johannes Schneider wrote:
> 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:
> 
>  Ajax here!
> 
> 
> Added to HomePage.java:
> 
>  AjaxLink ajaxLink = new AjaxLink("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 
>>
>>> 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: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxLink/Behaviour with shortcut

2009-08-27 Thread Johannes Schneider
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:

 Ajax here!


Added to HomePage.java:

 AjaxLink ajaxLink = new AjaxLink("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 
> 
>> 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxLink/Behaviour with shortcut

2009-08-27 Thread Johannes Schneider
thanks.

danisevsky wrote:
> look at
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/
> 
> 2009/8/26 Johannes Schneider 
> 
>> 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxLink/Behaviour with shortcut

2009-08-27 Thread danisevsky
look at
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/

2009/8/26 Johannes Schneider 

> 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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


AjaxLink/Behaviour with shortcut

2009-08-26 Thread Johannes Schneider
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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org