You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Praveen.V.Kumar" <pr...@spanservices.com> on 2009/06/26 17:43:26 UTC

Getting undefined error on ajax call

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

Posted by "Kishan G. Chellap Paandy" <ki...@spanservices.com>.
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@yahoo.com] 
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@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


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


Re: Getting undefined error on ajax call

Posted by Dave Newton <ne...@yahoo.com>.
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@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org