Re: Getting access to jData through AJAX

"dominique (joe) pillot" <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Le 14 févr. 07 à 12:53, Richard Gate a écrit :

>  want this calculation done every time the user selects a check box  
> or drop down on the screen that effects the calculation. I could of  
> course at JSP time send down all the data the javascript will need  
> and do the calculation client side. The problem is I already have  
> the calculation method in the back end and would prefer to use this  
> rather than a replicated javascript version.

i did not suggested a replicated version in javascript. i guess you  
prefer avoid this ;-)

i just suggest you to copy your back's code in a scriptlet (in the  
jsp), grab some request parameters from the user(by drop down or  
whatever), run your code to make the calculations and display it at  
rendering time: not a big deal! (just use bypass url to be sure to  
workaround html cache persistence))

but maybe some constraint i'm not aware are on the way? (the only you  
mention is the fact you need to maintain 2 versions of code, but i  
have the feeling this is a piece of cake vs all the ajax code you  
plan to write server & client-side , just my 2cts)

cheers
joe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.