• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2.2.3 Ajax page load issue

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using the AJAX-DOJO plugin with Struts 2.2.3 with the following code snippet:

<td> <s:url id="chdFltr3_url" action="loadChildFilterData"/>
<sx:div showLoadingText="false"
id="CAUSE_CODES_3" href="%{chdFltr3_url}" theme="ajax" listenTopics="show_childCodes3" formId="childFilterData">
</sx:div>
</td>

On page load I get the message where the s:url tag element is specified:

Error loading '/toga_reports/loadChildFilterData.action' (404 Not Found)

I have an html button that responds to an onclick event and calls the following

dojo.event.topic.publish("show_childCodes2");

When I click the button, I don't get the 404 Not found message and I'm able to access my configured Ajax action with no problem.

Does anyone know why it generates the message when the page is first loaded, and yet works fine when I click the button? What can I do to prevent the message from printing?

I appreciate any help
 
V. Oliver Smith
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Minor correction:

The initial div is the following:

<td> <s:url id="chdFltr2_url" action="loadChildFilterData"/>
<sx:div showLoadingText="false"
id="CAUSE_CODES_2" href="%{chdFltr2_url}" theme="ajax" listenTopics="show_childCodes2" formId="childFilterData">
</sx:div>
</td>

in other words, the listen Topic is show_childCodes2, which matches the DOJO publish call. Just clarifying that is not the issue.
reply
    Bookmark Topic Watch Topic
  • New Topic