Solved
test condition for model class
Hi,
I have a query, can we write a condition to check the methods in the model class before we call the model class using data-sly-use and call the methods.
here's a scenario:
Model Class,
@Model(adaptables = Resource.class)
public class HelloWorldModel {
@ValueMapValue(name=PROPERTY_RESOURCE_TYPE, injectionStrategy=InjectionStrategy.OPTIONAL)
@1497330(values="No resourceType")
protected String resourceType;
@586265
private String message;
public String getHelloMessage() {
return message;
}
}
HTML file
<div data-sly-use.model="com.bootcamp.core.models.HelloWorldModel">
data-message=${model.helloMessage} </div>
question: how do I use data-sly-test to check the class and it's objects
Thanks,