Custom widget issue

0
Hi community,I was exploring the custom widgets and ran into an issue. I would greatly appreciate it if someone could help.Thanks in advance.Error(s) in widget XML file 'DragAndDrop.xml':Error in property 'fileEntity': Entity/EntityConstraint properties are not supported by pluggable widgets (pluginWidget="true").Error in property 'association': Entity/EntityConstraint properties are not supported by pluggable widgets (pluginWidget="true").Error in property 'association': IsPath/PathType attributes are not supported by pluggable widgets (pluginWidget="true").
asked
2 answers
1

Hi Rakesh

The props what you are using is old dojo one's. In new pluggable widget you need to use datasource instead entities


ex:

<property key="files" type="datasource" isList="true" required="true">

<caption>File association</caption>

<description>Reference set from context to FileDocument</description>

</property>


I hope this helps

answered
0

Hi,


The error you are encountering is expected behavior when developing Pluggable Widgets (pluginWidget="true").

The key issue is this:

Pluggable widgets do not support EntityConstraint, PathType, or certain legacy XML property configurations that were previously available in custom Dojo-based widgets.

Why This Error Occurs

You are receiving errors such as:

  • Entity/EntityConstraint properties are not supported by pluggable widgets
  • IsPath/PathType attributes are not supported by pluggable widgets

This happens because:

Pluggable widgets use the new React-based widget architecture, which has a strictly defined property schema. The older XML constructs used in Dojo widgets are no longer supported.

Specifically:

  • EntityConstraint is not supported
  • PathType is not supported
  • IsPath="true" is not supported
  • Direct association configuration via legacy XML is not supported

These properties belong to the old custom widget model and are incompatible with the pluggable widget framework.

Architectural Difference

Old Custom Widgets (Dojo-based)

  • Flexible XML definitions
  • Supported EntityConstraint
  • Supported PathType
  • Supported complex entity references in XML

Pluggable Widgets (React-based)

  • Strictly typed property definitions
  • Defined using widget.xml schema
  • Data passed via:
    • attribute
    • association
    • datasource
    • expression
    • object
  • No support for legacy XML attributes

Correct Way to Define Entity Properties in Pluggable Widgets

If you need:

1. Entity Selection

Use:


<property key="fileEntity" type="entity" required="true" />

2. Attribute Selection

Use:


<property key="fileAttribute" type="attribute">
    <attributeTypes>
        <attributeType name="String" />
    </attributeTypes>
</property>

3. Association

Use:


<property key="association" type="association" />

Do not include:

  • EntityConstraint
  • IsPath
  • PathType

Filtering must be handled in the datasource or in the page configuration — not in widget XML.

How to Handle Constraints Instead

Since EntityConstraint is not supported:

Use one of these approaches:

  1. Apply XPath constraints in the datasource.
  2. Filter data inside a microflow.
  3. Use a datasource property in the widget (type="datasource").
  4. Pass filtered objects to the widget instead of filtering inside XML.

Pluggable widgets are intentionally designed to be UI components, not data-filtering engines.

Recommended Best Practice

For pluggable widgets:

  • Keep XML simple and strongly typed.
  • Handle filtering and business logic outside the widget.
  • Let the widget focus purely on presentation and interaction.
  • Use datasources rather than embedding constraints in XML.

The errors occur because EntityConstraint, PathType, and related attributes are not supported in Pluggable Widgets (pluginWidget="true").

You must redesign the widget XML using supported property types (entity, attribute, association, datasource) and move any filtering logic outside the widget definition.

This behavior is expected and aligns with the Pluggable Widgets architecture introduced in Mendix 8+ and enforced in Mendix 9.



answered