Skip to main content

Posts

Showing posts from January, 2013

Filters are not working in ADF Table

Usually when we use the filter table in adf  , some time it will not work and when you use the new criteria it display result of existing filter criteria so call the following method to work filters in your page use the following method to work your filters proper   public void resetPerfectedTableFilter()         {      FilterableQueryDescriptor queryDescriptor =  (FilterableQueryDescriptor) getPerfectedCaseTable().getFilterModel();             if (queryDescriptor != null &&  queryDescriptor.getFilterCriteria() != null)             {    queryDescriptor.getFilterCriteria().clear();                 getPerfectedCaseTable().queueEvent(new QueryEvent(getPerfectedCaseTable(),                                                                   queryDescriptor));             }         } you just need to provide is your tables binding to this method on which you are applying filters. getPerfectedCaseTable - Table binding

Trigger-Cursor example

CREATE OR REPLACE TRIGGER LOG_AUDIT_TRIGGER AFTER   INSERT OR UPDATE ON DEV2_APP.CASES   --table name on which u want to fire a trigger   REFERENCING OLD AS OLD NEW AS NEW   FOR EACH ROW     --WHEN (new.case_status_code<>old.case_status_code)   DECLARE                                                            -- variable declaration     n_status VARCHAR2(5) ;     o_status varchar2(5);   --n_status_reason varchar2(50) ;   n_modified_date DATE;   n_modified_user VARCHAR2(20);   o_caseId          VARCHAR2(20);   l_changeid      NUMBER; -- curser body or defination   CURSOR c_getmax_changeid(caseid VARCHAR2,field_name VARCHAR2)   IS     SELECT MAX(CA.change_id) AS maxChangeId     FROM DEV2_APP.case_audit_log CA     WHERE CA.CASE_ID  =caseid     AND CA.FIELD_NAME=field_name; BEGIN     -- begin of trigger body or defination   n_status:=:new.CASE_STATUS_CODE;   o_status:=:old.CASE_STATUS_CODE;   n_modified_date:=sysdate;   n_modified_user:='SSK';   o_c