/* WRAppBean - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package psdi.webclient.beans.woreq;

import java.rmi.RemoteException;

import psdi.util.MXException;
import psdi.webclient.system.beans.AppBean;
import psdi.webclient.system.beans.DataBean;
import psdi.webclient.system.controller.WebClientEvent;

public class WRAppBean extends AppBean {
    protected void initialize() throws MXException, RemoteException {
        super.initialize();
    }

    public int selectrecord() throws MXException, RemoteException {
        int i = super.selectrecord();
        sessionContext.queueEvent(new WebClientEvent("gototab", sessionContext.getCurrentAppId(), "insert", sessionContext));
        sessionContext.queueRefreshEvent();
        return i;
    }

    public int returnWoreq() throws MXException, RemoteException {
        DataBean databean = app.getDataBean("results_showlist");
        databean.setQbe("wonum", "");
        databean.saveCurrentQbeSettings(true);
        databean.restoreSavedQbeSettings();
        databean.reset();
        sessionContext.queueEvent(new WebClientEvent("gototab", sessionContext.getCurrentAppId(), "list", sessionContext));
        sessionContext.queueRefreshEvent();
        return 1;
    }
}
