private void CreateWorkplaceCommandHandler() { Presentation.Workplace sendingWorkplace = GetWorkplace(); WebViewModel viewModel = (WebViewModel) sendingWorkplace.CurrentViewModel; Presentation.Workplace workplace = WebContext.WorkplaceManager.CreateWorkplace(); workplace.ActivateView(viewModel); }
private void CreateViewCommandHandler() { string viewName = GetCommandParameter("viewName", true); WebViewModel viewModel = (WebViewModel) ViewModel.Parse(viewName); string viewParameters = viewModel.GetQueryString(Request.QueryString); Presentation.Workplace workplace = WebContext.WorkplaceManager.CreateWorkplace(); workplace.ActivateView(viewModel, viewParameters); }
private void LoadViewCommandHandler() { string viewName = GetCommandParameter("viewName", true); string userInterfaceItemId = GetCommandParameter("userInterfaceItemId", false); WebViewModel viewModel = (WebViewModel) ViewModel.Parse(viewName); string viewParameters = viewModel.GetQueryString(Request.QueryString); viewParameters += (viewParameters.Length != 0 ? "&" : String.Empty) + "dashboardId=" + userInterfaceItemId; Presentation.Workplace workplace = GetWorkplace(); workplace.ActivateView(viewModel, viewParameters); }
private void BackHistoryCommandHandler() { Presentation.Workplace workplace = GetWorkplace(); string[] history = workplace.NavigationHistory.Back().Split('?'); WebViewModel viewModel = (WebViewModel) ViewModel.Parse(history[0]); if (history.Length == 1) { workplace.ActivateView(viewModel); } else { workplace.ActivateView(viewModel, history[1]); } }
private void RefreshViewCommandHandler() { Presentation.Workplace workplace = GetWorkplace(); workplace.ActivateView(workplace.CurrentViewModel); }