Menu

ajax:callout and ajax:htmlContent

2010-08-06
2013-01-31
  • 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,
    Vincent

     
  • 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.
    Vincent 

     
  • 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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.