Hello everyone,
I am trying to use ajax:callout inside some html code that is displayed on the client-side after an ajax::htmlContent call.
It does not work. The servlet is never called.
any idea ? I am missing something here.
Thanks in advance,
Vincent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tested this on ajaxtags-demo.war: added next lines to htmlcontent.jsp:
<input type="button" value="test callout" id="calloutTest" />
<ajax:htmlContent baseUrl="callout.jsp" source="calloutTest" target="modelDescription" parameters="" />
After clicking on button "test callout" sample content with callout tags is loaded into div#modelDescription and all callouts are working fine. So your problem is somewhere else.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What you said works.
but if you add this in the HtmlContentServlet :
html.append("<p><a href=\"javascript://nop/\" class=\"definition\">ArthurDent</a></p>");
and this <ajax:callout baseUrl="callout.view" sourceClass="definition"
parameters="q={ajaxParameter}" title="Definition" />
in the htmlContent.jsp
Why this does not work ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Either you use <a class="definition">…</a> and ajax:callout together on one JSP, or call AjaxJspTag.reload() each time after you add some content with callouts etc.
This is because ajax:callout knows nothing about anchors, which were loaded by htmlContent AFTER ajax:callout has completed its setup script and was attached to callouts it found on the page.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
I am trying to use ajax:callout inside some html code that is displayed on the client-side after an ajax::htmlContent call.
It does not work. The servlet is never called.
any idea ? I am missing something here.
Thanks in advance,
Vincent
Is ajax:callout working at all on your page?
Hello Victor,
Yes ajax:callout works on my page. The problem comes only for the html inside de <div> responding to an ajax:htmlContent call.
Vincent
I've tested this on ajaxtags-demo.war: added next lines to htmlcontent.jsp:
<input type="button" value="test callout" id="calloutTest" />
<ajax:htmlContent baseUrl="callout.jsp" source="calloutTest" target="modelDescription" parameters="" />
After clicking on button "test callout" sample content with callout tags is loaded into div#modelDescription and all callouts are working fine. So your problem is somewhere else.
What you said works.
but if you add this in the HtmlContentServlet :
html.append("<p><a href=\"javascript://nop/\" class=\"definition\">ArthurDent</a></p>");
and this <ajax:callout baseUrl="callout.view" sourceClass="definition"
parameters="q={ajaxParameter}" title="Definition" />
in the htmlContent.jsp
Why this does not work ?
Either you use <a class="definition">…</a> and ajax:callout together on one JSP, or call AjaxJspTag.reload() each time after you add some content with callouts etc.
This is because ajax:callout knows nothing about anchors, which were loaded by htmlContent AFTER ajax:callout has completed its setup script and was attached to callouts it found on the page.