You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by armandoxxx <ar...@dropchop.com> on 2012/01/10 10:24:01 UTC
Force fallback on links possible ?
Hey
Can I force AjaxFallbackLinks not to use ajax when i want it so ?
The cause for my question is IE8 .. it takes shit loads of time to replace
DOM nodes on ajax and application has a lof of panels to replace ..
Kind regards
Armando
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281533.html
Sent from the Users forum 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
Re: Force fallback on links possible ?
Posted by armandoxxx <ar...@dropchop.com>.
Thank you for your reply !
Regards
Armando
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281633.html
Sent from the Users forum 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
Re: Force fallback on links possible ?
Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Jan 10, 2012 at 1:53 PM, armandoxxx <ar...@dropchop.com> wrote:
> Repost without raw tags ...
>
> I tried your suggestion and it's not working ... can you check please ?
>
> my link
>
>
>
> AjaxFallbackLink<DateOption>
> link = new AjaxFallbackLink<DateOption>("link", new
> Model<DateOption>(dateOption)) {
> @Override
> public void onClick(final AjaxRequestTarget theTarget) {
> /* some action */
> }
>
> @Override
> protected IAjaxCallDecorator getAjaxCallDecorator() {
> return new AjaxCallDecorator() {
> public CharSequence decorateScript(CharSequence script) {
> return "return true;";
> }
> };
> }
>
> };
This looks OK. I think it should work.
>
>
>
> and rendered link output
>
> tag a
> id="link580"
>
> href="analytics?5-1.ILinkListener-htmlBody-filtersWrapper-filterCollectionPanel-dateFilter-contentWrapper-dateForm-dates-3-link"
> onclick="var
> wcall=wicketAjaxGet('analytics?5-1.IBehaviorListener.0-htmlBody-filtersWrapper-filterCollectionPanel-dateFilter-contentWrapper-dateForm-dates-3-link',function()
> { }.bind(this),function() { }.bind(this), function() {return
> Wicket.$('link580') != null;}.bind(this));return !wcall;">
> my text
> close tag a
>
> onClick attribute was not replaced "decorated"
>
> what am I doing wrong ?
>
> the sample i looked on how to do it ... (taken from wiki)
>
> new AjaxLink("link") {
> protected onClick(AjaxRequestTarget target) { ...}
> protected IAjaxCallDecorator getAjaxCallDecorator() {
> return new AjaxCallDecorator() {
> public CharSequence decorateScript(CharSequence script) {
> return "alert('This is my javascript call'); " + script;
> }
> }
> }
> }
>
>
> regards
>
> Armando
> PS: can you read this ?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281770.html
> Sent from the Users forum 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
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Force fallback on links possible ?
Posted by Martin Grigorov <mg...@apache.org>.
Fix the wiki page too ;-)
It's community based!
On Tue, Jan 10, 2012 at 2:44 PM, armandoxxx <ar...@dropchop.com> wrote:
> fixed it ...
>
> had wrong method signature ...
> should have been:
> public CharSequence decorateScript(final Component theComponent, final
> CharSequence theScript)
>
>
> regards
>
> Armando
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281856.html
> Sent from the Users forum 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
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Force fallback on links possible ?
Posted by armandoxxx <ar...@dropchop.com>.
fixed it ...
had wrong method signature ...
should have been:
public CharSequence decorateScript(final Component theComponent, final
CharSequence theScript)
regards
Armando
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281856.html
Sent from the Users forum 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
Re: Force fallback on links possible ?
Posted by armandoxxx <ar...@dropchop.com>.
Repost without raw tags ...
I tried your suggestion and it's not working ... can you check please ?
my link
AjaxFallbackLink<DateOption>
link = new AjaxFallbackLink<DateOption>("link", new
Model<DateOption>(dateOption)) {
@Override
public void onClick(final AjaxRequestTarget theTarget) {
/* some action */
}
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
public CharSequence decorateScript(CharSequence script) {
return "return true;";
}
};
}
};
and rendered link output
tag a
id="link580"
href="analytics?5-1.ILinkListener-htmlBody-filtersWrapper-filterCollectionPanel-dateFilter-contentWrapper-dateForm-dates-3-link"
onclick="var
wcall=wicketAjaxGet('analytics?5-1.IBehaviorListener.0-htmlBody-filtersWrapper-filterCollectionPanel-dateFilter-contentWrapper-dateForm-dates-3-link',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('link580') != null;}.bind(this));return !wcall;">
my text
close tag a
onClick attribute was not replaced "decorated"
what am I doing wrong ?
the sample i looked on how to do it ... (taken from wiki)
new AjaxLink("link") {
protected onClick(AjaxRequestTarget target) { ...}
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
public CharSequence decorateScript(CharSequence script) {
return "alert('This is my javascript call'); " + script;
}
}
}
}
regards
Armando
PS: can you read this ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281770.html
Sent from the Users forum 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
Re: Force fallback on links possible ?
Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Jan 10, 2012 at 12:53 PM, armandoxxx <ar...@dropchop.com> wrote:
> I tried your suggestion and it's not working ... can you check please ?
>
> my link
>
>
> and rendered link output
>
> onClick attribute was not replaced "decorated"
>
> what am I doing wrong ?
Nothing to read above...
>
> the sample i looked on how to do it ... (taken from wiki)
>
>
>
> regards
>
> Armando
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281686.html
> Sent from the Users forum 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
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Force fallback on links possible ?
Posted by armandoxxx <ar...@dropchop.com>.
I tried your suggestion and it's not working ... can you check please ?
my link
and rendered link output
onClick attribute was not replaced "decorated"
what am I doing wrong ?
the sample i looked on how to do it ... (taken from wiki)
regards
Armando
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281686.html
Sent from the Users forum 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
Re: Force fallback on links possible ?
Posted by Martin Grigorov <mg...@apache.org>.
Use IAjaxCallDecorator that checks the browser version and if IE8 then
returns just "true" ignoring the Ajax callback script generated by
Wicket.
This will fallback to non-ajax request.
On Tue, Jan 10, 2012 at 11:24 AM, armandoxxx <ar...@dropchop.com> wrote:
> Hey
>
> Can I force AjaxFallbackLinks not to use ajax when i want it so ?
>
> The cause for my question is IE8 .. it takes shit loads of time to replace
> DOM nodes on ajax and application has a lof of panels to replace ..
>
> Kind regards
>
> Armando
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281533.html
> Sent from the Users forum 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
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Force fallback on links possible ?
Posted by armandoxxx <ar...@dropchop.com>.
thank you for your reply ...
regards
Armando
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281629.html
Sent from the Users forum 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
Re: Force fallback on links possible ?
Posted by Martijn Dashorst <ma...@gmail.com>.
if(client.isIe(8)) {
add(new Link(){});
}
else {
add(new AjaxFallbackLink(){});
}
or you could call setResponsePage(getPage()) in the onclick of the
AFL, which will do a round trip.
or you could create your own AFL that checks for IE-ness, and doesn't
render the ajax actions all together.
Martijn
On Tue, Jan 10, 2012 at 10:24 AM, armandoxxx <ar...@dropchop.com> wrote:
> Hey
>
> Can I force AjaxFallbackLinks not to use ajax when i want it so ?
>
> The cause for my question is IE8 .. it takes shit loads of time to replace
> DOM nodes on ajax and application has a lof of panels to replace ..
>
> Kind regards
>
> Armando
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-fallback-on-links-possible-tp4281533p4281533.html
> Sent from the Users forum 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
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org