Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
ODA: Hiding certain data set wizard pages
kpeters
The ODA I'm working on consists of multiple pages. In order to simplify things and not overwhelm the user when they first create a data set, I just want to display the first of my data set pages when the data set is first created. After the initial data set creation, the user can then access the other pages in the edit data set interface. A valid query can be created by just the first page and the other pages allow the user to further refine the query. How can I "hide" certain pages from the initial data set creation?
Find more posts tagged with
Comments
Linda Chan
You can extend ODA DataSetWizard to control the wizard behavior of stepping thru your custom data set wizard pages.
For example, overriding Wizard#getNextPage to return null would hide all the subsequent wizard pages.
To apply your extended DataSetWizard class, specify your wizard class name in the dataSetUI.dataSetWizard.class attribute in your ODA designer plugin implementation of the
"org.eclipse.datatools.connectivity.oda.design.ui.dataSource" extension point.
Linda
kpeters
Thanks for the reply Linda. I tried this and now the first page will no longer advance at all (org.eclipse.jface.wizard.WizardPage.setPageComplete(true) is being called successfully within the DataSetWizardPage). I see a NPE in the .log thrown from my custom page:
java.lang.NullPointerException
at org.eclipse.datatools.connectivity.oda.openmrs.ui.impl.TokenSelectionPage.getNextPage(TokenSelectionPage.java:895)
at org.eclipse.jface.wizard.WizardPage.canFlipToNextPage(WizardPage.java:115)
at org.eclipse.jface.wizard.WizardDialog.updateButtons(WizardDialog.java:1250)
at org.eclipse.jface.wizard.WizardPage.setPageComplete(WizardPage.java:299)
at org.eclipse.datatools.connectivity.oda.openmrs.ui.impl.TokenSelectionPage.validateData(TokenSelectionPage.java:710)
at org.eclipse.datatools.connectivity.oda.openmrs.ui.impl.TokenSelectionPage.access$9(TokenSelectionPage.java:693)
at org.eclipse.datatools.connectivity.oda.openmrs.ui.impl.TokenSelectionPage$4.mouseDoubleClick(TokenSelectionPage.java:286)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:182)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.birt.report.designer.ui.actions.NewDataSetAction.createNewDataSet(NewDataSetAction.java:157)
at org.eclipse.birt.report.designer.ui.actions.NewDataSetAction.run(NewDataSetAction.java:142)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
I also tried overwriting getPageCount() with no luck as well. Any ideas?
Is there any documentation for the prefered way to enable tracing of all the ODA calls?
kpeters
Nevermind, I forgot I was also overriding getNextPage() within my custom DataSetWizardPage. I removed this and now it works the way I want. However, if you have any details on enabling trace, that would be great. Thanks!
Linda Chan
For the wizard pages interaction, I don't think there are built-in trace logging in the Eclipse UI framework. Any trace logging within your custom ODA designer is obviously up to your implementation. We normally use the java.util.logging utility for runtime implementation.
In general, I find it easier to use the IDE debugger to step thru the code, especially when you can reproduce a problem locally.
Linda