• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Struts 2.2.3 Ajax page load issue  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!