You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Christopher Merrill <ch...@webperformance.com> on 2015/04/16 19:31:21 UTC

A few questions - upgrading from 1.5 to 6.19

Our app hasn't been under active development for a while, so we have fallen
a bit behind. We're about to start a new project with our wicket app, so I
thought our first step should be getting current. I read the migration
guide - it helped get me through a lot of issues. So I've been able to get
past all the obvious stuff (compile errors) and have our app up and running
under 6.19, with a few glaring problems. There is nothing in the console or
logs when I exercise these pages/functions.

#1 is with rendering a full page URL (for inclusion in an email).

After constructing the parameters, our code does this:
    Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
    return _req_cycle.getUrlRenderer().renderFullUrl(url);

In 1.5, this generated a URL like this (which works)

http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
but now we get:

http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270

Note the extra "pages/registration/". Any ideas where I should look into
this? The pages are mounted with a friendlier URL - could this be related?


#2 is with an IndicatingAjaxLink.
The HTML looks like this:
  <a href="#" wicket:id="create_customer_link"><img
src="images/add_button.gif"><wicket:message
key="Create_customer">create...</wicket:message></a>
And we create it with:
_create_customer_link = new
IndicatingAjaxLink<License>("create_customer_link")
    {
    @Override
    public void onClick(AjaxRequestTarget target)
    {
followed by our onClick logic.

But the generated HTML has a bad href and no onClick():
<a href="javascript:;" wicket:id="create_customer_link"
id="create__customer__linkf"><img
src="../../images/add_button.gif"><wicket:message
key="Create_customer">Create customer</wicket:message></a><span
style="display:none;" class="wicket-ajax-indicator"
id="create__customer__linkf--ajax-indicator"><img
src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
alt=""/></span>
Before the upgrade, it would render as:
<a href="#" id="id29" onclick="if (function(){return
Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
{
;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
{ ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
function() {return Wicket.$(&#039;id29&#039;) != null;}.bind(this));return
!wcall;"><img src="../../images/add_button.gif">Create customer</a><span
style="display:none;" class="wicket-ajax-indicator"
id="id29--ajax-indicator"><img
src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
alt=""/></span>

I feel like I should know where to start investigating this, but it's been
a few years since I've been active with Wicket and I'm flailing around a
bit at the moment. Any help would be greatly appreciated!

TIA!
Chris

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Christopher Merrill <ch...@webperformance.com>.
It is not even getting that far :(  Breakpoint on line 603 is never
hit...nor is a breakpoint on line 554, for that matter. I was starting to
suspect something was up with the Dev Tools in my browser(s), until I
successfully stopped at a breakpoint in some example scripts.



On Fri, Apr 17, 2015 at 5:16 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Then most probably some precondition stops the Ajax call from firing.
> Put a breakpoint at
>
> https://github.com/apache/wicket/blob/e07475cf989565bad53fd8dfcd5d109912ae6bef/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L603
> and see what happens.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sat, Apr 18, 2015 at 12:08 AM, Christopher Merrill <
> chris@webperformance.com> wrote:
>
> > Oh...uhhh...yeah. Gee, if I wasn't working on 3 things at once, I might
> > have thought of that!  I wish there was a user group that could help with
> > _that_ problem :)
> >
> >
> > So no, there is no traffic reported from either Chrome or Firefox network
> > tabs after the initial page load. I tried with multiple different Ajax
> > controls - they all exhibit the same behavior.
> >
> >
> > So when we upgraded from 1.5 to 6.19, I just grabbed the latest versions
> of
> > the JARs we already had in our build. We have a very manual build system
> > (working on moving toward something with dependency management...maybe
> > Gradle), so if there are new module dependencies beyond those obvious in
> > the dependencies listed at mavenrepository, for example, I might be
> missing
> > those. Could that be the cause?
> >
> > Here's what we have:
> > joda-time-2.0.jar
> > wicket-auth-roles-6.19.0.jar
> > wicket-core-6.19.0.jar
> > wicket-datetime-6.19.0.jar
> > wicket-extensions-6.19.0.jar
> > wicket-ioc-6.19.0.jar
> > wicket-request-6.19.0.jar
> > wicket-spring-6.19.0.jar
> > wicket-util-6.19.0.jar
> > wicketstuff-gae-initializer-6.19.0.jar
> > wicketstuff-progressbar-6.19.0.jar
> >
> > TIA!
> > Chris
> >
> >
> >
> > On Fri, Apr 17, 2015 at 4:48 PM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Use the browser's Dev Tools > Network tab.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Apr 17, 2015 at 11:42 PM, Christopher Merrill <
> > > chris@webperformance.com> wrote:
> > >
> > > > The "wicket ajax debug" window reports nothing when I click Ajax
> links
> > in
> > > > either Chrome or Firefox. Is there somewhere else I should look for
> an
> > > > indication of Ajax activity - somewhere in Wicket to set a breakpoint
> > or
> > > > logging to enable?
> > > >
> > > > BTW, That window is acting a little flakey for me - the move and
> resize
> > > > don't work. Is that normal? If not, possibly related?
> > > >
> > > > TIA!
> > > > Chris
> > > >
> > > >
> > > > On Fri, Apr 17, 2015 at 4:27 PM, Martin Grigorov <
> mgrigorov@apache.org
> > >
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Check whether the browser makes an Ajax request to the server when
> > you
> > > > > click the link.
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Fri, Apr 17, 2015 at 11:20 PM, Christopher Merrill <
> > > > > chris@webperformance.com> wrote:
> > > > >
> > > > > > Thanks, Sven.  I read that and I _think_ I understand it.  I
> looked
> > > > back
> > > > > at
> > > > > > the source and found:
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> Wicket.Ajax.ajax({"u":"./OrganizationAdministration?7-1.IBehaviorListener.0-form-create_customer_link","e":"click","c":"create__customer__link5","i":"create__customer__link5--ajax-indicator"});;
> > > > > >
> > > > > > which seems to be registering a listener. But that doesn't tell
> me
> > > why
> > > > my
> > > > > > onClick() code is not called.
> > > > > >
> > > > > > This part of the article you linked:
> > > > > >   "The good news is the client APIs are mostly the same and the
> > > > > application
> > > > > > developers will not need to change their applications."
> > > > > > seems to be indicating that I should not have to change my code -
> > as
> > > > the
> > > > > > IndicatingAjaxLink component (a wicket extension) or the AjaxLink
> > > > should
> > > > > be
> > > > > > handling that. Am I wrong?
> > > > > >
> > > > > > This page seems to indicate overriding onClick() for an AjaxLink
> is
> > > > still
> > > > > > the way to go:
> > > > > >   https://wicket.apache.org/guide/guide/ajax.html
> > > > > >
> > > > > > I feel like I'm missing something...
> > > > > >
> > > > > > Chris
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Apr 16, 2015 at 3:59 PM, Sven Meier <sv...@meiers.net>
> > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > >  #2 is with an IndicatingAjaxLink.
> > > > > > >> But the generated HTML has a bad href and no onClick():
> > > > > > >>
> > > > > > >
> > > > > > > Wicket uses event registration now:
> > > > > > >
> > > > > > >
> > > http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
> > > > > > >
> > > > > > > Have fun
> > > > > > > Sven
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 16.04.2015 19:31, Christopher Merrill wrote:
> > > > > > >
> > > > > > >> Our app hasn't been under active development for a while, so
> we
> > > have
> > > > > > >> fallen
> > > > > > >> a bit behind. We're about to start a new project with our
> wicket
> > > > app,
> > > > > > so I
> > > > > > >> thought our first step should be getting current. I read the
> > > > migration
> > > > > > >> guide - it helped get me through a lot of issues. So I've been
> > > able
> > > > to
> > > > > > get
> > > > > > >> past all the obvious stuff (compile errors) and have our app
> up
> > > and
> > > > > > >> running
> > > > > > >> under 6.19, with a few glaring problems. There is nothing in
> the
> > > > > console
> > > > > > >> or
> > > > > > >> logs when I exercise these pages/functions.
> > > > > > >>
> > > > > > >> #1 is with rendering a full page URL (for inclusion in an
> > email).
> > > > > > >>
> > > > > > >> After constructing the parameters, our code does this:
> > > > > > >>      Url url = RequestCycle.get().mapUrlFor(page_class,
> > > parameters);
> > > > > > >>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
> > > > > > >>
> > > > > > >> In 1.5, this generated a URL like this (which works)
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > > > > >> but now we get:
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > > > > >>
> > > > > > >> Note the extra "pages/registration/". Any ideas where I should
> > > look
> > > > > into
> > > > > > >> this? The pages are mounted with a friendlier URL - could this
> > be
> > > > > > related?
> > > > > > >>
> > > > > > >>
> > > > > > >> #2 is with an IndicatingAjaxLink.
> > > > > > >> The HTML looks like this:
> > > > > > >>    <a href="#" wicket:id="create_customer_link"><img
> > > > > > >> src="images/add_button.gif"><wicket:message
> > > > > > >> key="Create_customer">create...</wicket:message></a>
> > > > > > >> And we create it with:
> > > > > > >> _create_customer_link = new
> > > > > > >> IndicatingAjaxLink<License>("create_customer_link")
> > > > > > >>      {
> > > > > > >>      @Override
> > > > > > >>      public void onClick(AjaxRequestTarget target)
> > > > > > >>      {
> > > > > > >> followed by our onClick logic.
> > > > > > >>
> > > > > > >> But the generated HTML has a bad href and no onClick():
> > > > > > >> <a href="javascript:;" wicket:id="create_customer_link"
> > > > > > >> id="create__customer__linkf"><img
> > > > > > >> src="../../images/add_button.gif"><wicket:message
> > > > > > >> key="Create_customer">Create
> customer</wicket:message></a><span
> > > > > > >> style="display:none;" class="wicket-ajax-indicator"
> > > > > > >> id="create__customer__linkf--ajax-indicator"><img
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
> > > > > > >> alt=""/></span>
> > > > > > >> Before the upgrade, it would render as:
> > > > > > >> <a href="#" id="id29" onclick="if (function(){return
> > > > > > >> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
> > > > > > >>
> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
> > > > > > >> {
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
> > > > > > >> {
> > > > > > >>
> > > > > >
> > > >
> > ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
> > > > > > >> function() {return Wicket.$(&#039;id29&#039;) !=
> > > > > > null;}.bind(this));return
> > > > > > >> !wcall;"><img src="../../images/add_button.gif">Create
> > > > > customer</a><span
> > > > > > >> style="display:none;" class="wicket-ajax-indicator"
> > > > > > >> id="id29--ajax-indicator"><img
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
> > > > > > >> alt=""/></span>
> > > > > > >>
> > > > > > >> I feel like I should know where to start investigating this,
> but
> > > > it's
> > > > > > been
> > > > > > >> a few years since I've been active with Wicket and I'm
> flailing
> > > > > around a
> > > > > > >> bit at the moment. Any help would be greatly appreciated!
> > > > > > >>
> > > > > > >> TIA!
> > > > > > >> Chris
> > > > > > >>
> > > > > > >>
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Martin Grigorov <mg...@apache.org>.
Then most probably some precondition stops the Ajax call from firing.
Put a breakpoint at
https://github.com/apache/wicket/blob/e07475cf989565bad53fd8dfcd5d109912ae6bef/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L603
and see what happens.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sat, Apr 18, 2015 at 12:08 AM, Christopher Merrill <
chris@webperformance.com> wrote:

> Oh...uhhh...yeah. Gee, if I wasn't working on 3 things at once, I might
> have thought of that!  I wish there was a user group that could help with
> _that_ problem :)
>
>
> So no, there is no traffic reported from either Chrome or Firefox network
> tabs after the initial page load. I tried with multiple different Ajax
> controls - they all exhibit the same behavior.
>
>
> So when we upgraded from 1.5 to 6.19, I just grabbed the latest versions of
> the JARs we already had in our build. We have a very manual build system
> (working on moving toward something with dependency management...maybe
> Gradle), so if there are new module dependencies beyond those obvious in
> the dependencies listed at mavenrepository, for example, I might be missing
> those. Could that be the cause?
>
> Here's what we have:
> joda-time-2.0.jar
> wicket-auth-roles-6.19.0.jar
> wicket-core-6.19.0.jar
> wicket-datetime-6.19.0.jar
> wicket-extensions-6.19.0.jar
> wicket-ioc-6.19.0.jar
> wicket-request-6.19.0.jar
> wicket-spring-6.19.0.jar
> wicket-util-6.19.0.jar
> wicketstuff-gae-initializer-6.19.0.jar
> wicketstuff-progressbar-6.19.0.jar
>
> TIA!
> Chris
>
>
>
> On Fri, Apr 17, 2015 at 4:48 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Use the browser's Dev Tools > Network tab.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Fri, Apr 17, 2015 at 11:42 PM, Christopher Merrill <
> > chris@webperformance.com> wrote:
> >
> > > The "wicket ajax debug" window reports nothing when I click Ajax links
> in
> > > either Chrome or Firefox. Is there somewhere else I should look for an
> > > indication of Ajax activity - somewhere in Wicket to set a breakpoint
> or
> > > logging to enable?
> > >
> > > BTW, That window is acting a little flakey for me - the move and resize
> > > don't work. Is that normal? If not, possibly related?
> > >
> > > TIA!
> > > Chris
> > >
> > >
> > > On Fri, Apr 17, 2015 at 4:27 PM, Martin Grigorov <mgrigorov@apache.org
> >
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Check whether the browser makes an Ajax request to the server when
> you
> > > > click the link.
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Fri, Apr 17, 2015 at 11:20 PM, Christopher Merrill <
> > > > chris@webperformance.com> wrote:
> > > >
> > > > > Thanks, Sven.  I read that and I _think_ I understand it.  I looked
> > > back
> > > > at
> > > > > the source and found:
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> Wicket.Ajax.ajax({"u":"./OrganizationAdministration?7-1.IBehaviorListener.0-form-create_customer_link","e":"click","c":"create__customer__link5","i":"create__customer__link5--ajax-indicator"});;
> > > > >
> > > > > which seems to be registering a listener. But that doesn't tell me
> > why
> > > my
> > > > > onClick() code is not called.
> > > > >
> > > > > This part of the article you linked:
> > > > >   "The good news is the client APIs are mostly the same and the
> > > > application
> > > > > developers will not need to change their applications."
> > > > > seems to be indicating that I should not have to change my code -
> as
> > > the
> > > > > IndicatingAjaxLink component (a wicket extension) or the AjaxLink
> > > should
> > > > be
> > > > > handling that. Am I wrong?
> > > > >
> > > > > This page seems to indicate overriding onClick() for an AjaxLink is
> > > still
> > > > > the way to go:
> > > > >   https://wicket.apache.org/guide/guide/ajax.html
> > > > >
> > > > > I feel like I'm missing something...
> > > > >
> > > > > Chris
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Apr 16, 2015 at 3:59 PM, Sven Meier <sv...@meiers.net>
> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > >  #2 is with an IndicatingAjaxLink.
> > > > > >> But the generated HTML has a bad href and no onClick():
> > > > > >>
> > > > > >
> > > > > > Wicket uses event registration now:
> > > > > >
> > > > > >
> > http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
> > > > > >
> > > > > > Have fun
> > > > > > Sven
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 16.04.2015 19:31, Christopher Merrill wrote:
> > > > > >
> > > > > >> Our app hasn't been under active development for a while, so we
> > have
> > > > > >> fallen
> > > > > >> a bit behind. We're about to start a new project with our wicket
> > > app,
> > > > > so I
> > > > > >> thought our first step should be getting current. I read the
> > > migration
> > > > > >> guide - it helped get me through a lot of issues. So I've been
> > able
> > > to
> > > > > get
> > > > > >> past all the obvious stuff (compile errors) and have our app up
> > and
> > > > > >> running
> > > > > >> under 6.19, with a few glaring problems. There is nothing in the
> > > > console
> > > > > >> or
> > > > > >> logs when I exercise these pages/functions.
> > > > > >>
> > > > > >> #1 is with rendering a full page URL (for inclusion in an
> email).
> > > > > >>
> > > > > >> After constructing the parameters, our code does this:
> > > > > >>      Url url = RequestCycle.get().mapUrlFor(page_class,
> > parameters);
> > > > > >>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
> > > > > >>
> > > > > >> In 1.5, this generated a URL like this (which works)
> > > > > >>
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > > > >> but now we get:
> > > > > >>
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > > > >>
> > > > > >> Note the extra "pages/registration/". Any ideas where I should
> > look
> > > > into
> > > > > >> this? The pages are mounted with a friendlier URL - could this
> be
> > > > > related?
> > > > > >>
> > > > > >>
> > > > > >> #2 is with an IndicatingAjaxLink.
> > > > > >> The HTML looks like this:
> > > > > >>    <a href="#" wicket:id="create_customer_link"><img
> > > > > >> src="images/add_button.gif"><wicket:message
> > > > > >> key="Create_customer">create...</wicket:message></a>
> > > > > >> And we create it with:
> > > > > >> _create_customer_link = new
> > > > > >> IndicatingAjaxLink<License>("create_customer_link")
> > > > > >>      {
> > > > > >>      @Override
> > > > > >>      public void onClick(AjaxRequestTarget target)
> > > > > >>      {
> > > > > >> followed by our onClick logic.
> > > > > >>
> > > > > >> But the generated HTML has a bad href and no onClick():
> > > > > >> <a href="javascript:;" wicket:id="create_customer_link"
> > > > > >> id="create__customer__linkf"><img
> > > > > >> src="../../images/add_button.gif"><wicket:message
> > > > > >> key="Create_customer">Create customer</wicket:message></a><span
> > > > > >> style="display:none;" class="wicket-ajax-indicator"
> > > > > >> id="create__customer__linkf--ajax-indicator"><img
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
> > > > > >> alt=""/></span>
> > > > > >> Before the upgrade, it would render as:
> > > > > >> <a href="#" id="id29" onclick="if (function(){return
> > > > > >> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
> > > > > >> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
> > > > > >> {
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
> > > > > >> {
> > > > > >>
> > > > >
> > >
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
> > > > > >> function() {return Wicket.$(&#039;id29&#039;) !=
> > > > > null;}.bind(this));return
> > > > > >> !wcall;"><img src="../../images/add_button.gif">Create
> > > > customer</a><span
> > > > > >> style="display:none;" class="wicket-ajax-indicator"
> > > > > >> id="id29--ajax-indicator"><img
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
> > > > > >> alt=""/></span>
> > > > > >>
> > > > > >> I feel like I should know where to start investigating this, but
> > > it's
> > > > > been
> > > > > >> a few years since I've been active with Wicket and I'm flailing
> > > > around a
> > > > > >> bit at the moment. Any help would be greatly appreciated!
> > > > > >>
> > > > > >> TIA!
> > > > > >> Chris
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Christopher Merrill <ch...@webperformance.com>.
Oh...uhhh...yeah. Gee, if I wasn't working on 3 things at once, I might
have thought of that!  I wish there was a user group that could help with
_that_ problem :)


So no, there is no traffic reported from either Chrome or Firefox network
tabs after the initial page load. I tried with multiple different Ajax
controls - they all exhibit the same behavior.


So when we upgraded from 1.5 to 6.19, I just grabbed the latest versions of
the JARs we already had in our build. We have a very manual build system
(working on moving toward something with dependency management...maybe
Gradle), so if there are new module dependencies beyond those obvious in
the dependencies listed at mavenrepository, for example, I might be missing
those. Could that be the cause?

Here's what we have:
joda-time-2.0.jar
wicket-auth-roles-6.19.0.jar
wicket-core-6.19.0.jar
wicket-datetime-6.19.0.jar
wicket-extensions-6.19.0.jar
wicket-ioc-6.19.0.jar
wicket-request-6.19.0.jar
wicket-spring-6.19.0.jar
wicket-util-6.19.0.jar
wicketstuff-gae-initializer-6.19.0.jar
wicketstuff-progressbar-6.19.0.jar

TIA!
Chris



On Fri, Apr 17, 2015 at 4:48 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Use the browser's Dev Tools > Network tab.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Apr 17, 2015 at 11:42 PM, Christopher Merrill <
> chris@webperformance.com> wrote:
>
> > The "wicket ajax debug" window reports nothing when I click Ajax links in
> > either Chrome or Firefox. Is there somewhere else I should look for an
> > indication of Ajax activity - somewhere in Wicket to set a breakpoint or
> > logging to enable?
> >
> > BTW, That window is acting a little flakey for me - the move and resize
> > don't work. Is that normal? If not, possibly related?
> >
> > TIA!
> > Chris
> >
> >
> > On Fri, Apr 17, 2015 at 4:27 PM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > Check whether the browser makes an Ajax request to the server when you
> > > click the link.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Apr 17, 2015 at 11:20 PM, Christopher Merrill <
> > > chris@webperformance.com> wrote:
> > >
> > > > Thanks, Sven.  I read that and I _think_ I understand it.  I looked
> > back
> > > at
> > > > the source and found:
> > > >
> > > >
> > > >
> > >
> >
> Wicket.Ajax.ajax({"u":"./OrganizationAdministration?7-1.IBehaviorListener.0-form-create_customer_link","e":"click","c":"create__customer__link5","i":"create__customer__link5--ajax-indicator"});;
> > > >
> > > > which seems to be registering a listener. But that doesn't tell me
> why
> > my
> > > > onClick() code is not called.
> > > >
> > > > This part of the article you linked:
> > > >   "The good news is the client APIs are mostly the same and the
> > > application
> > > > developers will not need to change their applications."
> > > > seems to be indicating that I should not have to change my code - as
> > the
> > > > IndicatingAjaxLink component (a wicket extension) or the AjaxLink
> > should
> > > be
> > > > handling that. Am I wrong?
> > > >
> > > > This page seems to indicate overriding onClick() for an AjaxLink is
> > still
> > > > the way to go:
> > > >   https://wicket.apache.org/guide/guide/ajax.html
> > > >
> > > > I feel like I'm missing something...
> > > >
> > > > Chris
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Thu, Apr 16, 2015 at 3:59 PM, Sven Meier <sv...@meiers.net> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >  #2 is with an IndicatingAjaxLink.
> > > > >> But the generated HTML has a bad href and no onClick():
> > > > >>
> > > > >
> > > > > Wicket uses event registration now:
> > > > >
> > > > >
> http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
> > > > >
> > > > > Have fun
> > > > > Sven
> > > > >
> > > > >
> > > > >
> > > > > On 16.04.2015 19:31, Christopher Merrill wrote:
> > > > >
> > > > >> Our app hasn't been under active development for a while, so we
> have
> > > > >> fallen
> > > > >> a bit behind. We're about to start a new project with our wicket
> > app,
> > > > so I
> > > > >> thought our first step should be getting current. I read the
> > migration
> > > > >> guide - it helped get me through a lot of issues. So I've been
> able
> > to
> > > > get
> > > > >> past all the obvious stuff (compile errors) and have our app up
> and
> > > > >> running
> > > > >> under 6.19, with a few glaring problems. There is nothing in the
> > > console
> > > > >> or
> > > > >> logs when I exercise these pages/functions.
> > > > >>
> > > > >> #1 is with rendering a full page URL (for inclusion in an email).
> > > > >>
> > > > >> After constructing the parameters, our code does this:
> > > > >>      Url url = RequestCycle.get().mapUrlFor(page_class,
> parameters);
> > > > >>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
> > > > >>
> > > > >> In 1.5, this generated a URL like this (which works)
> > > > >>
> > > > >>
> > > > >>
> > > >
> > >
> >
> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > > >> but now we get:
> > > > >>
> > > > >>
> > > > >>
> > > >
> > >
> >
> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > > >>
> > > > >> Note the extra "pages/registration/". Any ideas where I should
> look
> > > into
> > > > >> this? The pages are mounted with a friendlier URL - could this be
> > > > related?
> > > > >>
> > > > >>
> > > > >> #2 is with an IndicatingAjaxLink.
> > > > >> The HTML looks like this:
> > > > >>    <a href="#" wicket:id="create_customer_link"><img
> > > > >> src="images/add_button.gif"><wicket:message
> > > > >> key="Create_customer">create...</wicket:message></a>
> > > > >> And we create it with:
> > > > >> _create_customer_link = new
> > > > >> IndicatingAjaxLink<License>("create_customer_link")
> > > > >>      {
> > > > >>      @Override
> > > > >>      public void onClick(AjaxRequestTarget target)
> > > > >>      {
> > > > >> followed by our onClick logic.
> > > > >>
> > > > >> But the generated HTML has a bad href and no onClick():
> > > > >> <a href="javascript:;" wicket:id="create_customer_link"
> > > > >> id="create__customer__linkf"><img
> > > > >> src="../../images/add_button.gif"><wicket:message
> > > > >> key="Create_customer">Create customer</wicket:message></a><span
> > > > >> style="display:none;" class="wicket-ajax-indicator"
> > > > >> id="create__customer__linkf--ajax-indicator"><img
> > > > >>
> > > > >>
> > > >
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
> > > > >> alt=""/></span>
> > > > >> Before the upgrade, it would render as:
> > > > >> <a href="#" id="id29" onclick="if (function(){return
> > > > >> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
> > > > >> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
> > > > >>
> > > > >>
> > > >
> > >
> >
> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
> > > > >> {
> > > > >>
> > > > >>
> > > >
> > >
> >
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
> > > > >> {
> > > > >>
> > > >
> > ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
> > > > >> function() {return Wicket.$(&#039;id29&#039;) !=
> > > > null;}.bind(this));return
> > > > >> !wcall;"><img src="../../images/add_button.gif">Create
> > > customer</a><span
> > > > >> style="display:none;" class="wicket-ajax-indicator"
> > > > >> id="id29--ajax-indicator"><img
> > > > >>
> > > > >>
> > > >
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
> > > > >> alt=""/></span>
> > > > >>
> > > > >> I feel like I should know where to start investigating this, but
> > it's
> > > > been
> > > > >> a few years since I've been active with Wicket and I'm flailing
> > > around a
> > > > >> bit at the moment. Any help would be greatly appreciated!
> > > > >>
> > > > >> TIA!
> > > > >> Chris
> > > > >>
> > > > >>
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Martin Grigorov <mg...@apache.org>.
Use the browser's Dev Tools > Network tab.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Apr 17, 2015 at 11:42 PM, Christopher Merrill <
chris@webperformance.com> wrote:

> The "wicket ajax debug" window reports nothing when I click Ajax links in
> either Chrome or Firefox. Is there somewhere else I should look for an
> indication of Ajax activity - somewhere in Wicket to set a breakpoint or
> logging to enable?
>
> BTW, That window is acting a little flakey for me - the move and resize
> don't work. Is that normal? If not, possibly related?
>
> TIA!
> Chris
>
>
> On Fri, Apr 17, 2015 at 4:27 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hi,
> >
> > Check whether the browser makes an Ajax request to the server when you
> > click the link.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Fri, Apr 17, 2015 at 11:20 PM, Christopher Merrill <
> > chris@webperformance.com> wrote:
> >
> > > Thanks, Sven.  I read that and I _think_ I understand it.  I looked
> back
> > at
> > > the source and found:
> > >
> > >
> > >
> >
> Wicket.Ajax.ajax({"u":"./OrganizationAdministration?7-1.IBehaviorListener.0-form-create_customer_link","e":"click","c":"create__customer__link5","i":"create__customer__link5--ajax-indicator"});;
> > >
> > > which seems to be registering a listener. But that doesn't tell me why
> my
> > > onClick() code is not called.
> > >
> > > This part of the article you linked:
> > >   "The good news is the client APIs are mostly the same and the
> > application
> > > developers will not need to change their applications."
> > > seems to be indicating that I should not have to change my code - as
> the
> > > IndicatingAjaxLink component (a wicket extension) or the AjaxLink
> should
> > be
> > > handling that. Am I wrong?
> > >
> > > This page seems to indicate overriding onClick() for an AjaxLink is
> still
> > > the way to go:
> > >   https://wicket.apache.org/guide/guide/ajax.html
> > >
> > > I feel like I'm missing something...
> > >
> > > Chris
> > >
> > >
> > >
> > >
> > >
> > > On Thu, Apr 16, 2015 at 3:59 PM, Sven Meier <sv...@meiers.net> wrote:
> > >
> > > > Hi,
> > > >
> > > >  #2 is with an IndicatingAjaxLink.
> > > >> But the generated HTML has a bad href and no onClick():
> > > >>
> > > >
> > > > Wicket uses event registration now:
> > > >
> > > >  http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
> > > >
> > > > Have fun
> > > > Sven
> > > >
> > > >
> > > >
> > > > On 16.04.2015 19:31, Christopher Merrill wrote:
> > > >
> > > >> Our app hasn't been under active development for a while, so we have
> > > >> fallen
> > > >> a bit behind. We're about to start a new project with our wicket
> app,
> > > so I
> > > >> thought our first step should be getting current. I read the
> migration
> > > >> guide - it helped get me through a lot of issues. So I've been able
> to
> > > get
> > > >> past all the obvious stuff (compile errors) and have our app up and
> > > >> running
> > > >> under 6.19, with a few glaring problems. There is nothing in the
> > console
> > > >> or
> > > >> logs when I exercise these pages/functions.
> > > >>
> > > >> #1 is with rendering a full page URL (for inclusion in an email).
> > > >>
> > > >> After constructing the parameters, our code does this:
> > > >>      Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
> > > >>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
> > > >>
> > > >> In 1.5, this generated a URL like this (which works)
> > > >>
> > > >>
> > > >>
> > >
> >
> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > >> but now we get:
> > > >>
> > > >>
> > > >>
> > >
> >
> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > > >>
> > > >> Note the extra "pages/registration/". Any ideas where I should look
> > into
> > > >> this? The pages are mounted with a friendlier URL - could this be
> > > related?
> > > >>
> > > >>
> > > >> #2 is with an IndicatingAjaxLink.
> > > >> The HTML looks like this:
> > > >>    <a href="#" wicket:id="create_customer_link"><img
> > > >> src="images/add_button.gif"><wicket:message
> > > >> key="Create_customer">create...</wicket:message></a>
> > > >> And we create it with:
> > > >> _create_customer_link = new
> > > >> IndicatingAjaxLink<License>("create_customer_link")
> > > >>      {
> > > >>      @Override
> > > >>      public void onClick(AjaxRequestTarget target)
> > > >>      {
> > > >> followed by our onClick logic.
> > > >>
> > > >> But the generated HTML has a bad href and no onClick():
> > > >> <a href="javascript:;" wicket:id="create_customer_link"
> > > >> id="create__customer__linkf"><img
> > > >> src="../../images/add_button.gif"><wicket:message
> > > >> key="Create_customer">Create customer</wicket:message></a><span
> > > >> style="display:none;" class="wicket-ajax-indicator"
> > > >> id="create__customer__linkf--ajax-indicator"><img
> > > >>
> > > >>
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
> > > >> alt=""/></span>
> > > >> Before the upgrade, it would render as:
> > > >> <a href="#" id="id29" onclick="if (function(){return
> > > >> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
> > > >> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
> > > >>
> > > >>
> > >
> >
> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
> > > >> {
> > > >>
> > > >>
> > >
> >
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
> > > >> {
> > > >>
> > >
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
> > > >> function() {return Wicket.$(&#039;id29&#039;) !=
> > > null;}.bind(this));return
> > > >> !wcall;"><img src="../../images/add_button.gif">Create
> > customer</a><span
> > > >> style="display:none;" class="wicket-ajax-indicator"
> > > >> id="id29--ajax-indicator"><img
> > > >>
> > > >>
> > >
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
> > > >> alt=""/></span>
> > > >>
> > > >> I feel like I should know where to start investigating this, but
> it's
> > > been
> > > >> a few years since I've been active with Wicket and I'm flailing
> > around a
> > > >> bit at the moment. Any help would be greatly appreciated!
> > > >>
> > > >> TIA!
> > > >> Chris
> > > >>
> > > >>
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> >
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Christopher Merrill <ch...@webperformance.com>.
The "wicket ajax debug" window reports nothing when I click Ajax links in
either Chrome or Firefox. Is there somewhere else I should look for an
indication of Ajax activity - somewhere in Wicket to set a breakpoint or
logging to enable?

BTW, That window is acting a little flakey for me - the move and resize
don't work. Is that normal? If not, possibly related?

TIA!
Chris


On Fri, Apr 17, 2015 at 4:27 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi,
>
> Check whether the browser makes an Ajax request to the server when you
> click the link.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Apr 17, 2015 at 11:20 PM, Christopher Merrill <
> chris@webperformance.com> wrote:
>
> > Thanks, Sven.  I read that and I _think_ I understand it.  I looked back
> at
> > the source and found:
> >
> >
> >
> Wicket.Ajax.ajax({"u":"./OrganizationAdministration?7-1.IBehaviorListener.0-form-create_customer_link","e":"click","c":"create__customer__link5","i":"create__customer__link5--ajax-indicator"});;
> >
> > which seems to be registering a listener. But that doesn't tell me why my
> > onClick() code is not called.
> >
> > This part of the article you linked:
> >   "The good news is the client APIs are mostly the same and the
> application
> > developers will not need to change their applications."
> > seems to be indicating that I should not have to change my code - as the
> > IndicatingAjaxLink component (a wicket extension) or the AjaxLink should
> be
> > handling that. Am I wrong?
> >
> > This page seems to indicate overriding onClick() for an AjaxLink is still
> > the way to go:
> >   https://wicket.apache.org/guide/guide/ajax.html
> >
> > I feel like I'm missing something...
> >
> > Chris
> >
> >
> >
> >
> >
> > On Thu, Apr 16, 2015 at 3:59 PM, Sven Meier <sv...@meiers.net> wrote:
> >
> > > Hi,
> > >
> > >  #2 is with an IndicatingAjaxLink.
> > >> But the generated HTML has a bad href and no onClick():
> > >>
> > >
> > > Wicket uses event registration now:
> > >
> > >  http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
> > >
> > > Have fun
> > > Sven
> > >
> > >
> > >
> > > On 16.04.2015 19:31, Christopher Merrill wrote:
> > >
> > >> Our app hasn't been under active development for a while, so we have
> > >> fallen
> > >> a bit behind. We're about to start a new project with our wicket app,
> > so I
> > >> thought our first step should be getting current. I read the migration
> > >> guide - it helped get me through a lot of issues. So I've been able to
> > get
> > >> past all the obvious stuff (compile errors) and have our app up and
> > >> running
> > >> under 6.19, with a few glaring problems. There is nothing in the
> console
> > >> or
> > >> logs when I exercise these pages/functions.
> > >>
> > >> #1 is with rendering a full page URL (for inclusion in an email).
> > >>
> > >> After constructing the parameters, our code does this:
> > >>      Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
> > >>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
> > >>
> > >> In 1.5, this generated a URL like this (which works)
> > >>
> > >>
> > >>
> >
> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > >> but now we get:
> > >>
> > >>
> > >>
> >
> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> > >>
> > >> Note the extra "pages/registration/". Any ideas where I should look
> into
> > >> this? The pages are mounted with a friendlier URL - could this be
> > related?
> > >>
> > >>
> > >> #2 is with an IndicatingAjaxLink.
> > >> The HTML looks like this:
> > >>    <a href="#" wicket:id="create_customer_link"><img
> > >> src="images/add_button.gif"><wicket:message
> > >> key="Create_customer">create...</wicket:message></a>
> > >> And we create it with:
> > >> _create_customer_link = new
> > >> IndicatingAjaxLink<License>("create_customer_link")
> > >>      {
> > >>      @Override
> > >>      public void onClick(AjaxRequestTarget target)
> > >>      {
> > >> followed by our onClick logic.
> > >>
> > >> But the generated HTML has a bad href and no onClick():
> > >> <a href="javascript:;" wicket:id="create_customer_link"
> > >> id="create__customer__linkf"><img
> > >> src="../../images/add_button.gif"><wicket:message
> > >> key="Create_customer">Create customer</wicket:message></a><span
> > >> style="display:none;" class="wicket-ajax-indicator"
> > >> id="create__customer__linkf--ajax-indicator"><img
> > >>
> > >>
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
> > >> alt=""/></span>
> > >> Before the upgrade, it would render as:
> > >> <a href="#" id="id29" onclick="if (function(){return
> > >> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
> > >> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
> > >>
> > >>
> >
> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
> > >> {
> > >>
> > >>
> >
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
> > >> {
> > >>
> > ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
> > >> function() {return Wicket.$(&#039;id29&#039;) !=
> > null;}.bind(this));return
> > >> !wcall;"><img src="../../images/add_button.gif">Create
> customer</a><span
> > >> style="display:none;" class="wicket-ajax-indicator"
> > >> id="id29--ajax-indicator"><img
> > >>
> > >>
> >
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
> > >> alt=""/></span>
> > >>
> > >> I feel like I should know where to start investigating this, but it's
> > been
> > >> a few years since I've been active with Wicket and I'm flailing
> around a
> > >> bit at the moment. Any help would be greatly appreciated!
> > >>
> > >> TIA!
> > >> Chris
> > >>
> > >>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Check whether the browser makes an Ajax request to the server when you
click the link.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Apr 17, 2015 at 11:20 PM, Christopher Merrill <
chris@webperformance.com> wrote:

> Thanks, Sven.  I read that and I _think_ I understand it.  I looked back at
> the source and found:
>
>
> Wicket.Ajax.ajax({"u":"./OrganizationAdministration?7-1.IBehaviorListener.0-form-create_customer_link","e":"click","c":"create__customer__link5","i":"create__customer__link5--ajax-indicator"});;
>
> which seems to be registering a listener. But that doesn't tell me why my
> onClick() code is not called.
>
> This part of the article you linked:
>   "The good news is the client APIs are mostly the same and the application
> developers will not need to change their applications."
> seems to be indicating that I should not have to change my code - as the
> IndicatingAjaxLink component (a wicket extension) or the AjaxLink should be
> handling that. Am I wrong?
>
> This page seems to indicate overriding onClick() for an AjaxLink is still
> the way to go:
>   https://wicket.apache.org/guide/guide/ajax.html
>
> I feel like I'm missing something...
>
> Chris
>
>
>
>
>
> On Thu, Apr 16, 2015 at 3:59 PM, Sven Meier <sv...@meiers.net> wrote:
>
> > Hi,
> >
> >  #2 is with an IndicatingAjaxLink.
> >> But the generated HTML has a bad href and no onClick():
> >>
> >
> > Wicket uses event registration now:
> >
> >  http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
> >
> > Have fun
> > Sven
> >
> >
> >
> > On 16.04.2015 19:31, Christopher Merrill wrote:
> >
> >> Our app hasn't been under active development for a while, so we have
> >> fallen
> >> a bit behind. We're about to start a new project with our wicket app,
> so I
> >> thought our first step should be getting current. I read the migration
> >> guide - it helped get me through a lot of issues. So I've been able to
> get
> >> past all the obvious stuff (compile errors) and have our app up and
> >> running
> >> under 6.19, with a few glaring problems. There is nothing in the console
> >> or
> >> logs when I exercise these pages/functions.
> >>
> >> #1 is with rendering a full page URL (for inclusion in an email).
> >>
> >> After constructing the parameters, our code does this:
> >>      Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
> >>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
> >>
> >> In 1.5, this generated a URL like this (which works)
> >>
> >>
> >>
> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> >> but now we get:
> >>
> >>
> >>
> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> >>
> >> Note the extra "pages/registration/". Any ideas where I should look into
> >> this? The pages are mounted with a friendlier URL - could this be
> related?
> >>
> >>
> >> #2 is with an IndicatingAjaxLink.
> >> The HTML looks like this:
> >>    <a href="#" wicket:id="create_customer_link"><img
> >> src="images/add_button.gif"><wicket:message
> >> key="Create_customer">create...</wicket:message></a>
> >> And we create it with:
> >> _create_customer_link = new
> >> IndicatingAjaxLink<License>("create_customer_link")
> >>      {
> >>      @Override
> >>      public void onClick(AjaxRequestTarget target)
> >>      {
> >> followed by our onClick logic.
> >>
> >> But the generated HTML has a bad href and no onClick():
> >> <a href="javascript:;" wicket:id="create_customer_link"
> >> id="create__customer__linkf"><img
> >> src="../../images/add_button.gif"><wicket:message
> >> key="Create_customer">Create customer</wicket:message></a><span
> >> style="display:none;" class="wicket-ajax-indicator"
> >> id="create__customer__linkf--ajax-indicator"><img
> >>
> >>
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
> >> alt=""/></span>
> >> Before the upgrade, it would render as:
> >> <a href="#" id="id29" onclick="if (function(){return
> >> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
> >> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
> >>
> >>
> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
> >> {
> >>
> >>
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
> >> {
> >>
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
> >> function() {return Wicket.$(&#039;id29&#039;) !=
> null;}.bind(this));return
> >> !wcall;"><img src="../../images/add_button.gif">Create customer</a><span
> >> style="display:none;" class="wicket-ajax-indicator"
> >> id="id29--ajax-indicator"><img
> >>
> >>
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
> >> alt=""/></span>
> >>
> >> I feel like I should know where to start investigating this, but it's
> been
> >> a few years since I've been active with Wicket and I'm flailing around a
> >> bit at the moment. Any help would be greatly appreciated!
> >>
> >> TIA!
> >> Chris
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Christopher Merrill <ch...@webperformance.com>.
Thanks, Sven.  I read that and I _think_ I understand it.  I looked back at
the source and found:

Wicket.Ajax.ajax({"u":"./OrganizationAdministration?7-1.IBehaviorListener.0-form-create_customer_link","e":"click","c":"create__customer__link5","i":"create__customer__link5--ajax-indicator"});;

which seems to be registering a listener. But that doesn't tell me why my
onClick() code is not called.

This part of the article you linked:
  "The good news is the client APIs are mostly the same and the application
developers will not need to change their applications."
seems to be indicating that I should not have to change my code - as the
IndicatingAjaxLink component (a wicket extension) or the AjaxLink should be
handling that. Am I wrong?

This page seems to indicate overriding onClick() for an AjaxLink is still
the way to go:
  https://wicket.apache.org/guide/guide/ajax.html

I feel like I'm missing something...

Chris





On Thu, Apr 16, 2015 at 3:59 PM, Sven Meier <sv...@meiers.net> wrote:

> Hi,
>
>  #2 is with an IndicatingAjaxLink.
>> But the generated HTML has a bad href and no onClick():
>>
>
> Wicket uses event registration now:
>
>  http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
>
> Have fun
> Sven
>
>
>
> On 16.04.2015 19:31, Christopher Merrill wrote:
>
>> Our app hasn't been under active development for a while, so we have
>> fallen
>> a bit behind. We're about to start a new project with our wicket app, so I
>> thought our first step should be getting current. I read the migration
>> guide - it helped get me through a lot of issues. So I've been able to get
>> past all the obvious stuff (compile errors) and have our app up and
>> running
>> under 6.19, with a few glaring problems. There is nothing in the console
>> or
>> logs when I exercise these pages/functions.
>>
>> #1 is with rendering a full page URL (for inclusion in an email).
>>
>> After constructing the parameters, our code does this:
>>      Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
>>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
>>
>> In 1.5, this generated a URL like this (which works)
>>
>>
>> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
>> but now we get:
>>
>>
>> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
>>
>> Note the extra "pages/registration/". Any ideas where I should look into
>> this? The pages are mounted with a friendlier URL - could this be related?
>>
>>
>> #2 is with an IndicatingAjaxLink.
>> The HTML looks like this:
>>    <a href="#" wicket:id="create_customer_link"><img
>> src="images/add_button.gif"><wicket:message
>> key="Create_customer">create...</wicket:message></a>
>> And we create it with:
>> _create_customer_link = new
>> IndicatingAjaxLink<License>("create_customer_link")
>>      {
>>      @Override
>>      public void onClick(AjaxRequestTarget target)
>>      {
>> followed by our onClick logic.
>>
>> But the generated HTML has a bad href and no onClick():
>> <a href="javascript:;" wicket:id="create_customer_link"
>> id="create__customer__linkf"><img
>> src="../../images/add_button.gif"><wicket:message
>> key="Create_customer">Create customer</wicket:message></a><span
>> style="display:none;" class="wicket-ajax-indicator"
>> id="create__customer__linkf--ajax-indicator"><img
>>
>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
>> alt=""/></span>
>> Before the upgrade, it would render as:
>> <a href="#" id="id29" onclick="if (function(){return
>> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
>> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
>>
>> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
>> {
>>
>> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
>> {
>> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
>> function() {return Wicket.$(&#039;id29&#039;) != null;}.bind(this));return
>> !wcall;"><img src="../../images/add_button.gif">Create customer</a><span
>> style="display:none;" class="wicket-ajax-indicator"
>> id="id29--ajax-indicator"><img
>>
>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
>> alt=""/></span>
>>
>> I feel like I should know where to start investigating this, but it's been
>> a few years since I've been active with Wicket and I'm flailing around a
>> bit at the moment. Any help would be greatly appreciated!
>>
>> TIA!
>> Chris
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Christopher Merrill <ch...@webperformance.com>.
urlFor(...) returns a CharSequence, not a Url and there is no constructor
for Url that accepted a String or CharSequence. So what I had tried was
simply the string returned...and that was relative.

But since you were confident, I took another look and found
Url.parse(CharSequence). So this DOES work for me:

Url relativeUrl = Url.parse(urlFor(...));
Url fullUrl = urlRenderer.renderFullUrl(relativeUrl);

Thanks a bunch!
Chris


On Fri, Apr 17, 2015 at 3:45 PM, Martin Grigorov <mg...@apache.org>
wrote:

> On Fri, Apr 17, 2015 at 10:42 PM, Christopher Merrill <
> chris@webperformance.com> wrote:
>
> > The javadocs indicate that should return a bookmarkable (absolute) URL,
> but
> > it is returning a relative URL, instead :(
> >
>
> Please be more concrete what you have tried.
>
> This should work fine:
> Url relativeUrl = urlFor(...);
> Url fullUrl = urlRenderer.renderFullUrl(relativeUrl);
>
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Martin Grigorov <mg...@apache.org>.
On Fri, Apr 17, 2015 at 10:42 PM, Christopher Merrill <
chris@webperformance.com> wrote:

> The javadocs indicate that should return a bookmarkable (absolute) URL, but
> it is returning a relative URL, instead :(
>

Please be more concrete what you have tried.

This should work fine:
Url relativeUrl = urlFor(...);
Url fullUrl = urlRenderer.renderFullUrl(relativeUrl);


>
> Should I report this as a bug?
>
> I'm debugging this on a local AppEngine SDK instance, if that matters.
>
> TIA!
> Chris
>
>
> On Thu, Apr 16, 2015 at 4:44 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > On Thu, Apr 16, 2015 at 11:05 PM, Sven Meier <sv...@meiers.net> wrote:
> >
> > > > #1 rendering a full page URL
> > >
> > > See https://cwiki.apache.org/confluence/display/WICKET/
> > > Getting+a+url+for+display
> >
> >
> > TL;DR
> > use urlFor() instead of mapUrlFor()
> >
> >
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Christopher Merrill <ch...@webperformance.com>.
The javadocs indicate that should return a bookmarkable (absolute) URL, but
it is returning a relative URL, instead :(

Should I report this as a bug?

I'm debugging this on a local AppEngine SDK instance, if that matters.

TIA!
Chris


On Thu, Apr 16, 2015 at 4:44 PM, Martin Grigorov <mg...@apache.org>
wrote:

> On Thu, Apr 16, 2015 at 11:05 PM, Sven Meier <sv...@meiers.net> wrote:
>
> > > #1 rendering a full page URL
> >
> > See https://cwiki.apache.org/confluence/display/WICKET/
> > Getting+a+url+for+display
>
>
> TL;DR
> use urlFor() instead of mapUrlFor()
>
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Apr 16, 2015 at 11:05 PM, Sven Meier <sv...@meiers.net> wrote:

> > #1 rendering a full page URL
>
> See https://cwiki.apache.org/confluence/display/WICKET/
> Getting+a+url+for+display


TL;DR
use urlFor() instead of mapUrlFor()


>
>
> Sven
>
>
> On 16.04.2015 21:59, Sven Meier wrote:
>
>> Hi,
>>
>>  #2 is with an IndicatingAjaxLink.
>>> But the generated HTML has a bad href and no onClick():
>>>
>>
>> Wicket uses event registration now:
>>
>>  http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
>>
>> Have fun
>> Sven
>>
>>
>> On 16.04.2015 19:31, Christopher Merrill wrote:
>>
>>> Our app hasn't been under active development for a while, so we have
>>> fallen
>>> a bit behind. We're about to start a new project with our wicket app, so
>>> I
>>> thought our first step should be getting current. I read the migration
>>> guide - it helped get me through a lot of issues. So I've been able to
>>> get
>>> past all the obvious stuff (compile errors) and have our app up and
>>> running
>>> under 6.19, with a few glaring problems. There is nothing in the console
>>> or
>>> logs when I exercise these pages/functions.
>>>
>>> #1 is with rendering a full page URL (for inclusion in an email).
>>>
>>> After constructing the parameters, our code does this:
>>>      Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
>>>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
>>>
>>> In 1.5, this generated a URL like this (which works)
>>>
>>> http://localhost/portal/pages/registration/CompleteRegistration?user=
>>> chris@webperformance.com&m=-1663176292159862270
>>> but now we get:
>>>
>>> http://localhost/portal/pages/registration/pages/registration/
>>> CompleteRegistration?user=chris@webperformance.com&m=-
>>> 1663176292159862270
>>>
>>> Note the extra "pages/registration/". Any ideas where I should look into
>>> this? The pages are mounted with a friendlier URL - could this be
>>> related?
>>>
>>>
>>> #2 is with an IndicatingAjaxLink.
>>> The HTML looks like this:
>>>    <a href="#" wicket:id="create_customer_link"><img
>>> src="images/add_button.gif"><wicket:message
>>> key="Create_customer">create...</wicket:message></a>
>>> And we create it with:
>>> _create_customer_link = new
>>> IndicatingAjaxLink<License>("create_customer_link")
>>>      {
>>>      @Override
>>>      public void onClick(AjaxRequestTarget target)
>>>      {
>>> followed by our onClick logic.
>>>
>>> But the generated HTML has a bad href and no onClick():
>>> <a href="javascript:;" wicket:id="create_customer_link"
>>> id="create__customer__linkf"><img
>>> src="../../images/add_button.gif"><wicket:message
>>> key="Create_customer">Create customer</wicket:message></a><span
>>> style="display:none;" class="wicket-ajax-indicator"
>>> id="create__customer__linkf--ajax-indicator"><img
>>> src="../wicket/resource/org.apache.wicket.ajax.
>>> AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
>>> alt=""/></span>
>>> Before the upgrade, it would render as:
>>> <a href="#" id="id29" onclick="if (function(){return
>>> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
>>> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
>>> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-
>>> 1.IBehaviorListener.1-form-create_customer_link&#039;,function()
>>> {
>>> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
>>>
>>> { ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;
>>> );}.bind(this),
>>> function() {return Wicket.$(&#039;id29&#039;) !=
>>> null;}.bind(this));return
>>> !wcall;"><img src="../../images/add_button.gif">Create customer</a><span
>>> style="display:none;" class="wicket-ajax-indicator"
>>> id="id29--ajax-indicator"><img
>>> src="../wicket/resource/org.apache.wicket.ajax.
>>> AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
>>>
>>> alt=""/></span>
>>>
>>> I feel like I should know where to start investigating this, but it's
>>> been
>>> a few years since I've been active with Wicket and I'm flailing around a
>>> bit at the moment. Any help would be greatly appreciated!
>>>
>>> TIA!
>>> Chris
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: A few questions - upgrading from 1.5 to 6.19

Posted by Sven Meier <sv...@meiers.net>.
 > #1 rendering a full page URL

See 
https://cwiki.apache.org/confluence/display/WICKET/Getting+a+url+for+display

Sven

On 16.04.2015 21:59, Sven Meier wrote:
> Hi,
>
>> #2 is with an IndicatingAjaxLink.
>> But the generated HTML has a bad href and no onClick():
>
> Wicket uses event registration now:
>
>  http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/
>
> Have fun
> Sven
>
>
> On 16.04.2015 19:31, Christopher Merrill wrote:
>> Our app hasn't been under active development for a while, so we have 
>> fallen
>> a bit behind. We're about to start a new project with our wicket app, 
>> so I
>> thought our first step should be getting current. I read the migration
>> guide - it helped get me through a lot of issues. So I've been able 
>> to get
>> past all the obvious stuff (compile errors) and have our app up and 
>> running
>> under 6.19, with a few glaring problems. There is nothing in the 
>> console or
>> logs when I exercise these pages/functions.
>>
>> #1 is with rendering a full page URL (for inclusion in an email).
>>
>> After constructing the parameters, our code does this:
>>      Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
>>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
>>
>> In 1.5, this generated a URL like this (which works)
>>
>> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270 
>>
>> but now we get:
>>
>> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270 
>>
>>
>> Note the extra "pages/registration/". Any ideas where I should look into
>> this? The pages are mounted with a friendlier URL - could this be 
>> related?
>>
>>
>> #2 is with an IndicatingAjaxLink.
>> The HTML looks like this:
>>    <a href="#" wicket:id="create_customer_link"><img
>> src="images/add_button.gif"><wicket:message
>> key="Create_customer">create...</wicket:message></a>
>> And we create it with:
>> _create_customer_link = new
>> IndicatingAjaxLink<License>("create_customer_link")
>>      {
>>      @Override
>>      public void onClick(AjaxRequestTarget target)
>>      {
>> followed by our onClick logic.
>>
>> But the generated HTML has a bad href and no onClick():
>> <a href="javascript:;" wicket:id="create_customer_link"
>> id="create__customer__linkf"><img
>> src="../../images/add_button.gif"><wicket:message
>> key="Create_customer">Create customer</wicket:message></a><span
>> style="display:none;" class="wicket-ajax-indicator"
>> id="create__customer__linkf--ajax-indicator"><img
>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif" 
>>
>> alt=""/></span>
>> Before the upgrade, it would render as:
>> <a href="#" id="id29" onclick="if (function(){return
>> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
>> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
>> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function() 
>>
>> {
>> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function() 
>>
>> { 
>> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
>> function() {return Wicket.$(&#039;id29&#039;) != 
>> null;}.bind(this));return
>> !wcall;"><img src="../../images/add_button.gif">Create customer</a><span
>> style="display:none;" class="wicket-ajax-indicator"
>> id="id29--ajax-indicator"><img
>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif" 
>>
>> alt=""/></span>
>>
>> I feel like I should know where to start investigating this, but it's 
>> been
>> a few years since I've been active with Wicket and I'm flailing around a
>> bit at the moment. Any help would be greatly appreciated!
>>
>> TIA!
>> Chris
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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


Re: A few questions - upgrading from 1.5 to 6.19

Posted by Sven Meier <sv...@meiers.net>.
Hi,

>#2 is with an IndicatingAjaxLink.
>But the generated HTML has a bad href and no onClick():

Wicket uses event registration now:

  http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/

Have fun
Sven


On 16.04.2015 19:31, Christopher Merrill wrote:
> Our app hasn't been under active development for a while, so we have fallen
> a bit behind. We're about to start a new project with our wicket app, so I
> thought our first step should be getting current. I read the migration
> guide - it helped get me through a lot of issues. So I've been able to get
> past all the obvious stuff (compile errors) and have our app up and running
> under 6.19, with a few glaring problems. There is nothing in the console or
> logs when I exercise these pages/functions.
>
> #1 is with rendering a full page URL (for inclusion in an email).
>
> After constructing the parameters, our code does this:
>      Url url = RequestCycle.get().mapUrlFor(page_class, parameters);
>      return _req_cycle.getUrlRenderer().renderFullUrl(url);
>
> In 1.5, this generated a URL like this (which works)
>
> http://localhost/portal/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
> but now we get:
>
> http://localhost/portal/pages/registration/pages/registration/CompleteRegistration?user=chris@webperformance.com&m=-1663176292159862270
>
> Note the extra "pages/registration/". Any ideas where I should look into
> this? The pages are mounted with a friendlier URL - could this be related?
>
>
> #2 is with an IndicatingAjaxLink.
> The HTML looks like this:
>    <a href="#" wicket:id="create_customer_link"><img
> src="images/add_button.gif"><wicket:message
> key="Create_customer">create...</wicket:message></a>
> And we create it with:
> _create_customer_link = new
> IndicatingAjaxLink<License>("create_customer_link")
>      {
>      @Override
>      public void onClick(AjaxRequestTarget target)
>      {
> followed by our onClick logic.
>
> But the generated HTML has a bad href and no onClick():
> <a href="javascript:;" wicket:id="create_customer_link"
> id="create__customer__linkf"><img
> src="../../images/add_button.gif"><wicket:message
> key="Create_customer">Create customer</wicket:message></a><span
> style="display:none;" class="wicket-ajax-indicator"
> id="create__customer__linkf--ajax-indicator"><img
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-1429197921240.gif"
> alt=""/></span>
> Before the upgrade, it would render as:
> <a href="#" id="id29" onclick="if (function(){return
> Wicket.$(&#039;id29&#039;) != null;}.bind(this)()) {
> Wicket.showIncrementally(&#039;id29--ajax-indicator&#039;);}var
> wcall=wicketAjaxGet(&#039;OrganizationAdministration?15-1.IBehaviorListener.1-form-create_customer_link&#039;,function()
> {
> ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),function()
> { ;Wicket.hideIncrementally(&#039;id29--ajax-indicator&#039;);}.bind(this),
> function() {return Wicket.$(&#039;id29&#039;) != null;}.bind(this));return
> !wcall;"><img src="../../images/add_button.gif">Create customer</a><span
> style="display:none;" class="wicket-ajax-indicator"
> id="id29--ajax-indicator"><img
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator-ver-03CE3DCC84AF110E9DA8699A841E5200.gif"
> alt=""/></span>
>
> I feel like I should know where to start investigating this, but it's been
> a few years since I've been active with Wicket and I'm flailing around a
> bit at the moment. Any help would be greatly appreciated!
>
> TIA!
> Chris
>


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