Re: StalePageException with CryptoMapper

2012-02-10 Thread jchappelle
Martin,

Here is the jira bug:

https://issues.apache.org/jira/browse/WICKET-4404

I created a quickstart and the results are slightly different but it still
does not work. I don't get a StalePageException but the respond method of my
behavior never gets called. 

Thanks for the help.

Josh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StalePageException-with-CryptoMapper-tp4355184p4377238.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



Re: StalePageException with CryptoMapper

2012-02-06 Thread Martin Grigorov
On Tue, Feb 7, 2012 at 12:10 AM, jchappelle  wrote:
> Hi Martin,
>
> The reason I don't extend the AjaxEventBehavior is because I'm using the YUI
> javascript library to create my menu and my behavior is not being attached
> to a dom element. There are two ways they allow you to create the menu. One
> way is by having some markup that backs up the javascript or by pure
> javascript. I'm using the pure javascript way. So my wicket java code just
> builds up a javascript string that gets loaded when the page is loaded and
> it knows the div's id to write the output to.
>
>
> I know that AjaxLinks are not broken and I'm pretty sure that I'm going
> through the same code to generate my url that the AjaxLink class does.
>
> I'll work on creating a quickstart. Should I just upload it to this post or
> is there a different place for those?
>

https://issues.apache.org/jira/browse/WICKET

> Thanks,
>
> Josh
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/StalePageException-with-CryptoMapper-tp4355184p4362997.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



Re: StalePageException with CryptoMapper

2012-02-06 Thread jchappelle
Hi Martin,

The reason I don't extend the AjaxEventBehavior is because I'm using the YUI
javascript library to create my menu and my behavior is not being attached
to a dom element. There are two ways they allow you to create the menu. One
way is by having some markup that backs up the javascript or by pure
javascript. I'm using the pure javascript way. So my wicket java code just
builds up a javascript string that gets loaded when the page is loaded and
it knows the div's id to write the output to.


I know that AjaxLinks are not broken and I'm pretty sure that I'm going
through the same code to generate my url that the AjaxLink class does.

I'll work on creating a quickstart. Should I just upload it to this post or
is there a different place for those?

Thanks,

Josh


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StalePageException-with-CryptoMapper-tp4355184p4362997.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



Re: StalePageException with CryptoMapper

2012-02-04 Thread Martin Grigorov
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  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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



StalePageException with CryptoMapper

2012-02-03 Thread Josh Chappelle
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);
}
}