ajax:callout and ajax:htmlContent

  • vincent le texier

    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,

  • Victor Homyakov

    Victor Homyakov - 2010-08-11

    Is ajax:callout working at all on your page?

  • vincent le texier

    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.

  • Victor Homyakov

    Victor Homyakov - 2010-08-16

    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.

  • vincent le texier

    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 ?

  • Victor Homyakov

    Victor Homyakov - 2010-08-17

    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.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks