You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @Attribute annotation allows TB elements to specify the query by specific attributes. Unfortunately it does not support boolean attributes, like for instance has-value on fields or similar. Setting "true" or the attribute name itself as value does not work.
Therefore the request is, that there should be a new parameter value "booleanValue", that has a type of a new enum BooleanAttributeValue.
That enum consists of the items
UNUSED
TRUE
FALSE
The value UNUSED is the default and marks that parameter as "ignore me", like the other parameter defaults do. Using TRUE or FALSE instead will mark the parameter as set and thus ignore the other parameters value and contains.
Depending on TRUE or FALSE the respective attribute will be interpreted as "is explicitly set" or "is explicitly not set", like ElementQuery#withAttribute(String) / withoutAttribute(String) would do.
A use case we have: find all grids, that are not tree grids and vice versa. (but I assume, there are many many more out there)
@Attribute(name = "hierarchical", booleanValue = TRUE)
public class CustomGridElement extends GridElement
@Attribute(name = "hierarchical", booleanValue = FALSE)
public class CustomTreeGridElement extends TreeGridElement
The text was updated successfully, but these errors were encountered:
Our current workaround is to write the boolean value as a string and then interprete that string. But that leads to ugly html and does not cover the case of "the attribute is explicitly not set".
The
@Attribute
annotation allows TB elements to specify the query by specific attributes. Unfortunately it does not support boolean attributes, like for instancehas-value
on fields or similar. Setting "true" or the attribute name itself as value does not work.Therefore the request is, that there should be a new parameter value "booleanValue", that has a type of a new enum
BooleanAttributeValue
.That enum consists of the items
The value UNUSED is the default and marks that parameter as "ignore me", like the other parameter defaults do. Using TRUE or FALSE instead will mark the parameter as set and thus ignore the other parameters
value
andcontains
.Depending on TRUE or FALSE the respective attribute will be interpreted as "is explicitly set" or "is explicitly not set", like
ElementQuery#withAttribute(String) / withoutAttribute(String)
would do.A use case we have: find all grids, that are not tree grids and vice versa. (but I assume, there are many many more out there)
The text was updated successfully, but these errors were encountered: