private void RecreateListView(bool ifNotCreatedOnly)
 {
     if (ViewEditMode == ViewEditMode.Edit && (!ifNotCreatedOnly || listView == null))
     {
         listView = null;
         if (CurrentObject != null)
         {
             listView = helper.CreateListView(CurrentObject);
         }
         Frame.SetView(listView);
     }
 }
Esempio n. 2
0
        protected void EnsureFrameObjects()
        {
            if (frame == null)
            {
                frame = helper.Application.CreateNestedFrame(this, TemplateContext.LookupControl);
                frame.SetView(helper.CreateListView(CurrentObject)); // joe 5/11/2011: MUST DO THIS
                newObjectViewController = frame.GetController <NewObjectViewController>();

                if (newObjectViewController != null)
                {
                    newObjectViewController.ObjectCreating += new EventHandler <ObjectCreatingEventArgs>(newObjectViewController_ObjectCreating);
                    newObjectViewController.ObjectCreated  += new EventHandler <ObjectCreatedEventArgs>(newObjectViewController_ObjectCreated);
                }

                newObjectWindowAction          = new PopupWindowShowAction(null, "New", PredefinedCategory.Unspecified.ToString());
                newObjectWindowAction.Execute += new PopupWindowShowActionExecuteEventHandler(newObjectWindowAction_OnExecute);
                newObjectWindowAction.CustomizePopupWindowParams += new CustomizePopupWindowParamsEventHandler(newObjectWindowAction_OnCustomizePopupWindowParams);
                newObjectWindowAction.Application = helper.Application;
            }
        }