Hi Nathan,
there’s a simple trick, how you can store object in the session, without
the need to have autoloading available at session start time: serialize
the object, before storing it in the session. Then you have complete
control, before the object get’s unserialized.
I attached a little test, which demonstrates all the different
behaviors. It’s good to learn how the session stuff really works
(without all the fluff EGroupware addes).
Ralf
Nathan Gray schrieb:
I appreciate your time, but I’m definitely having some major problems.
I’m working with a SalesOrder. In the ui_perp_sales_order.edit
function, I store it in the appsession:
$GLOBALS[‘egw’]->session->appsession(‘order’, false, $sales_order);
I have an ajax callback that performs some operations on it
(ajax_perp_sales_order->change_client):
$order = $GLOBALS[‘egw’]->session->appsession(‘order’);
Both files, in the same app, explicitly require
class.SalesOrder.inc.php, but $order is now
__PHP_Incomplete_Class Object
$GLOBALS[‘egw_info’][‘flags’][‘currentapp’] is ‘perp_orders’ every
time I call appsession().
My autoload doesn’t get called for SalesOrder, even if I set the flag
at the top of both files.
eGW’s __autoload() does, which fails because at the time it tries, the
flag is not set.
Putting common_functions.inc.php line 1407 back in fixes it, but I
understand the desire to move away from that.
Nathan Gray
nathan at goarctic dot com
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
–
Ralf Becker
Director Software Development
Stylite GmbH
[open style of IT]
Morschheimer Strasse 15
67292 Kirchheimbolanden
fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
mailto: rb@stylite.de
www.stylite.de
www.egroupware.org
Geschäftsführer Andre Keller, Gudrun Müller,
Nigel Vickers und Ralf Becker
Registergericht Kaiserslautern HRB 30575
Umsatzsteuer-Id / VAT-Id: DE214280951