You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steve Swinsburg <s....@lancaster.ac.uk> on 2008/10/23 18:55:47 UTC
my component ID is being modified and causing errors
I have a simple piece of code which replaces a component with another
one when a link is clicked, however the number '4' is being appended
to my component ID's.
here is the HTML showing 'replaceAjax' as my component ID:
replace ajax: <a wicket:id="replaceLink">replace via ajax</a> <span
wicket:id="replaceAjax">this will be replaced</span><br />
INFO:
INFO: Initiating Ajax GET request on ?wicket:interface=:
2:replaceLink::IBehaviorListener:0:&random=0.15276471804827452
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (193 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response><component
id="replaceAjax4" ><![CDATA[<span id="replaceAjax4">
<span>replaced message</span>
</span>]]></component></ajax-response>
INFO: Response parsed. Now invoking steps...
ERROR: Component with id [[replaceAjax4]] a was not found while trying
to perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you
are trying to update.
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: last focus id was not set
In the above you can see the component ID has been changed to
replaceAjax4! Is this a real issue or is the end of the day playing
tricks on me? This was on wicket 1.3.0. I then upgraded to wicket
1.3.5 and the 4 turns into an 'e':
INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on ?wicket:interface=:
11:replaceLink::IBehaviorListener:0:&random=0.28145640529692173
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (193 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response><component
id="replaceAjaxe" ><![CDATA[<span id="replaceAjaxe">
<span>replaced message</span>
</span>]]></component></ajax-response>
INFO: Response parsed. Now invoking steps...
ERROR: Component with id [[replaceAjaxe]] a was not found while trying
to perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you
are trying to update.
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: last focus id was not set
What's going on?
Thanks,
Steve
Re: my component ID is being modified and causing errors
Posted by Steve Swinsburg <s....@lancaster.ac.uk>.
Actually, its just the end of the day playing tricks on me, Wicket
does this so the generated ID's are unique - it was something unrelated.
cheers,
Steve
On 23 Oct 2008, at 17:55, Steve Swinsburg wrote:
> I have a simple piece of code which replaces a component with
> another one when a link is clicked, however the number '4' is being
> appended to my component ID's.
>
> here is the HTML showing 'replaceAjax' as my component ID:
>
> replace ajax: <a wicket:id="replaceLink">replace via ajax</a> <span
> wicket:id="replaceAjax">this will be replaced</span><br />
>
>
> INFO:
> INFO: Initiating Ajax GET request on ?wicket:interface=:
> 2:replaceLink::IBehaviorListener:0:&random=0.15276471804827452
> INFO: Invoking pre-call handler(s)...
> INFO: Received ajax response (193 characters)
> INFO:
> <?xml version="1.0" encoding="UTF-8"?><ajax-response><component
> id="replaceAjax4" ><![CDATA[<span id="replaceAjax4">
>
> <span>replaced message</span>
>
>
> </span>]]></component></ajax-response>
> INFO: Response parsed. Now invoking steps...
> ERROR: Component with id [[replaceAjax4]] a was not found while
> trying to perform markup update. Make sure you called
> component.setOutputMarkupId(true) on the component whose markup you
> are trying to update.
> INFO: Response processed successfully.
> INFO: Invoking post-call handler(s)...
> INFO: last focus id was not set
>
> In the above you can see the component ID has been changed to
> replaceAjax4! Is this a real issue or is the end of the day playing
> tricks on me? This was on wicket 1.3.0. I then upgraded to wicket
> 1.3.5 and the 4 turns into an 'e':
>
> INFO: Using XMLHttpRequest transport
> INFO:
> INFO: Initiating Ajax GET request on ?wicket:interface=:
> 11:replaceLink::IBehaviorListener:0:&random=0.28145640529692173
> INFO: Invoking pre-call handler(s)...
> INFO: Received ajax response (193 characters)
> INFO:
> <?xml version="1.0" encoding="UTF-8"?><ajax-response><component
> id="replaceAjaxe" ><![CDATA[<span id="replaceAjaxe">
>
> <span>replaced message</span>
>
>
> </span>]]></component></ajax-response>
> INFO: Response parsed. Now invoking steps...
> ERROR: Component with id [[replaceAjaxe]] a was not found while
> trying to perform markup update. Make sure you called
> component.setOutputMarkupId(true) on the component whose markup you
> are trying to update.
> INFO: Response processed successfully.
> INFO: Invoking post-call handler(s)...
> INFO: last focus id was not set
>
>
> What's going on?
>
>
> Thanks,
> Steve
>
>
>
>
>
>