On Tue, Jan 10, 2012 at 1:53 PM, armandoxxx <armando....@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-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Reply via email to