Warning message: The data model property <property> does not exist?

Article ID: 2321
Last updated: 29 May, 2018
Article ID: 2321
Last updated: 29 May, 2018
Revision: 3
Views: 732
Posted: 27 Oct, 2006
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

Why do I get the message WARNING: The data model property does not exist?

Answer

This is an informational message that occurs when the CSS engine is evaluating expressions. It diagnoses when an expression refers to a property that does not exist.

Suppose you have a rule:

node{

label: "@name";

icon : "url(myIcon.svg)";

}

If the name property is not defined for some nodes in the model, each node will give a message:

WARNING: The data model property name does not exist.

The label CSS property for these nodes is undefined.

The message was added in JViews 6.0, and is intended to remind you to add the properties to your data model elements, or to write more selective rules.

You can choose to:

  • Ignore the message, which is fine, but leaves extra output, and does not resolve the underlying issue.
  • Disable the messages with Java "Logger" API, which is a little cleaner, but also does not resolve the underlying cause.
  • Add the property to all appropriate elements, which will definitely work, although this may not make sense for all matching objects in the data model.
  • Add selectors and extra rules to test for the existence of the property.

For instance, you can write two rules:

node{

icon : "url(myIcon.svg)";

label : "";

}

node[name]{

label: "@name";

}

The first rule will apply for all nodes, as expected.
This second rule will only match for those nodes that have the name property defined to a non-null value.
This ensures that the @name expression is only evaluated when the name property is set, which avoids the message entirely.

As long as the rules are testing for properties in the right way, and expressions do not evaluate properties that do not exist, then you should not get this message.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2321
Last updated: 29 May, 2018
Revision: 3
Views: 732
Posted: 27 Oct, 2006 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category