Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » XWT ValidationRule Bug?
XWT ValidationRule Bug? [message #947781] Wed, 17 October 2012 12:31 Go to next message
Jürgen Weinberger is currently offline Jürgen WeinbergerFriend
Messages: 42
Registered: August 2012

I'm currently playing around with xwt and its validation mechanism. I wrote a simple test case like in the xwt.tests. There i ran into the problem that i declare 2 ValidationRules in the xwt but only one gets called on validation.
It seems that both rules get loaded and attached to the Binding. But later on validation only the (in the xwt) top-most rule gets called.

Is there a known bug or am i doing something wrong?

<Composite xmlns="" 
		   xmlns:y="clr-namespace:testapplication.model" xmlns:c0="clr-namespace:org.eclipse.e4.xwt.converters" xmlns:v0="clr-namespace:testapplication.uicontainers"
		<GridLayout numColumns="3" horizontalSpacing="10"/>
		<y:Person x:Key="myData"/>
	<Text x:Style="BORDER" text="{Binding Path=name, updateSourceTrigger=PropertyChanged, validationRules={v0:ValidatorOne, v0:ValidatorTwo}}">
			<GridData grabExcessHorizontalSpace="true" horizontalAlignment="FILL"/>


Maybe somebody has an idea?

regards weinma
Re: XWT ValidationRule Bug? [message #947800 is a reply to message #947781] Wed, 17 October 2012 12:56 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
I am not sure if the syntax (in your example) is right.
I guess that syntax will provide v0:ValidatorTwo as a parameter to the constructor of c0:ValidatorOne.

You can work around this by transforming your Binding as follows:

	<Text x:Style="BORDER">
		  <Binding path="name" updateSourceTrigger="PropertyChanged">
			  <v0:ValidatorOne />
			  <v0:ValidatorTwo />
			<GridData grabExcessHorizontalSpace="true" horizontalAlignment="FILL"/>
Previous Topic:How to find DirectMenuItem programmatically
Next Topic:Porting RAP to Eclipse4
Goto Forum:

Current Time: Tue Apr 20 09:22:00 GMT 2021

Powered by FUDForum. Page generated in 0.02117 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top