Hi,

Any reason why you don't extend AjaxEventBehavior (with 'onclick' event) ?
It will do the same as the one below...

About StalePageException - can you create a mini quickstart that
reproduces this problem ?


On Fri, Feb 3, 2012 at 7:11 PM, Josh Chappelle <[email protected]> wrote:
> I'm getting a org.apache.wicket.request.mapper.StalePageException when
> using the CryptoMapper and clicking on a menu item. My menu items are a
> wrapper for the yui library that I created. The way that I'm creating the
> ajax callback is via a behavior. Below is my behavior. It works when I
> don't use the CryptoMapper.
>
> Any help is appreciated. Thanks.
>
> public class YuiMenuBarItemSelectionBehavior extends
> AbstractDefaultAjaxBehavior
> {
> private YuiMenuBarItem menuItem;
>  public YuiMenuBarItemSelectionBehavior(YuiMenuBarItem menuItem)
> {
> this.menuItem = menuItem;
> }
>  @Override
> protected void onBind()
> {
> super.onBind();
> menuItem.setUrl("javascript: " + generateCallbackScript("wicketAjaxGet('" +
> getCallbackUrl() + "'").toString());
> }
>
> @Override
> protected void respond(AjaxRequestTarget target)
> {
> menuItem.onMenuItemClicked(target);
> }
> }



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to