Re: setResponsePage() in AjaxSubmitLink.onSubmit() redirects to relative URL

2010-03-04 Thread Riyad Kalla
Nikita,

The wicket team started the vote on if 1.4.7 was ready to go out a few
days ago, it should be either late this week or early next when the
release goes out if that helps at all (don't know how immediate your
need is).

-R

On Wed, Mar 3, 2010 at 4:16 PM, Nikita Tovstoles
nikita.tovsto...@gmail.com wrote:
 Looks like this bug was identified, and resolved but the fix hasn't been
 released yet:
 https://issues.apache.org/jira/browse/WICKET-2717

 So, yeah, any tips on an alternative way of combining Ajax validation +
 plain form submits?

 thanks
 -nikita


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



Re: setResponsePage() in AjaxSubmitLink.onSubmit() redirects to relative URL

2010-03-04 Thread Riyad Kalla
I take that back, the vote passed, looks like 24hrs per Igor's comment
on wicket-dev?

===
the vote has passed with

3 +1 binding votes and 5 +1 nonbinding votes

i will upload the artifacts to mirrors and write up an announcement
after the mirrors have synced (24 hours).

cheers
===

On Thu, Mar 4, 2010 at 4:46 AM, Riyad Kalla rka...@gmail.com wrote:
 Nikita,

 The wicket team started the vote on if 1.4.7 was ready to go out a few
 days ago, it should be either late this week or early next when the
 release goes out if that helps at all (don't know how immediate your
 need is).

 -R

 On Wed, Mar 3, 2010 at 4:16 PM, Nikita Tovstoles
 nikita.tovsto...@gmail.com wrote:
 Looks like this bug was identified, and resolved but the fix hasn't been
 released yet:
 https://issues.apache.org/jira/browse/WICKET-2717

 So, yeah, any tips on an alternative way of combining Ajax validation +
 plain form submits?

 thanks
 -nikita



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



Re: setResponsePage() in AjaxSubmitLink.onSubmit() redirects to relative URL

2010-03-04 Thread Nikita Tovstoles
just tested with 1.4.7 - can confirm that the issue's been resolved. thanks
for a prompt response and congrats on the release

On Thu, Mar 4, 2010 at 3:51 AM, Riyad Kalla rka...@gmail.com wrote:

 I take that back, the vote passed, looks like 24hrs per Igor's comment
 on wicket-dev?

 ===
 the vote has passed with

 3 +1 binding votes and 5 +1 nonbinding votes

 i will upload the artifacts to mirrors and write up an announcement
 after the mirrors have synced (24 hours).

 cheers
 ===

 On Thu, Mar 4, 2010 at 4:46 AM, Riyad Kalla rka...@gmail.com wrote:
  Nikita,
 
  The wicket team started the vote on if 1.4.7 was ready to go out a few
  days ago, it should be either late this week or early next when the
  release goes out if that helps at all (don't know how immediate your
  need is).
 
  -R
 
  On Wed, Mar 3, 2010 at 4:16 PM, Nikita Tovstoles
  nikita.tovsto...@gmail.com wrote:
  Looks like this bug was identified, and resolved but the fix hasn't been
  released yet:
  https://issues.apache.org/jira/browse/WICKET-2717
 
  So, yeah, any tips on an alternative way of combining Ajax validation +
  plain form submits?
 
  thanks
  -nikita
 
 

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




-- 
---
Nikita Tovstoles
CTO, CastaneaLabs.com
(m) +1-650-996-8173
(e) ntovsto...@castanealabs.com
---


setResponsePage() in AjaxSubmitLink.onSubmit() redirects to relative URL

2010-03-03 Thread Nikita Tovstoles
Hello,

I have a page with a form and an AjaxSubmitLink. onSubmit(), I need to
either render an ajax response or a plain redirect to the same page,
depending on a certain condition. I cannot get the latter case (redirect to
same page) to work correctly:

The Page is mounted like so:
mount(new HybridUrlCodingStrategy(/pages/mypage, MyPage.class));

protected void onSubmit(AjaxRequestTarget target, Form? form)
{
 if(condition)
 {
  target.addComponent(c);
 } else {
  setResponsePage(getPage().getClass());
  setRedirect(true);
 }
}

The problem is in the 'else' case I get redirected to: 'pages/mypage' -
without the leading slash; so the location bar URL ends up:

http://localhost:8080/pages/mypage/pages/mypage (and I get a 404).

I think this is happening because of the following in
WebRequestCodingStrategy.encode():

boolean isAjax =
((WebRequestCycle)requestCycle).getWebRequest().isAjax();
if (url != null  !portletRequest)
{
// We've found the URL and it's mounted.

// In the case of Ajax, we don't want to prepend a relative path
// to the mounted URL. See WICKET-2312.
skipRelativePathPrefix = isAjax;
}

seems like in this case skipRelativePathPrefix  should remain false because
BookmarkablePageRequestTarget is being used.

If the above is indeed a bug, how else can I combine Ajax validation + plain
form submits?

thanks,

-nikita


Re: setResponsePage() in AjaxSubmitLink.onSubmit() redirects to relative URL

2010-03-03 Thread Nikita Tovstoles
Looks like this bug was identified, and resolved but the fix hasn't been
released yet:
https://issues.apache.org/jira/browse/WICKET-2717

So, yeah, any tips on an alternative way of combining Ajax validation +
plain form submits?

thanks
-nikita