SettingSet root = (SettingSet) gateway.getSettings(); if (root != null) { String currentSettingSetName = getCurrentSettingSetName(); SettingSet currentSettingSet; if (StringUtils.isBlank(currentSettingSetName)) { currentSettingSet = (SettingSet) root.getDefaultSetting(SettingSet.class); } else { currentSettingSet = (SettingSet) root.getSetting(currentSettingSetName); } setCurrentSettingSet(currentSettingSet); }
    public void pageBeginRender(PageEvent event_) {        Gateway gateway = getGateway();        if (null != gateway) {            return;        }        Integer id = getGatewayId();        GatewayContext gatewayContext = getGatewayContext();        if (null != id) {            gateway = getGatewayContext().getGateway(id);        } else {            gateway = gatewayContext.newGateway(getGatewayModel());        }        setGateway(gateway);        // settings part        SettingSet root = (SettingSet) gateway.getSettings();        if (root != null) {            String currentSettingSetName = getCurrentSettingSetName();            SettingSet currentSettingSet;            if (StringUtils.isBlank(currentSettingSetName)) {                currentSettingSet = (SettingSet) root.getDefaultSetting(SettingSet.class);            } else {                currentSettingSet = (SettingSet) root.getSetting(currentSettingSetName);            }            setCurrentSettingSet(currentSettingSet);        }    }