Package io.jmix.flowui
Interface Fragments
- All Known Implementing Classes:
FragmentsImpl
public interface Fragments
Factory for creating
Fragments.-
Method Summary
Modifier and TypeMethodDescription<F extends Fragment<?>>
Fcreate(FragmentOwner parent, Class<F> fragmentClass) Creates a fragment instance by its controller class.voidinit(ComponentLoader.Context hostContext, Fragment<?> fragment) Initializes passed fragment by processingFragmentDescriptor.
-
Method Details
-
create
Creates a fragment instance by its controller class.For example:
AddressFragment addressFragment = fragments.create(this, AddressFragment.class); getContent().add(addressFragment);- Type Parameters:
F- fragment type- Parameters:
parent- parent UI controllerfragmentClass- fragment controller class- Returns:
- fully initialized fragment instance
-
init
Initializes passed fragment by processingFragmentDescriptor.- Parameters:
hostContext- parent controller loader context. Used to get additional data that is needed for correct initialization. For example, provided data componentsfragment- fragment to initialize
-