[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Best location for control the eo changes?
- Subject: Best location for control the eo changes?
- From: david at ignire.com (David Martinez)
- Date: Tue, 18 Jun 2002 22:54:42 +0200
--Apple-Mail-7-1035744382
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
Hello all:
I 'm progamming one application with WO 5.1 and this have two parts. The=20=
first is the admin manager and the second is the portal for the clients=20=
(B2C). I'm implemented the control changes in the session class=20
overriding the awake() method using the EOEditingContext.hasChanged()=20
and then i used the appendToResponse() for send the advise if exist=20
changes in the EO....
Is this approach good or exist others?
Thanks in advance!
My code (part of):
public class Session extends WOSession {
private boolean hayCambios;
protected EOEditingContext ecActivo;
...
...
public void awake() {
hayCambios =3D ecActivo.hasChanges();
}
...
public void appendToResponse(WOResponse resp, WOContext ctxt) {
if ( hayCambios && (pagina.name() !=3D =
ctxt.page().name()) ) {
alerta =3D true;
=
resp.setContent(pagina.generateResponse().content());
} else {
alerta =3D false;
super.appendToResponse(resp, ctxt);
}
pagina =3D ctxt.page();
}
}
=09
--------------------------------------------------------------
Ignire Software Empresarial
15706 Santiago de Compostela
A Coru=F1a. SPAIN
http://www.ignire.com/
---------------------------------------------------------------
--Apple-Mail-7-1035744382
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
Hello all:
I 'm progamming one application with WO 5.1 and this have two parts.
The first is the admin manager and the second is the portal for the
clients (B2C). I'm implemented the control changes in the session
class overriding the awake() method using the
EOEditingContext.hasChanged() and then i used the appendToResponse()
for send the advise if exist changes in the EO....
Is this approach good or exist others?
Thanks in advance!
My code (part of):
<italic>public class Session extends WOSession {
private boolean hayCambios;
protected EOEditingContext ecActivo;
...
...
public void awake() {
hayCambios =3D ecActivo.hasChanges();
}
...
public void appendToResponse(WOResponse resp, WOContext ctxt) {
if ( hayCambios && (pagina.name() !=3D =
ctxt.page().name()) ) {
alerta =3D true;
=
resp.setContent(pagina.generateResponse().content());
} else {
alerta =3D false;
super.appendToResponse(resp, ctxt);
}
pagina =3D ctxt.page();
}
}</italic>
=09
--------------------------------------------------------------
Ignire Software Empresarial
15706 Santiago de Compostela
A Coru=F1a. SPAIN
=
<underline><color><param>1A19,1A19,FFFE</param>http://www.ignire.com/</col=
or></underline>
---------------------------------------------------------------
--Apple-Mail-7-1035744382--