X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FActionForm.class.php;h=8e2ad8af4362522fe591e24c608b559011b800d3;hb=75a1eedb8977b8f2db459128bab9aaf367e3b58b;hp=97c9219c06ff976a1c030854f359c2c449811b28;hpb=77da39e33eb70b8b01502c09e8057dd199554de6;p=timetracker.git diff --git a/WEB-INF/lib/form/ActionForm.class.php b/WEB-INF/lib/form/ActionForm.class.php index 97c9219c..8e2ad8af 100644 --- a/WEB-INF/lib/form/ActionForm.class.php +++ b/WEB-INF/lib/form/ActionForm.class.php @@ -166,6 +166,20 @@ class ActionForm { } //print_r($_SESSION); } + + // saveDetachedAttribute saves a "detached" from form named attributed in session. + // There is no element in the form for it. + // Intended use is to add something to the session, when a form bean created on one page + // is used on other pages (ex.: reportForm). + // For example, to generate a timesheet we need a user_id, which is determined when a report + // is generated on report.php, using a bean created in reports.php. + function saveDetachedAttribute($name, $value) { + $_SESSION[$this->mSessionCell .'_'.$name] = $value; + } + + function getDetachedAttribute($name) { + return $_SESSION[$this->mSessionCell.'_'.$name]; + } function loadBean() { $el_list = @$_SESSION[$this->mSessionCell . "session_store_elements"];