Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Preventing page switching in "Edit Data Set" dialog when content is invalid?
Jesse Weinstein
I'm trying to implement a DataSetWizardPage, and I want it to prevent users from allowing invalid content, by disabling switching pages until the content is valid. This would seem to be handled by the WizardContainer, but there isn't one. I'm confused by this; any suggestions would be appreciated.
Find more posts tagged with
Comments
Linda Chan
You can control the behavior by overriding the method #canLeave in your custom implementation of the DataSetWizardPage.
Linda
Jesse Weinstein
Thanks for the response! I should have mentioned, I'm already doing that. I override canLeave() to return the value of isPageComplete(), which I set to false in my validation function. But it doesn't work.
The problem seems to be that org.eclipse.birt.report.designer.data.ui.dataset.PropertyPageWrapper.canLeave() unconditionally returns true for DataSetEditorPages, even if the actual page's okToLeave() method returns false.
Any further ideas?
Linda Chan
Which BIRT version are you using? I believe that bug has been fixed in BIRT 4.2.1.
Linda Chan
Oops, I meant the bug was fixed in BIRT 4.2.2.
Jesse Weinstein
I think I'm using 4.2.2 :
org.eclipse.birt (4.2.2.v201301281649-ClBI9nGZcVSofEz-Xuz0n-ruJtUm) "Business Intelligence and Reporting Tools"
I'll look up the git repo link for the file I mentioned...
Jesse Weinstein
Oddly, it looks like it was changed from the expected value *to* being forced to true, in this change:
https://git.eclipse.org/c/birt/org.eclipse.birt.git/commit/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/PropertyPageWrapper.java?id=76586f2a920d7ff9cbb417afa90e7f165e2bb83a
prompted by this bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322653
(which is, very oddly, marked WORKSFORME)
That looks very strange.
Linda Chan
The commit that you'd pointed to seem to have introduced the bug. Can you try with BIRT 4.3M6 build, which should contain the bug fix. It can be downloaded from
http://download.eclipse.org/birt/downloads/build_list.php
There seems to be a delay in synchronizing the source, which should be caught up by 4.3 M7.
Jesse Weinstein
<blockquote class='ipsBlockquote' data-author="'Linda Chan'" data-cid="116133" data-time="1366311541" data-date="18 April 2013 - 11:59 AM"><p>
The commit that you'd pointed to seem to have introduced the bug. Can you try with BIRT 4.3M6 build, which should contain the bug fix. It can be downloaded from <br />
<a class='bbc_url' href='
http://download.eclipse.org/birt/downloads/build_list.php'>http://download.eclipse.org/birt/downloads/build_list.php</a>
; <br />
<br />
There seems to be a delay in synchronizing the source, which should be caught up by 4.3 M7.<br /></p></blockquote>
Er, what repository is 4.3M6 built from, if not the official one at eclipse.org? Isn't having the primary repo be on eclipse.org a requirement of being an Eclipse project? <br />
<br />
(Edit: See <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/project/charter.php#dev_process'>The
Development Process</a> from the BIRT Project Charter:<br />
<blockquote class='ipsBlockquote' ><p>
The master copy of the code base must reside on the Project web site where it is accessible to all users, developers and committers.<br /></p></blockquote> )
Jesse Weinstein
I've verified that the source code (available from
http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/M-R1-4.3M6-201303181906/birt-source-4.3M6.zip
) does contain a reversion of the problematic commit, and I've verified that the binary does seem to resolve the problem. Thanks for your help.
Can you link me to the bugzilla entry that documents the reversion, so I can link it to the original bugzilla entry, for the sake of future people trying to puzzle this out?