You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by wolverine my <wo...@gmail.com> on 2007/04/27 08:38:37 UTC
[S2] Autocompleter FATAL exception raised: [object Error]?
Hi!
I have the following JSP with AJAX tag and the debug is true:
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>AJAX</title>
<s:head theme="ajax" debug="true"/>
</head>
<body>
<s:url id="options" action="AjaxTest"/>
<s:autocompleter theme="ajax" href="%{options}" name="option"/>
</body>
</html>
the struts.xml looks like the following:
<package name="com.dummy.test.ajax" extends="json-default">
<action name="AjaxTest" class="ajaxTest">
<result type="json"/>
</action>
</package>
and here is my action class:
package com.dummy.test.ajax;
public class AjaxTest extends ActionSupport {
public String execute() throws Exception {
return SUCCESS;
}
public String[][] getOptions() {
return new String[][] {{"a","b","c"}};
}
}
when entered http://localhost:8080/test/AjaxTest.action, it produced
the following:
{"options":[["a","b","c"]]}
but when I clicked on the dropdown list, it prints
FATAL exception raised: [object Error]
May I know how do I start debug from here?
Do you have any idea of what could be the problem?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Autocompleter FATAL exception raised: [object Error]?
Posted by Dave Newton <ne...@yahoo.com>.
--- wolverine my <wo...@gmail.com> wrote:
> when entered
> http://localhost:8080/test/AjaxTest.action, it
> produced the following:
>
> {"options":[["a","b","c"]]}
AFAIK the documentation at:
http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-autocompleterTag
is still correct for the required input to
<s:autocompleter.../>
I don't know if that will solve the problem or not.
d.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org