Getting undefined error on ajax call

View: New views
3 Messages — Rating Filter:   Alert me  

Getting undefined error on ajax call

by Praveen.V.Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm using struts 2.1.6, struts2-dojo-plugin-2.1.6.jar, xwork-2.1.2, freemarker 2.3.13, ognl 2.6.11 and jboss 5.0.1.

In ftl, I am making ajax call in <sx.a> tag as shown below.

<@s.url id="sort" namespace="${parameters.nameSpace}" action="Sort">
<@s.param name="sortBy">${tmpSortMethodName?trim}</@s.param>
            <@s.param name="sortType">desc</@s.param>
</@s.url>
<@sx.a href="${sort}" key="${tmpColumnName}" targets="content">
<@s.text name="${tmpColumnName}"/><img src="<@s.url value="/images/sortAsc.gif"/>" alt="<@s.text name="app.sortBy"/>: <@s.text name="${tmpColumnName}"/>"
title="<@s.text name="app.sortBy"/>: <@s.text name="${tmpColumnName}"/>" class="arrowWhite" align="texttop"/>
</@sx.a>

I have added <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
and   <sx:head debug="true" cache="false" compressed="false" />

But still I am getting the "undefined error" in the screen and "Parameters: Invalid chunk ignored" in the server.

Please help in resolving this issue.

Thanks
Praveen

Re: Getting undefined error on ajax call

by newton.dave :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Praveen.V.Kumar wrote:

> In ftl, I am making ajax call in <sx.a> tag as shown below.
>
> <@s.url id="sort" namespace="${parameters.nameSpace}" action="Sort">
> <@s.param name="sortBy">${tmpSortMethodName?trim}</@s.param>
>             <@s.param name="sortType">desc</@s.param>
> </@s.url>
> <@sx.a href="${sort}" key="${tmpColumnName}" targets="content">
> <@s.text name="${tmpColumnName}"/><img src="<@s.url value="/images/sortAsc.gif"/>" alt="<@s.text name="app.sortBy"/>: <@s.text name="${tmpColumnName}"/>"
> title="<@s.text name="app.sortBy"/>: <@s.text name="${tmpColumnName}"/>" class="arrowWhite" align="texttop"/>
> </@sx.a>
>
> I have added <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> and   <sx:head debug="true" cache="false" compressed="false" />

You're adding that to what? A Freemarker page? That's JSP
syntax--meaningless to Freemarker.

http://struts.apache.org/2.x/docs/freemarker.html

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


RE: Getting undefined error on ajax call

by Kishan Paandy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Folks,

I think this problem seems to be more of a bug in IE 6/7.

Referring to: http://struts.apache.org/2.1.6/docs/dojo-anchor.html 

"There's a bug in IE6/IE7 which makes impossible to use the target's attribute with a parent Div, because such Div's content's are overwritten with the tag's loadingText. Resulting in an "undefined" message in the content's, instead of the result of the request.

One possible alternative is to set showLoadingText="false" and set the indicator attribute to an element showing the desired loading text or image (outside the div)."
 
The alternative mentioned above is also not working.

Is there is any solution for this apart from the mentioned alternative?

Please advice.

Thank you.
Regards,
Kishan.G
 
Team Leader.
www.spansystems.com



-----Original Message-----
From: Dave Newton [mailto:newton.dave@...]
Sent: Saturday, June 27, 2009 1:47 AM
To: Struts Users Mailing List
Subject: Re: Getting undefined error on ajax call

Praveen.V.Kumar wrote:

> In ftl, I am making ajax call in <sx.a> tag as shown below.
>
> <@s.url id="sort" namespace="${parameters.nameSpace}" action="Sort">
> <@s.param name="sortBy">${tmpSortMethodName?trim}</@s.param>
>             <@s.param name="sortType">desc</@s.param>
> </@s.url>
> <@sx.a href="${sort}" key="${tmpColumnName}" targets="content">
> <@s.text name="${tmpColumnName}"/><img src="<@s.url value="/images/sortAsc.gif"/>" alt="<@s.text name="app.sortBy"/>: <@s.text name="${tmpColumnName}"/>"
> title="<@s.text name="app.sortBy"/>: <@s.text name="${tmpColumnName}"/>" class="arrowWhite" align="texttop"/>
> </@sx.a>
>
> I have added <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> and   <sx:head debug="true" cache="false" compressed="false" />

You're adding that to what? A Freemarker page? That's JSP
syntax--meaningless to Freemarker.

http://struts.apache.org/2.x/docs/freemarker.html

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...