Example usage for com.liferay.portal.kernel.servlet.taglib.ui FormNavigatorEntry getFormNavigatorId

List of usage examples for com.liferay.portal.kernel.servlet.taglib.ui FormNavigatorEntry getFormNavigatorId

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.servlet.taglib.ui FormNavigatorEntry getFormNavigatorId.

Prototype

public String getFormNavigatorId();

Source Link

Document

Returns the form navigator ID where the form navigator entry will be included.

Usage

From source file:com.liferay.frontend.taglib.form.navigator.internal.configuration.FormNavigatorEntryConfigurationHelperImpl.java

License:Open Source License

@Activate
protected void activate(BundleContext bundleContext) {
    _formNavigatorEntriesMap = ServiceTrackerMapFactory.openSingleValueMap(bundleContext,
            FormNavigatorEntry.class, null, (serviceReference, emitter) -> {
                FormNavigatorEntry formNavigatorEntry = bundleContext.getService(serviceReference);

                emitter.emit(_getKey(formNavigatorEntry.getKey(), formNavigatorEntry.getFormNavigatorId()));

                bundleContext.ungetService(serviceReference);
            });//from  w  w  w  .  ja  v a 2  s. c o  m

    _formNavigatorContextProviderMap = ServiceTrackerMapFactory.openSingleValueMap(bundleContext,
            FormNavigatorContextProvider.class, FormNavigatorContextConstants.FORM_NAVIGATOR_ID);
}

From source file:com.liferay.frontend.taglib.form.navigator.internal.osgi.commands.FormNavigatorOSGiCommands.java

License:Open Source License

@Activate
protected void activate(BundleContext bundleContext) {
    _formNavigatorEntries = ServiceTrackerListFactory.open(bundleContext, FormNavigatorEntry.class);
    _formNavigatorEntriesMap = ServiceTrackerMapFactory.openMultiValueMap(bundleContext,
            FormNavigatorEntry.class, null, (serviceReference, emitter) -> {
                FormNavigatorEntry formNavigatorEntry = bundleContext.getService(serviceReference);

                String key = _getKey(formNavigatorEntry.getFormNavigatorId(),
                        formNavigatorEntry.getCategoryKey());

                emitter.emit(key);//from w  w w.  j  av a 2s.  c  om

                bundleContext.ungetService(serviceReference);
            });
}