public code v1
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>flintstones.group</groupId>
|
||||
<artifactId>flintstones.bundles</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>flintstones.application.perspective.phase.ui</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<name>[bundle] Ui</name>
|
||||
</project>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>flintstones.application.perspective.phase.ui</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1779484362531</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
@@ -0,0 +1,30 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Ui
|
||||
Bundle-SymbolicName: flintstones.application.perspective.phase.ui;singleton:=true
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Require-Bundle: org.eclipse.e4.ui.model.workbench,
|
||||
org.eclipse.swt,
|
||||
org.eclipse.nebula.widgets.opal.breadcrumb,
|
||||
flintstones.helper.ui,
|
||||
javax.inject,
|
||||
flintstones.model.ui.service,
|
||||
javax.annotation,
|
||||
org.eclipse.e4.ui.di,
|
||||
org.eclipse.e4.core.di.annotations,
|
||||
flintstones.application.constants,
|
||||
flintstones.helper.faq,
|
||||
org.eclipse.e4.core.contexts,
|
||||
org.eclipse.e4.core.di,
|
||||
flintstones.entity.method.phasepage,
|
||||
flintstones.entity.method,
|
||||
flintstones.model.method.service,
|
||||
flintstones.model.method.phase.service,
|
||||
flintstones.entity.method.phase.ui,
|
||||
flintstones.application,
|
||||
org.eclipse.e4.core.services,
|
||||
org.eclipse.osgi.services,
|
||||
flintstones.entity.method.phase
|
||||
Automatic-Module-Name: flintstones.application.perspective.phase.ui
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Export-Package: flintstones.application.perspective.phase.ui
|
||||
@@ -0,0 +1,6 @@
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
fragment.e4xmi,\
|
||||
plugin.xml
|
||||
source.. = src/
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="ASCII"?>
|
||||
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_milRIBsLEemGeYpfhM1LEg">
|
||||
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_milRIRsLEemGeYpfhM1LEg" featurename="children" parentElementId="flintstones.application.perspectivestack.modes">
|
||||
<elements xsi:type="advanced:Perspective" xmi:id="_milRIhsLEemGeYpfhM1LEg" elementId="flintstones.application.perspective.phase" selectedElement="_-0ETgBsVEemGeYpfhM1LEg" label="Phase">
|
||||
<children xsi:type="basic:Part" xmi:id="_-0ETgBsVEemGeYpfhM1LEg" elementId="flintstones.application.perspective.phase.ui.part.container" contributionURI="bundleclass://flintstones.application.perspective.phase.ui/flintstones.application.perspective.phase.ui.PhaseContainer" label="PhaseContainer"/>
|
||||
</elements>
|
||||
</fragments>
|
||||
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_aM9fICYKEemAU4ItNHACgA" featurename="children" parentElementId="flintstones.application.perspectivestack.modes">
|
||||
<elements xsi:type="advanced:Perspective" xmi:id="_aM9fISYKEemAU4ItNHACgA" elementId="flintstones.application.perspective.phase.phantomphasecontainer" label="Phantom Phase Canvas">
|
||||
<children xsi:type="basic:Part" xmi:id="_9jSTgCYKEemAU4ItNHACgA" elementId="flintstones.application.perspective.phase.ui.part.0" contributionURI="bundleclass://flintstones.application.perspective.phase.ui/flintstones.application.perspective.phase.ui.PhantomPhaseCanvasPart"/>
|
||||
</elements>
|
||||
</fragments>
|
||||
</fragment:ModelFragments>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
|
||||
<extension
|
||||
id="flintstones.application.perspective.phase.ui.fragment"
|
||||
point="org.eclipse.e4.workbench.model">
|
||||
<fragment
|
||||
uri="fragment.e4xmi">
|
||||
</fragment>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
package flintstones.application.perspective.phase.ui;
|
||||
|
||||
import java.util.Arrays;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
||||
import org.eclipse.e4.core.contexts.IEclipseContext;
|
||||
import org.eclipse.e4.core.di.annotations.Optional;
|
||||
import org.eclipse.e4.core.services.events.IEventBroker;
|
||||
import org.eclipse.e4.ui.di.UIEventTopic;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.osgi.service.event.Event;
|
||||
import org.osgi.service.event.EventHandler;
|
||||
|
||||
import flintstones.application.constants.ApplicationContants;
|
||||
import flintstones.application.constants.FrameworkConstants;
|
||||
import flintstones.entity.method.phase.ui.PhaseMethodUI;
|
||||
import flintstones.entity.method.phasepage.PhasePage;
|
||||
import flintstones.model.method.phase.IPhaseMethodService;
|
||||
import flintstones.model.ui.service.UiService;
|
||||
import flintstones.application.handlers.PerspectiveSwitcher;
|
||||
|
||||
public class PhantomPhaseCanvasPart implements EventHandler {
|
||||
|
||||
@Inject
|
||||
IPhaseMethodService phaseService;
|
||||
|
||||
@Inject
|
||||
IEclipseContext context;
|
||||
|
||||
@Inject
|
||||
IEventBroker broker;
|
||||
|
||||
Composite canvas;
|
||||
Button saveButton;
|
||||
|
||||
PhaseMethodUI lastUI = null;
|
||||
|
||||
@PostConstruct
|
||||
private void createControls(Composite parent) {
|
||||
|
||||
UiService.setGridDataAuto(parent);
|
||||
UiService.setGridLayout(parent, 1);
|
||||
|
||||
canvas = new Composite(parent, 0);
|
||||
UiService.setGridDataAuto(canvas);
|
||||
UiService.setGridLayout(canvas, 1);
|
||||
|
||||
Composite controlRow = new Composite(parent,0);
|
||||
UiService.setGridLayout(controlRow, 4, true);
|
||||
UiService.setGridData(controlRow, 9, 0, true, false);
|
||||
|
||||
saveButton = new Button(controlRow, SWT.PUSH );
|
||||
saveButton.setText("Save");
|
||||
saveButton.setEnabled(false);
|
||||
saveButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
ContextInjectionFactory.make(PerspectiveSwitcher.class, context).changePerspective(ApplicationContants.MPerspective_Phase);
|
||||
broker.send(FrameworkConstants.TOPIC_METHOD_PHASE_PHANTOM_RESPONSE, lastUI);
|
||||
broker.unsubscribe(PhantomPhaseCanvasPart.this);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
UiService.setGridData(saveButton, 9, 0, true, false);
|
||||
|
||||
|
||||
Button cancelButton = new Button(controlRow, SWT.PUSH );
|
||||
cancelButton.setText("Cancel");
|
||||
cancelButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
ContextInjectionFactory.make(PerspectiveSwitcher.class, context).changePerspective(ApplicationContants.MPerspective_Phase);
|
||||
broker.unsubscribe(PhantomPhaseCanvasPart.this);
|
||||
}
|
||||
});
|
||||
UiService.setGridData(cancelButton, 9, 0, true, false);
|
||||
|
||||
}
|
||||
|
||||
private void draw(String phaseId) {
|
||||
|
||||
Arrays.stream(canvas.getChildren()).forEach(k -> k.dispose());
|
||||
|
||||
PhaseMethodUI phaseUI = phaseService.createPhase(phaseId);
|
||||
lastUI = phaseUI;
|
||||
|
||||
Composite phaseBase = new Composite(canvas, 0);
|
||||
UiService.setGridLayout(phaseBase, 1);
|
||||
UiService.setGridData(phaseBase, 9, 9, true, true);
|
||||
|
||||
PhasePage page = new PhasePage(phaseBase, phaseUI, null);
|
||||
page.load();
|
||||
|
||||
}
|
||||
|
||||
private void draw(PhaseMethodUI phaseUI) {
|
||||
lastUI = phaseUI;
|
||||
|
||||
Composite phaseBase = phaseUI.getBaseComposite();
|
||||
PhasePage page = new PhasePage(phaseBase, phaseUI, null);
|
||||
page.load();
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
@Optional
|
||||
private void subscribe(@UIEventTopic(FrameworkConstants.TOPIC_METHOD_PHASE_PHANTOM) Object item) {
|
||||
|
||||
if(item instanceof PhaseMethodUI)
|
||||
draw((PhaseMethodUI)item);
|
||||
else
|
||||
draw((String)item);
|
||||
|
||||
broker.subscribe(FrameworkConstants.TOPIC_METHOD_PHASE_REFRESH, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
boolean status = lastUI.isPhaseCompleted();
|
||||
saveButton.setEnabled(status);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+254
@@ -0,0 +1,254 @@
|
||||
package flintstones.application.perspective.phase.ui;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
||||
import org.eclipse.e4.core.contexts.IEclipseContext;
|
||||
import org.eclipse.e4.core.di.annotations.Optional;
|
||||
import org.eclipse.e4.ui.di.UIEventTopic;
|
||||
import org.eclipse.nebula.widgets.opal.breadcrumb.Breadcrumb;
|
||||
import org.eclipse.nebula.widgets.opal.breadcrumb.BreadcrumbItem;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.StackLayout;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
|
||||
import flintstones.application.constants.FrameworkConstants;
|
||||
import flintstones.entity.method.Method;
|
||||
import flintstones.entity.method.phase.ui.PhaseMethodUI;
|
||||
import flintstones.entity.method.phasepage.PhasePage;
|
||||
import flintstones.helper.faq.FaqHelper;
|
||||
import flintstones.helper.faq.interfaces.IFAQ;
|
||||
import flintstones.model.method.phase.IPhaseMethodService;
|
||||
import flintstones.model.method.service.IMethodService;
|
||||
import flintstones.model.ui.service.UiService;
|
||||
|
||||
public class PhaseContainer {
|
||||
|
||||
@Inject
|
||||
IPhaseMethodService phaseService;
|
||||
|
||||
@Inject
|
||||
IMethodService methodService;
|
||||
|
||||
|
||||
@Inject
|
||||
IEclipseContext context;
|
||||
|
||||
Breadcrumb menu;
|
||||
|
||||
Composite stackComposite;
|
||||
StackLayout stackLayout = new StackLayout();
|
||||
|
||||
// Controls
|
||||
Button nextButton;
|
||||
Button prevButton;
|
||||
Button infoButton;
|
||||
|
||||
Label methodNameLabel;
|
||||
Label phaseLabel;
|
||||
|
||||
// DATA
|
||||
int currentPage = 0;
|
||||
ArrayList<PhasePage> pages = new ArrayList<>();
|
||||
|
||||
public PhaseContainer() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
private void createControls(Composite parent) {
|
||||
|
||||
UiService.setGridData(parent, 9, 9, true, true);
|
||||
UiService.setGridLayout(parent, 1);
|
||||
|
||||
menu = new Breadcrumb(parent, SWT.BORDER);
|
||||
UiService.setGridLayout(menu, 1);
|
||||
UiService.setGridData(menu, 9, -1, true, false);
|
||||
|
||||
stackComposite = new Composite(parent, SWT.BORDER);
|
||||
UiService.setGridData(stackComposite, 9, 9, true, true);
|
||||
UiService.setGridLayout(stackComposite, 1);
|
||||
stackComposite.setLayout(stackLayout);
|
||||
stackComposite.layout();
|
||||
|
||||
Composite footer = new Composite(parent, SWT.BORDER);
|
||||
UiService.setGridLayout(footer, 3, true);
|
||||
UiService.setGridData(footer, 9, -1, true, false);
|
||||
|
||||
methodNameLabel = new Label(footer, 0);
|
||||
methodNameLabel.setText("XXXXXXXXXXXXXXXX");
|
||||
UiService.setGridData(methodNameLabel, -1, 0, true, false);
|
||||
|
||||
Composite controlsComposite = new Composite(footer, 0);
|
||||
UiService.setGridLayout(controlsComposite, 3, true);
|
||||
UiService.setGridData(controlsComposite, 0, 0, true, false);
|
||||
|
||||
prevButton = new Button(controlsComposite, SWT.PUSH);
|
||||
prevButton.setImage(UiService.getIcon("core/phase_left.png").createImage());
|
||||
prevButton.addListener(SWT.Selection, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
showPage(currentPage - 1);
|
||||
}
|
||||
});
|
||||
|
||||
infoButton = new Button(controlsComposite, SWT.PUSH);
|
||||
infoButton.setImage(UiService.getImage("info.png").createImage());
|
||||
infoButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
PhasePage page = pages.get(currentPage);
|
||||
FaqHelper faq = ContextInjectionFactory.make(FaqHelper.class, context);
|
||||
faq.showFAQ(page.getUI().getModel());
|
||||
}
|
||||
});
|
||||
|
||||
nextButton = new Button(controlsComposite, SWT.PUSH);
|
||||
nextButton.setImage(UiService.getIcon("core/phase_right.png").createImage());
|
||||
nextButton.addListener(SWT.Selection, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
showPage(currentPage + 1);
|
||||
}
|
||||
});
|
||||
|
||||
phaseLabel = new Label(footer, 0);
|
||||
phaseLabel.setText("XXXX2");
|
||||
UiService.setGridData(phaseLabel, 1, 0, true, false);
|
||||
|
||||
}
|
||||
|
||||
private void showPage(int pageNumber) {
|
||||
|
||||
if (currentPage != pageNumber)
|
||||
pages.get(currentPage).exit();
|
||||
|
||||
// Change page
|
||||
currentPage = pageNumber;
|
||||
|
||||
PhasePage page = pages.get(pageNumber);
|
||||
page.load();
|
||||
|
||||
if (page.isItSkippable()) {
|
||||
page.skip();
|
||||
showPage(pageNumber + 1);
|
||||
} else {
|
||||
setStackTop(page.getContainer());
|
||||
refreshUI(pageNumber);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void refreshUI(int pageNumber) {
|
||||
// Update UI state
|
||||
for (int i = 0; i < pages.size(); i++) {
|
||||
PhasePage page = pages.get(i);
|
||||
boolean isSelected = i == pageNumber;
|
||||
boolean isEnabled = i == 0 || pages.get(i - 1).getUI().isPhaseCompleted();
|
||||
page.update(isSelected, isEnabled);
|
||||
}
|
||||
|
||||
menu.redraw();
|
||||
|
||||
prevButton.setEnabled(pageNumber != 0);
|
||||
nextButton.setEnabled(pageNumber != pages.size() - 1 && pages.get(pageNumber).getUI().isPhaseCompleted());
|
||||
infoButton.setEnabled(pages.get(pageNumber).getUI().getModel() instanceof IFAQ);
|
||||
|
||||
phaseLabel.setText(pageNumber + 1 + "/" + pages.size());
|
||||
}
|
||||
|
||||
private void loadMethod(Method currentMethod) {
|
||||
|
||||
// CLEAN
|
||||
currentPage = 0;
|
||||
pages.stream().forEach(k -> k.dispose());
|
||||
pages.clear();
|
||||
|
||||
// LOAD
|
||||
methodService.loadPhasesFor(currentMethod);
|
||||
for (PhaseMethodUI phaseUI : currentMethod.getPhases()) {
|
||||
PhasePage phasePage = getPage(phaseUI);
|
||||
pages.add(phasePage);
|
||||
}
|
||||
|
||||
showPage(currentPage);
|
||||
|
||||
menu.layout();
|
||||
methodNameLabel.setText(currentMethod.getName());
|
||||
|
||||
}
|
||||
|
||||
private PhasePage getPage(PhaseMethodUI phaseUI) {
|
||||
|
||||
Composite phaseBase = new Composite(stackComposite, 0);
|
||||
UiService.setGridLayout(phaseBase, 1);
|
||||
UiService.setGridData(phaseBase, 9, 9, true, true);
|
||||
|
||||
BreadcrumbItem phaseMenu = getBreadcrumbItem(phaseUI);
|
||||
|
||||
PhasePage page = new PhasePage(phaseBase, phaseUI, phaseMenu);
|
||||
return page;
|
||||
}
|
||||
|
||||
private void setStackTop(Composite c) {
|
||||
stackLayout.topControl = c;
|
||||
c.layout();
|
||||
c.getParent().layout();
|
||||
}
|
||||
|
||||
private BreadcrumbItem getBreadcrumbItem(PhaseMethodUI ui) {
|
||||
|
||||
BreadcrumbItem item = new BreadcrumbItem(menu, SWT.PUSH);
|
||||
|
||||
int index = pages.size() + 1;
|
||||
String template = " {0} {1}"; //$NON-NLS-1$
|
||||
String phaseName = ui.getModel().getName();
|
||||
|
||||
String text = MessageFormat.format(template, index, phaseName);
|
||||
item.setText(text);
|
||||
|
||||
item.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(final SelectionEvent e) {
|
||||
int index = Integer.parseInt(item.getText().trim().split(" ")[0]) - 1;
|
||||
showPage(index);
|
||||
}
|
||||
});
|
||||
return item;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe.
|
||||
*
|
||||
* @param event the event
|
||||
*/
|
||||
@Inject
|
||||
@Optional
|
||||
private void subscribe(@UIEventTopic(FrameworkConstants.TOPIC_METHOD_LOAD) Method m) {
|
||||
if (m != null)
|
||||
loadMethod(m);
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe next.
|
||||
*
|
||||
* @param event the event
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Inject
|
||||
@Optional
|
||||
private void subscribeNext(@UIEventTopic(FrameworkConstants.TOPIC_METHOD_PHASE_REFRESH) Map<String, String> event) {
|
||||
refreshUI(currentPage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user