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 |
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:
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
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 |
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 |
> 3) lookup all parties whos lastName is like 'lastName%' and return an
> xml list of lastNames and personIds. When working on stuff like this - if it's not just for your own use, keep in mind that for some businesses, that could potentially be a *very* large list. -- David N. Welton - http://www.dedasys.com/davidw/ Linux, Open Source Consulting - http://www.dedasys.com/ _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
understood. this was strictly an experiment to see how/if ofbiz could handle an ajax request. avoiding 100,000 S%(mith)s would be an excersise for the reader. :) David Welton wrote: >>3) lookup all parties whos lastName is like 'lastName%' and return an >>xml list of lastNames and personIds. > > > When working on stuff like this - if it's not just for your own use, > keep in mind that for some businesses, that could potentially be a > *very* large list. > > -- > David N. Welton > - http://www.dedasys.com/davidw/ > > Linux, Open Source Consulting > - http://www.dedasys.com/ > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users > > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
You can do the formating or parsing in java.
I usually prepare well formed xhtml that I feed to my responseXML, that I insert directly into any given div with document.getElementbyId("divId").innerhtml = xhr_obj.responseXML Hope this helps Tibor On 4/10/06, Fred Forester <[hidden email]> wrote:
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
I'm still sorta new to the xml thing. here is what I am sending back via the event <employees><employee><id>10010</id><firstName>Fred</ firstName><lastName>Forester</lastName></employee></employees> and using this to try and parse it. var employees = responseXML.getElementsByTagName("employees"); of course this is not parsing since employess.lenth = 0 tibor katelbach wrote: > You can do the formating or parsing in java. > I usually prepare well formed xhtml that I feed to my responseXML, that I > insert directly into any given div with > document.getElementbyId("divId").innerhtml > = xhr_obj.responseXML > > Hope this helps > Tibor > > On 4/10/06, Fred Forester <[hidden email]> wrote: > >> >>understood. this was strictly an experiment to see how/if ofbiz could >>handle an ajax request. avoiding 100,000 S%(mith)s would be an excersise >>for the reader. :) >> >> >> >>David Welton wrote: >> >>>>3) lookup all parties whos lastName is like 'lastName%' and return an >>>>xml list of lastNames and personIds. >>> >>> >>>When working on stuff like this - if it's not just for your own use, >>>keep in mind that for some businesses, that could potentially be a >>>*very* large list. >>> >>>-- >>>David N. Welton >>> - http://www.dedasys.com/davidw/ >>> >>>Linux, Open Source Consulting >>> - http://www.dedasys.com/ >>> >>>_______________________________________________ >>>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 |
For those who like me don't have advanced javascript knowledges, how
about this Ajax without javascript http://zk1.sourceforge.net/ Hao On Mon, 2006-04-10 at 11:12 -0400, Fred Forester wrote: > I'm still sorta new to the xml thing. here is what I am sending back via > the event > > <employees><employee><id>10010</id><firstName>Fred</ > firstName><lastName>Forester</lastName></employee></employees> > > and using this to try and parse it. > > var employees = responseXML.getElementsByTagName("employees"); > > of course this is not parsing since employess.lenth = 0 > > > tibor katelbach wrote: > > You can do the formating or parsing in java. > > I usually prepare well formed xhtml that I feed to my responseXML, that I > > insert directly into any given div with > > document.getElementbyId("divId").innerhtml > > = xhr_obj.responseXML > > > > Hope this helps > > Tibor > > > > On 4/10/06, Fred Forester <[hidden email]> wrote: > > > >> > >>understood. this was strictly an experiment to see how/if ofbiz could > >>handle an ajax request. avoiding 100,000 S%(mith)s would be an excersise > >>for the reader. :) > >> > >> > >> > >>David Welton wrote: > >> > >>>>3) lookup all parties whos lastName is like 'lastName%' and return an > >>>>xml list of lastNames and personIds. > >>> > >>> > >>>When working on stuff like this - if it's not just for your own use, > >>>keep in mind that for some businesses, that could potentially be a > >>>*very* large list. > >>> > >>>-- > >>>David N. Welton > >>> - http://www.dedasys.com/davidw/ > >>> > >>>Linux, Open Source Consulting > >>> - http://www.dedasys.com/ > >>> > >>>_______________________________________________ > >>>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 > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Administrator
|
Interesting concept and seems (at first glance) well done, but too bad : it's
GPL :( Jacques ----- Original Message ----- From: "Hao Jiang" <[hidden email]> To: "OFBiz Users / Usage Discussion" <[hidden email]> Sent: Monday, April 10, 2006 6:10 PM Subject: Re: [OFBiz] Users - AJAX (again. sorry) > For those who like me don't have advanced javascript knowledges, how > about this > > Ajax without javascript http://zk1.sourceforge.net/ > > Hao > > > > > > On Mon, 2006-04-10 at 11:12 -0400, Fred Forester wrote: > > I'm still sorta new to the xml thing. here is what I am sending back via > > the event > > > > <employees><employee><id>10010</id><firstName>Fred</ > > firstName><lastName>Forester</lastName></employee></employees> > > > > and using this to try and parse it. > > > > var employees = responseXML.getElementsByTagName("employees"); > > > > of course this is not parsing since employess.lenth = 0 > > > > > > tibor katelbach wrote: > > > You can do the formating or parsing in java. > > > I usually prepare well formed xhtml that I feed to my responseXML, that I > > > insert directly into any given div with > > > document.getElementbyId("divId").innerhtml > > > = xhr_obj.responseXML > > > > > > Hope this helps > > > Tibor > > > > > > On 4/10/06, Fred Forester <[hidden email]> wrote: > > > > > >> > > >>understood. this was strictly an experiment to see how/if ofbiz could > > >>handle an ajax request. avoiding 100,000 S%(mith)s would be an excersise > > >>for the reader. :) > > >> > > >> > > >> > > >>David Welton wrote: > > >> > > >>>>3) lookup all parties whos lastName is like 'lastName%' and return an > > >>>>xml list of lastNames and personIds. > > >>> > > >>> > > >>>When working on stuff like this - if it's not just for your own use, > > >>>keep in mind that for some businesses, that could potentially be a > > >>>*very* large list. > > >>> > > >>>-- > > >>>David N. Welton > > >>> - http://www.dedasys.com/davidw/ > > >>> > > >>>Linux, Open Source Consulting > > >>> - http://www.dedasys.com/ > > >>> > > >>>_______________________________________________ > > >>>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 > > > > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |