Unable to switch between VF page tabs after window reload (Salesforce)

Built on the SalesForce Developer Console, I have a page with 2 tabs – “Open Tab” and “Close Tab”.

1) Each tab has a set of records with a save button against each record.

2) Each record has a ‘Status’ picklist with values “Open” and “Close”.

3) “Open Tab” displays only those records with status as “Open”.

4) “Close Tab” displays only those records with status as “Close”.

5) On the “Open Tab” if i change the Status of a record to “Close” and save that record, it should move to the “Close Tab”. That is, the record should no longer be available in the “Open Tab” and it should automatically navigate to the “Close Tab”.

All’s well except point 5. Although the db update is happening correctly and the record is no longer available in the “Open Tab”, the automatic navigation to “Close Tab” is not happening. Please help.

Snippet from Visual Force Page:

function navigate() // switch from “Open Tab” to “Close Tab”
{RichFaces.switchTab(‘tstPg:form:TabPanelid’,’tstPg:form:Closeid’,’CLoseTab’);}


Snippet from controller class:

public PageReference save()
{
update ln; //ln is the obj instance that contains recs with status Open

    // window reload
    PageReference nextPage = new 
    pageReference('https://c.ap2.visual.force.com/apex/ABC?id='+Id);
    nextPage.setRedirect(true); 
    return nextPage;
}


Source: stackoverflow-javascript

apex checkbox to pl sql

I’ve added this apex_item.checkbox(1,id,'UNCHECKED') "Select",
to my query to display the checkbox

I need to update the checkboxe selected, so I have to get the value from the checkbox selected and pass them to PL/SQL expression (update x set y where id IN (...))

How can I pass those values to a PL/SQL?

Do I have to store them into a variable session? If yes, how I pass the values to a ITEM (P1_SELECTED)?
APEX_UTIL.SET_SESSION_STATE(‘print_id’, :P1_SELECTED);

Thank you


Source: stackoverflow-javascript