Posted by
Fred Forester-2 on
URL: http://ofbiz.116.s1.nabble.com/Users-AJAX-again-sorry-tp138397p138400.html
I was able to get something almost working but my lack of javascript
knowledge has raised its head. but here's what I did
I was using one of the gazillion autocomplete examples from the net and
applied it to the last name of the party lookup.
1) put all the javascript in findparty.ftl (should probably be in
"ajax.js" or something maybe.
2) map a uri of "autocomplete" to an ofbiz event called autoComplete. I
used an event instead of a service since the method parms match up better
public static String autoComplete(HttpServletRequest request,
HttpServletResponse response).
I added it to PartyServices.java but would probably be better in an
AjaxEvent class.
3) lookup all parties whos lastName is like 'lastName%' and return an
xml list of lastNames and personIds.
everything worked and I can verify the data is being returned but cant
figure out how to get reponseXML to parse it. all the parsing examples I
found seem to fail miserably.
maybe this will help give you a headstart :)
Fred
Fred Forester wrote:
> thanx. look forward to seeing it.
>
>
> tibor katelbach wrote:
>
>>Hi Fred
>>we were thinking about it for the add to mini cart
>>and since the structure is well seperated and follows a REST structure
>>I think it would simply need a bit of DHTML javascript on return of the Ajax
>>call to update the minicart's content dynamically
>>Since the service that would be called does all the needed Entity
>>insertions.
>>but having to get everything working for very soon, It'll be a months before
>>I give it a try.
>>Tibor
>>
>>
>>On 4/6/06, Fred Forester <
[hidden email]> wrote:
>>
>>
>>>Hi All,
>>>
>>>was wondering what kinda nightmare it would be if one was to convert a
>>>few pages to AJAX. anybody done it?
>>>
>>>Thanx
>>>Fred
>>>
>>>_______________________________________________
>>>Users mailing list
>>>
[hidden email]
>>>
http://lists.ofbiz.org/mailman/listinfo/users>>>
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>
>>_______________________________________________
>>Users mailing list
>>
[hidden email]
>>
http://lists.ofbiz.org/mailman/listinfo/users>
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users>
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users