Page 1 of 1

same security filter issue

PostPosted: Sun Feb 19, 2012 10:35 am
by samhans
hai Steve.

in a demand table i have a status column. what i want that when the demand was fulfilled and store incharge has changed the status to closed. it should be removed from the list view.

how can i do this because already i have used the security filter option and i cannot redeclare it in same delegate class.

Re: same security filter issue

PostPosted: Sun Feb 19, 2012 11:12 am
by shannah
I probably wouldn't use a security filter for this - as a security filter will remove it from all aspects of the application. If you just want it gone from the list view, then perhaps use the beforeHandleRequest method of the application delegate class to add the query parameter conditionally.

e.g.
Code: Select all
function beforeHandleRequest(){
    $app = Dataface_Application::getInstance();
    $query =& $app->getQuery();
    if ( !$_POST and $query['-table'] == 'mytable' and !@$query['status'] ){
        $query['status'] = '!=closed';
    }
}

Re: same security filter issue

PostPosted: Sun Feb 19, 2012 12:10 pm
by samhans
thanks Steve.