ViewState viewState = (ViewState) request.getAttribute(LifeCycleConstants.VIEWSTATE_PARAM_NAME);
ViewState viewState = (ViewState) RenderUtils.getViewState();
    private SearchBean getBean(HttpServletRequest request) {        ViewState viewState = (ViewState) request.getAttribute(LifeCycleConstants.VIEWSTATE_PARAM_NAME);        return (SearchBean) viewState.getMetaObject().getObject();    }