Bill F
Bill F

Reputation: 2087

Fall through condition on a DynamicContent Control

I have a dynamicContent control I want to trap the error if there is no xp:key= matching value. I'm looking for something like a fall though that I can do something and not get a crash. I know that I can define a default key but I want to catch it at the end not the beginning. Or even something like dynamicContent.containsKey or dynamicContent.keyValues.

Upvotes: 0

Views: 61

Answers (1)

Mark Leusink
Mark Leusink

Reputation: 3757

The xe:dynamicContent has a getFacet("facetId") method. It returns a UIComponent or (assumably) null if the facet doesn't exist. Maybe you can use that to check if the facet exists.

Upvotes: 2

Related Questions