Exemple #1
0
 public void execute(Event<UIAddAttachment> event) throws Exception {
   UIAddAttachment component = event.getSource();
   EventUIComponent eventUIComponent = component.getTargetAttachEvent();
   UIPortletApplication portlet = component.getAncestorOfType(UIPortletApplication.class);
   UIComponent targerComponent = portlet.findComponentById(eventUIComponent.getId());
   Event<UIComponent> xEvent =
       targerComponent.createEvent(
           eventUIComponent.getEventName(), Event.Phase.PROCESS, event.getRequestContext());
   if (!StringUtils.isEmpty(getSelectedFile(event))) {
     processEvent(event);
   } else {
     event
         .getRequestContext()
         .getUIApplication()
         .addMessage(
             new ApplicationMessage(
                 "UIAddAttachment.msg.not-a-file", null, ApplicationMessage.WARNING));
     ((PortalRequestContext) event.getRequestContext().getParentAppRequestContext())
         .ignoreAJAXUpdateOnPortlets(true);
     return;
   }
   if (xEvent != null) {
     xEvent.broadcast();
   }
   UIPopupWindow uiPopupWindow = event.getSource().getParent();
   uiPopupWindow.setRendered(false);
   uiPopupWindow.setUIComponent(null);
   event.getRequestContext().addUIComponentToUpdateByAjax(uiPopupWindow.getParent());
 }
 public void execute(Event<UIPopupWindow> event) throws Exception {
   UICLVTemplatesManager uiTemplateManager =
       event.getSource().getAncestorOfType(UICLVTemplatesManager.class);
   UICLVTemplateContainer uiTemplateContainer =
       uiTemplateManager.getChildById(uiTemplateManager.getSelectedTabId());
   UIPopupWindow uiPopupWindow = uiTemplateContainer.getChild(UIPopupWindow.class);
   uiPopupWindow.setRendered(false);
   event.getRequestContext().addUIComponentToUpdateByAjax(uiTemplateManager);
 }
 public void initPopupPermission(UIComponent uiSelector) throws Exception {
   removeChildById(UIPermissionForm.POPUP_SELECT);
   UIPopupWindow uiPopup = addChild(UIPopupWindow.class, null, UIPermissionForm.POPUP_SELECT);
   uiPopup.setShowMask(true);
   uiPopup.setWindowSize(560, 300);
   uiPopup.setRendered(true);
   uiPopup.setUIComponent(uiSelector);
   uiPopup.setShow(true);
   uiPopup.setResizable(true);
 }
 private void initTaggingFormPopup(Node selectedTag) throws Exception {
   removeChildById("TagPopup");
   UIPopupWindow uiPopup = addChild(UIPopupWindow.class, null, "TagPopup");
   uiPopup.setShowMask(true);
   uiPopup.setWindowSize(600, 200);
   UITagForm uiForm = createUIComponent(UITagForm.class, null, null);
   uiForm.setTag(selectedTag);
   uiPopup.setUIComponent(uiForm);
   uiPopup.setRendered(true);
   uiPopup.setShow(true);
   uiPopup.setResizable(true);
 }
 public void initPopupPermission(UIComponent uiSelector) throws Exception {
   UIPopupWindow uiPopup = getChildById(UIPermissionFormBase.POPUP_SELECT);
   if (uiPopup == null) {
     uiPopup = addChild(UIPopupWindow.class, null, UIPermissionFormBase.POPUP_SELECT);
     uiPopup.setWindowSize(560, 345);
     uiPopup.setShowMask(true);
   } else {
     uiPopup.setShowMask(true);
     uiPopup.setRendered(true);
   }
   uiPopup.setUIComponent(uiSelector);
   uiPopup.setShow(true);
   uiPopup.setResizable(true);
 }
 public void execute(Event<UIPermissionManager> event) throws Exception {
   UIPopupWindow popupAction = event.getSource().getAncestorOfType(UIPopupWindow.class);
   popupAction.setRendered(false);
   popupAction.setShow(false);
   event.getRequestContext().addUIComponentToUpdateByAjax(popupAction);
 }
Exemple #7
0
 public void execute(Event<UIAddAttachment> event) throws Exception {
   UIPopupWindow uiPopupWindow = event.getSource().getParent();
   uiPopupWindow.setUIComponent(null);
   uiPopupWindow.setRendered(false);
   event.getRequestContext().addUIComponentToUpdateByAjax(uiPopupWindow.getParent());
 }