Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2.2.3 Ajax page load issue

 
V. Oliver Smith
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic