You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Musachy Barroso <mb...@wfscorp.com> on 2007/01/07 18:54:54 UTC

Re: [ajaxtags] autocompleter + question

Following up on this, I logged WW-1604 with a patch for a JSON result 
type. Following Martin's advice there is a class called JSONUtil that 
wraps the actual serializer, which is not public, cause it could be 
replaced later by xtream (the JSON support is not very stable yet in 
1.2.1), right now we borrowed this small serializer (with some mods):

 http://www.stringtree.org/downloads/JSONWriter.java

from the stringtree project at

http://sourceforge.net/projects/stringtree.

regards
musachy

Rainer Hermanns wrote:
> Musachy and others,
> sounds like we should finally add an AJAXResult...
> There have been efforts to create an AjaxJSON and AjaxXML result type
> already. So may be we should add this to the core of Struts2 now.
> Have a look at http://issues.apache.org/struts/browse/WW-1330 for more
> details.
>
> What do you think?
>
> -Rainer
>
>   
>> I was finishing the autocompleter examples tonight (annoying patch coming
>> soon:) ) and I have a couple of questions. The autocompleter when used in
>> the "ajax" theme needs the action to return a JSON name/value list, should
>> we provide any easy way to generate the response from the action? In
>> showcase I'm using a freemaker template as an example, but that's going to
>> be a repetitive task for anyone using it.
>>
>> The second question is a beginners question, if I'm writing an action that
>> is going to be used on an ajax request, and I want to write my response
>> straight to the outputstream, I still need to return an string from
>> execute,
>> and I get an error on the server log stating that there is no "result"
>> configured, what is the right way of doing this?
>>
>> regards
>> musachy
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>   


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