[
https://issues.apache.org/jira/browse/WICKET-4404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213583#comment-13213583
]
Martin Grigorov commented on WICKET-4404:
-----------------------------------------
I reproduced it by extracting the generated urls manually from the generated
html.
The problem is that you keep the generated callback url to the behavior in a
String instance (i.e. you cache it) at
com.test.wicket.menu.yui.YuiMenuBarItem#setUrl().
Initially the page is rendered for the home page url (i.e. '/') and at this
time you cache the generated url. Then Wicket sees that this is a stateful page
(its url needs the page id - ?0) and needs to regenerate the page html, but
since you keep the url as a member which is rendered manually at
com.test.wicket.menu.yui.YuiMenuBarItem#toJavascript() the url is not
regenerated. Later when you request this url Wicket sees that it is stale and
re-renders the whole page.
I suggest you to create a Link-like Wicket component that generates its url
(javascript:....) whenever asked by Wicket (i.e. when #onComponentTag() is
called). This way it will have the correct url.
> CryptoMapper is not successfully decoding
> AbstractDefaultAjaxBehavior.generateCallbackScript request
> ----------------------------------------------------------------------------------------------------
>
> Key: WICKET-4404
> URL: https://issues.apache.org/jira/browse/WICKET-4404
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.4
> Environment: IE9
> Reporter: Josh Chappelle
> Labels: 1.5, AbstractDefaultAjaxBehavior, cryptomapper,
> generateCallbackScript, wicket
> Attachments: HomePageSource.txt, wicket_cryptomapper_quickstart.zip
>
>
> I have a yui menu wrapper that I have written that does not work when the
> cryptomapper is being used. It works fine otherwise. It basically outputs
> javascript in the header and that javascript renders the dom elements. So the
> only wicket component is a div that represents the menu. All of the items get
> generated by the javascript. One of the attributes on the menu item is a
> "url" attribute. In the url attribute I have "javascript: " and then the
> javascript string that is created via the generateCallbackScript method. The
> respond method never gets called if the cryptomapper is enabled.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira