struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <musa...@gmail.com>
Subject Re: [ajaxtags] autocompleter + question
Date Tue, 12 Dec 2006 03:32:38 GMT
Did you ever get a chance to look at this?

regards
musachy

Rainer Hermanns wrote:
> Thanks Musachy,
> patch applied.
>
> Regarding the result stuff, I will have some time over the weekend to
> include those XML/JSONResult stuff before the 2.0.2 release.
>
> -Rainer
>
>   
>> Oh, I get it now. Is it Friday already ? :)
>>
>> I have attached the patch for the autocompleter to WW-1529.
>>
>> musachy
>>
>> Martin Cooper wrote:
>>     
>>> On 11/30/06, Musachy Barroso <mbarroso@wfscorp.com> wrote:
>>>       
>>>> Where do you think we should put it? a tag?
>>>>         
>>> No, no. That would be worse. The generic serialisation code should be in
>>> some utility class somewhere, so that it can be used from wherever
>>> might be
>>> appropriate. A result implementation would be the first place that it
>>> would
>>> be used, but it may well be used in other places later (including
>>> application code).
>>>
>>> I have no idea. There are
>>>       
>>>> also some comments that Don added that we should check out.
>>>>         
>>> Yes. I haven't had the time to read through the whole JIRA thing yet,
>>> though.
>>>
>>> --
>>> Martin Cooper
>>>
>>>
>>> "I think this has promise. First, I'd like to see the incoming
>>>       
>>>> parameters better integrated into the ActionContext. In particular, the
>>>> parameters should populate the parameters map in the ActionContext, and
>>>> OGNL should be used for the Action population rather than by custom
>>>> means.
>>>>
>>>> Also, it would be interesting to make the result selection happen
>>>> outside the Action somehow. For example, say you had an Action that
>>>> returned HTML. It would be interesting to somehow call that Action via
>>>> Ajax but get JSON back instead, without the Action having to return a
>>>> different result code. "
>>>>
>>>> Rainer, I'm going to submit my patch for the autocompleter the way it
>>>> is
>>>> now, and when we get this done, (if we do) then I will modify the
>>>> example, sounds good?
>>>>
>>>> regards
>>>> musachy
>>>>
>>>> Martin Cooper wrote:
>>>>         
>>>>> On 11/30/06, Musachy Barroso <mbarroso@wfscorp.com> wrote:
>>>>>           
>>>>>> Yeah, they are not tied to ajax at all, so they shouldn't have
>>>>>>             
>>>> "ajax"
>>>> in
>>>>         
>>>>>> the name if that is what you mean, but are you against having a JSON
>>>>>> result type that will take care of the serialization for you?
>>>>>>             
>>>>> Yes, I was cringing at the naming with AJAX in there. No, I'm not
>>>>>           
>>>> against
>>>>         
>>>>> having a JSON result type, but the serialisation code itself should
>>>>> not be
>>>>> buried in there, because people might want to use that for something
>>>>> else (
>>>>> e.g. embedding some JSON output within generated HTML).
>>>>>
>>>>> --
>>>>> Martin Cooper
>>>>>
>>>>>
>>>>> regards
>>>>>           
>>>>>> musachy
>>>>>>
>>>>>> Martin Cooper wrote:
>>>>>>             
>>>>>>> On 11/30/06, Rainer Hermanns <hermanns@aixcept.de> 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.
>>>>>>>>                 
>>>>>>> Please, please decouple the notion of rendering / serialising
to
>>>>>>>               
>>>> JSON
>>>>         
>>>>>> and
>>>>>>             
>>>>>>> XML from "AJAX". They are completely unrelated. Both JSON and
>>>>>>>               
>>>> XML are
>>>>         
>>>>>>> used
>>>>>>> much more widely than in just AJAX scenarios now.
>>>>>>>
>>>>>>> Also, note that there are lots of JSON serialisers out there.
See
>>>>>>> http://json.org/ for a list. The json.org one is also public
>>>>>>>               
>>>> domain.
>>>>         
>>>>>>> --
>>>>>>> Martin Cooper
>>>>>>>
>>>>>>>
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>             
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message