|
From: pieter v. z. <pv...@cs...> - 2006-09-20 15:17:40
|
I don't know AJAX.
And now I am going to guess......
I would suggestion modifying CoefficientServlet.
Or
CoefficientServlet.execute() {..........
CoefficientWebContext ctx =3D 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=FFm trying to write a javascript using AJAX to return some values from
> the server.
>=20
>=20=20
>=20
> For example
>=20
> var req;
>=20
>=20=20
>=20
> function validate() {
>=20
> var idField =3D document.getElementById("userid");
>=20
> var url =3D "validate?id=3D" + escape(idField.value);
>=20
> if (window.XMLHttpRequest) {
>=20
> req =3D new XMLHttpRequest();
>=20
> } else if (window.ActiveXObject) {
>=20
> req =3D new ActiveXObject("Microsoft.XMLHTTP");
>=20
> }
>=20
> req.open("GET", url, true);
>=20
> req.onreadystatechange =3D callback;
>=20
> req.send(null);
>=20
> }
>=20
>=20=20
>=20
> My question is how do I get the values back from coefficient. I can
> execute the methods and a module but I don=FFt have access to
> response.getWriter from ctx.
>=20
>=20=20
>=20
> Do I need to write a next class, modify CoefficientServlet, or is
> there a way to do this via ctx (coefficientcontext)?
>=20
>=20=20
>=20
> Any help would be deeply appreciated.
>=20
>=20=20
>=20
> regards
>=20
>=20=20
>=20
>=20
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share y=
our
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________ Coefficient-devel mailing=
list Coe...@li... https://lists.sourceforge.net=
/lists/listinfo/coefficient-devel
|