Package io.jmix.flowui.impl
Class FragmentsImpl
java.lang.Object
io.jmix.flowui.impl.FragmentsImpl
- All Implemented Interfaces:
Fragments
Implementation of the
Fragments interface responsible for the creation and initialization of
fragments within the UI flow. This class provides utilities for programmatic fragment creation, descriptor
processing, and lifecycle initialization of fragments.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.context.ApplicationContextprotected final AutowireManagerprotected final FragmentDescriptorLoaderprotected final UiComponentsprotected final ViewRegistry -
Constructor Summary
ConstructorsConstructorDescriptionFragmentsImpl(org.springframework.context.ApplicationContext applicationContext, FragmentDescriptorLoader fragmentDescriptorLoader, UiComponents uiComponents, ViewRegistry viewRegistry, AutowireManager autowireManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidautowireFragment(Fragment<?> fragment) <F extends Fragment<?>>
Fcreate(FragmentOwner parent, Class<F> fragmentClass) Creates a fragment instance by its controller class.protected FragmentLoaderContextcreateHostFragmentLoaderContext(Fragment<?> fragment) protected ComponentLoader.ContextcreateHostLoaderContext(FragmentOwner parent) protected ComponentLoaderContextcreateHostViewLoaderContext(View<?> view) protected ComponentLoader.ContextfindHostLoaderContext(ComponentLoader.Context hostContext) protected StringgetFullOriginId(ComponentLoader.Context hostContext, Fragment<?> fragment) voidinit(ComponentLoader.Context hostContext, Fragment<?> fragment) Initializes passed fragment by processingFragmentDescriptor.protected voidpostInit(Fragment<?> fragment, FragmentLoaderContext context) protected voidprocessFragmentDescriptor(FragmentLoaderContext context, String descriptorPath)
-
Field Details
-
applicationContext
protected final org.springframework.context.ApplicationContext applicationContext -
fragmentDescriptorLoader
-
uiComponents
-
viewRegistry
-
autowireManager
-
-
Constructor Details
-
FragmentsImpl
public FragmentsImpl(org.springframework.context.ApplicationContext applicationContext, FragmentDescriptorLoader fragmentDescriptorLoader, UiComponents uiComponents, ViewRegistry viewRegistry, AutowireManager autowireManager)
-
-
Method Details
-
create
Description copied from interface:FragmentsCreates a fragment instance by its controller class.For example:
AddressFragment addressFragment = fragments.create(this, AddressFragment.class); getContent().add(addressFragment); -
init
Description copied from interface:FragmentsInitializes passed fragment by processingFragmentDescriptor. -
getFullOriginId
-
postInit
-
autowireFragment
-
findHostLoaderContext
@Nullable protected ComponentLoader.Context findHostLoaderContext(ComponentLoader.Context hostContext) -
processFragmentDescriptor
-
createHostLoaderContext
-
createHostViewLoaderContext
-
createHostFragmentLoaderContext
-