|
From: Miguel P. <mr_...@ho...> - 2006-09-20 15:38:22
|
Pieter,
Thanks for pointing me in the right direction. The objective is to be able
to do a response.getWriter().write("some text") so the web browser can read
the response "some text".
I was not sure if I should modify CoefficientServlet or
CoefficientWebContext.
If you (or anyone on the forum) has any other idea, I would appreciate it.
Regards
-----Original Message-----
From: pieter van zyl [mailto:pv...@cs...]
Sent: Wednesday, September 20, 2006 11:17 AM
To: Miguel Perez
Cc: coe...@li...
Subject: Re: [Coefficient-devel] Asynchronous JavaScript -AJAX
I don't know AJAX.
And now I am going to guess......
I would suggestion modifying CoefficientServlet.
Or
CoefficientServlet.execute() {..........
CoefficientWebContext ctx = new CoefficientWebContext(request,
response);
interceptor.invoke(ctx);
// synchronize with CoefficientContext (reset session
variables,
// update cookies, forward if needed, etc...)
ctx.synchronize(request, response);
// Write out the page content
ctx.getPage().process(response.getWriter());
..........
}
one could modify the response in page.process method, where we are
building and adding the page layouts.
Hope this helps a bit.....
On Tue, 2006-09-19 at 17:18 -0400, Miguel Perez wrote:
> I'm trying to write a javascript using AJAX to return some values from
> the server.
>
>
>
> For example
>
> var req;
>
>
>
> function validate() {
>
> var idField = document.getElementById("userid");
>
> var url = "validate?id=" + escape(idField.value);
>
> if (window.XMLHttpRequest) {
>
> req = new XMLHttpRequest();
>
> } else if (window.ActiveXObject) {
>
> req = new ActiveXObject("Microsoft.XMLHTTP");
>
> }
>
> req.open("GET", url, true);
>
> req.onreadystatechange = callback;
>
> req.send(null);
>
> }
>
>
>
> My question is how do I get the values back from coefficient. I can
> execute the methods and a module but I don't have access to
> response.getWriter from ctx.
>
>
>
> Do I need to write a next class, modify CoefficientServlet, or is
> there a way to do this via ctx (coefficientcontext)?
>
>
>
> Any help would be deeply appreciated.
>
>
>
> regards
>
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________ Coefficient-devel mailing
list Coe...@li...
https://lists.sourceforge.net/lists/listinfo/coefficient-devel
|