You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Leszek Gawron <lg...@apache.org> on 2009/12/02 17:39:08 UTC
AjaxFallbackLink does not work on Windows Mobile Internet Explorer
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxFallbackLink does not work on Windows Mobile Internet Explorer
Posted by Leszek Gawron <lg...@apache.org>.
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 ) {
> List<IBehavior> 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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxFallbackLink does not work on Windows Mobile Internet
Explorer
Posted by Richard Wilkinson <ri...@googlemail.com>.
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" <ri...@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...
Re: AjaxFallbackLink does not work on Windows Mobile Internet
Explorer
Posted by richardwilko <ri...@gmail.com>.
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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org