Re: AjaxFallbackLink does not work on Windows Mobile Internet Explorer

2009-12-03 Thread Leszek Gawron

Richard Wilkinson wrote:

Actually I've just realiaed, you can't remove the behaviour with component
instansiation because it hasn't been added yet. Look at
ibeforeonbeforerenderlistener. Its called something like that, can't check
at the moment.


Thank you, you've been very helpful. This code did the trick:


addPostComponentOnBeforeRenderListener( new IComponentOnBeforeRenderListener() {
@Override
public void onBeforeRender( Component component ) {
ListIBehavior behaviors = component.getBehaviors();
for ( IBehavior behavior : behaviors ) {
if ( AjaxEventBehavior.class.isAssignableFrom( 
behavior.getClass() ) ) {
AjaxEventBehavior aeb = (AjaxEventBehavior) 
behavior;
if ( aeb.getEvent().equalsIgnoreCase( onclick 
) )
component.remove( behavior );
}
}
}
} );


works like a charm.

lg

--
Leszek Gawron  http://lgawron.blogspot.com

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



AjaxFallbackLink does not work on Windows Mobile Internet Explorer

2009-12-02 Thread Leszek Gawron
it seems that Mobile IE understands onclick a little bit to start 
running it but not enough to actually process the request so no actual 
fallback is being made.


As I would really like to keep my code as it is I thought I would 
introduce Simple HTML mode which would strip all onclick tags and 
leave the browser with the href= tags it understands. Is there any 
elegant way to do it globally?


lg

--
Leszek Gawron  http://lgawron.blogspot.com

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



Re: AjaxFallbackLink does not work on Windows Mobile Internet Explorer

2009-12-02 Thread richardwilko

Hi,

You could implement your own IComponentInstantiationListener, and in it add
some sort of behavior to modify the component which removes the onclick.  Or
you could try an remove the AjaxEventBehavior from the AjaxFallbackLink. 
This should work globally but will only require you to modify your code in
one place.

eg something like this in application init:

if(simple mode){
addComponentInstantiationListener(
new IComponentInstantiationListener(){

onInstantiation(Component component){
if(component instance of AjaxFallbackLink){
   IBehaviour b = code to get behaviour
   component.removeBehaviour(b)
}
}
}
)
}

not sure if that will work but it seems like it should.

Richard


Leszek Gawron-2 wrote:
  a
 it seems that Mobile IE understands onclick a little bit to start 
 running it but not enough to actually process the request so no actual 
 fallback is being made.
 
 As I would really like to keep my code as it is I thought I would 
 introduce Simple HTML mode which would strip all onclick tags and 
 leave the browser with the href= tags it understands. Is there any 
 elegant way to do it globally?
 
   lg
 
 -- 
 Leszek Gawron  http://lgawron.blogspot.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://old.nabble.com/AjaxFallbackLink-does-not-work-on-Windows-Mobile-Internet-Explorer-tp26612035p26612857.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxFallbackLink does not work on Windows Mobile Internet Explorer

2009-12-02 Thread Richard Wilkinson
Actually I've just realiaed, you can't remove the behaviour with component
instansiation because it hasn't been added yet. Look at
ibeforeonbeforerenderlistener. Its called something like that, can't check
at the moment.
Richard

On 2 Dec 2009 17:30, richardwilko richardjohnwilkin...@gmail.com wrote:


Hi,

You could implement your own IComponentInstantiationListener, and in it add
some sort of behavior to modify the component which removes the onclick.  Or
you could try an remove the AjaxEventBehavior from the AjaxFallbackLink.
This should work globally but will only require you to modify your code in
one place.

eg something like this in application init:

if(simple mode){
addComponentInstantiationListener(
new IComponentInstantiationListener(){

onInstantiation(Component component){
if(component instance of AjaxFallbackLink){
  IBehaviour b = code to get behaviour
  component.removeBehaviour(b)
}
}
}
)
}

not sure if that will work but it seems like it should.

Richard


Leszek Gawron-2 wrote:
  a

 it seems that Mobile IE understands onclick a little bit to start 
running it but not enough t...
-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk
--
View this message in context:
http://old.nabble.com/AjaxFallbackLink-does-not-work-on-Windows-Mobile-Internet-Explorer-tp26612035p26612857.html
Sent from the Wicket - User mailing list archive at Nabble.com.

- To
unsubscribe, e-mail: user...