supply the fully qualified action name to the url
<s:url var="url" value="/admin/Autocomplete!getNames.action"/>
also make sure there is a result defined for that action in your declarator
<action name="JSONList">
<result>/ajax/JSONList.js</result>
</action>
anyone seen result type='json' ??
as far "not getting there" you should follow dales advice d/l and install
firefox
http://support.mozilla.com/en-US/kb/Firefox+exe+is+always+running
then install firebug plugin
http://getfirebug.com/downloads
you can view the entire DOM tree as well as interrogate request and resulting
response
fill in the blank ..what name is at question mark
gov.?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.
> Date: Tue, 20 Apr 2010 08:34:15 -0700
> From: [email protected]
> Subject: Re: Using json in Struts 2.1.8.1
> To: [email protected]
> CC: [email protected]
>
> Hi All,
>
> Added below lines in struts.xml file
>
>
> <package name="admin" extends="struts-default,json-default">
> <result-types>
> <result-type name="json" class="org.apache.struts2.json.JSONResult" />
> </result-types>
>
> <action name="Autocomplete!*" class="gov.admin.action.ManageAction"
> method="{1}">
> <result type="json"><param name="root">json</param></result>
>
> </action>
>
>
> </package>
>
> Added following lines .jsp file
>
> <b>Search JSON: </b>
> <s:url id="url" action="Autocomplete" method="getNames" />
>
> <sx:autocompleter href="%{url}" loadOnTextChange="true" loadMinimumCount="3"
> />
>
>
> even included <%@ taglib prefix="sx" uri="/struts-dojo-tags"%> and
> <head>
> <sx:head />
> </head>
>
> When it builds the page it is showing below lines
>
> <input dojoType="struts:ComboBox"
> dataUrl="/admin/Autocomplete!getNames.action" id="manageForm_"
> keyName="nullKey" loadOnType="true" loadMinimum="3" visibleDownArrow="true" />
> <script language="JavaScript"
> type="text/javascript">djConfig.searchIds.push("manageForm_");</script>
>
> after entering 3 or more characters it supposed to invoke 'getNames' method
> but it is not even starting invocation of this method....
>
> Can anyone please let me know where I'm wrong.
>
> Thanks in advance.
>
> Regards,
> Sharath.
>
>
>
>
>
>
>
>
>
> --- On Fri, 4/16/10, Dale Newfield <[email protected]> wrote:
>
>
> From: Dale Newfield <[email protected]>
> Subject: Re: Using json in Struts 2.1.8.1
> To: "Struts Users Mailing List" <[email protected]>
> Date: Friday, April 16, 2010, 10:39 AM
>
>
> > <package name="package_name" extends="struts-default"
> > namespace="/namespace_name">
> > <result-types>
> > <result-type name="json"
> > class="com.googlecode.jsonplugin.JSONResult" />
> > </result-types>
>
> Or just
>
> <package name="package-name" extends="json-default">
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
>
>
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5