/** * Convenient method to perform programmatic initialization of the fragment. * * @see Fragments#init(ScreenFragment) */ public ScreenFragment init() { getScreenContext().getFragments().init(this); return this; }
return UiControllerUtils.getScreenContext(frameOwner).getFragments();
@Override public void initLookupLayout() { Action selectAction = getAction(LOOKUP_SELECT_ACTION_ID); if (selectAction != null && selectAction.getOwner() == null) { Fragments fragments = UiControllerUtils.getScreenContext(this).getFragments(); ScreenFragment lookupWindowActions = fragments.create(this, "lookupWindowActions"); lookupWindowActions.getFragment().setId("lookupWindowActions"); lookupWindowActions.getFragment().setVisible(false); getFrame().add(lookupWindowActions.getFragment()); lookupWindowActions.init(); } Element element = ((Component.HasXmlDescriptor) getFrame()).getXmlDescriptor(); if (element != null) { String lookupComponent = element.attributeValue("lookupComponent"); if (StringUtils.isNotEmpty(lookupComponent)) { Component component = getFrame().getComponent(lookupComponent); setLookupComponent(component); } } Component lookupComponent = getLookupComponent(); if (lookupComponent instanceof LookupSelectionChangeNotifier) { LookupSelectionChangeNotifier selectionNotifier = (LookupSelectionChangeNotifier) lookupComponent; if (selectAction != null) { //noinspection unchecked selectionNotifier.addLookupValueChangeListener(valueChangeEvent -> selectAction.setEnabled(!selectionNotifier.getLookupSelectedItems().isEmpty())); selectAction.setEnabled(!selectionNotifier.getLookupSelectedItems().isEmpty()); } } }
hostScreenContext.getDialogs(), hostScreenContext.getNotifications(), hostScreenContext.getFragments(), hostScreenContext.getUrlRouting()) );
hostScreenContext.getDialogs(), hostScreenContext.getNotifications(), hostScreenContext.getFragments(), hostScreenContext.getUrlRouting()) );