Hi,
i'm having the strangest issue with an AjaxRequest on one of our pages. The
situation is as follows:
We have a page which contains a panel. That panel is initially rendered
invisible with setOutputMarkupPlaceholderTag(true):
(Note: redenWijzigeinPanel is dutch but it's the variable that holds the
panel)
redenWijzigenPanel.setVisible(false);
redenWijzigenPanel.setOutputMarkupPlaceholderTag(true);
We also add a AjaxLink to the page which, when clicked on will render the
page visible.
item.add(new AjaxLink<Void>("redenWijzigen")
{
@Override
public void onClick(AjaxRequestTarget target)
{
redenWijzigenPanel.setVisible(!redenWijzigenPanel.isVisible());
target.addComponent(redenWijzigenPanel);
}
});
Note that both redenwijzigenPanel and the AjaxLink are added to a ListView.
Now here's where it gets weird. This works perfectly fine on my local
machine, however, it goes wrong on one of our environments with the
following Ajax error(I've tried on both enviroments with Wicket
configuration on development or on production).
ERROR: Wicket.Ajax.Call.processComponent: Component with id
[[redenWijzigenPanel139]] 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.
(See below for the entire AjaxMessage)
This is weird because when I look at the HTML being generated it looks like
this:
<div id="redenWijzigenPanelf5" style="display:none"></div>
Which is what you expect except where does the wicket:id
redenwijzigenPanel139 come from?
So my problem is, why does this work on my local enviroment but not on the
other? Is there something I'm missing? Or does anyone know a workaround?
Entire Ajax message:
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:4:dossierinfo:0:dossierPanel:contentContainer:panelContainer:fksMeldingenContainer:fksMeldingen:0:redenWijzigen::IBehaviorListener:0:-1&random=0.04403882613405585
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (5798 characters)
INFO:
<?xml version="1.0"
encoding="UTF-8"?><ajax-response><evaluate></evaluate><header-contribution
encoding="wicket1" ></header-contribution><component
id="redenWijzigenPanel139"
></component><evaluate></evaluate></ajax-response>
INFO: Response parsed. Now invoking steps...
ERROR: Wicket.Ajax.Call.processComponent: Component with id
[[redenWijzigenPanel139]] 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: Channel busy - postponing...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Calling posponed function...
INFO:
INFO: Initiating Ajax GET request on
clienttime?clienttime=43&url=%3Fwicket%3Ainterface%3D%3A4%3Adossierinfo%3A0%3AdossierPanel%3AcontentContainer%3ApanelContainer%3AfksMeldingenContainer%3AfksMeldingen%3A0%3AredenWijzigen%3A%3AIBehaviorListener%3A0%3A-1%26random%3D0.04403882613405585
random 0.51815887761741751309268735304&random=0.5350335570983589
INFO: Invoking pre-call handler(s)...
INFO: refocus last focused component not needed/allowed
INFO: Received ajax response (0 characters)
INFO:
ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
find root <ajax-response> element
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Strange-issue-with-AjaxLink-and-AjaxRequest-tp3630436p3630436.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]