SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.
Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
by domfe » Thu Nov 25, 2010 3:15 am
I want to validate a child for my component.
In my *.wbp-component.xml I've the following code:
- Code: Select all
<parameters>
<parameter name="GEF.requestValidator.parent">true</parameter>
<parameter name="GEF.requestValidator.parentOnly"><![CDATA[
isComponentType(child, "com.example.MyComponent")
]]></parameter>
<parameter name="databinding.disable">true</parameter>
<parameter name="layout.has">true</parameter>
</parameters>
But the designer doesn't block other child components to be dropped.
Thank you.
-
domfe
-
- Posts: 46
- Joined: Mon Oct 04, 2010 6:42 am
by Eric Clayberg » Thu Nov 25, 2010 6:28 am
You should use GEF.requestValidator.parent for this.
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by domfe » Fri Nov 26, 2010 2:48 am
Thank you. It worked.
What's the difference between .parent and .parentOnly?
D.
-
domfe
-
- Posts: 46
- Joined: Mon Oct 04, 2010 6:42 am
by Eric Clayberg » Fri Nov 26, 2010 4:51 am
.parent is what you want and .parentOnly is unrelated and deprecated.
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
Return to SWT Designer
Who is online
Users browsing this forum: Bing [Bot] and 1 guest