I need to filter the extensions of files inside a pathfield.
the right way is the predicate.
import org.apache.jackrabbit.commons.predicate.Predicate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Component
@Service
@Property(name = "PredicateVideo", value = "PredicateVideo")
public class PredicateVideo implements Predicate {
protected final Logger log = LoggerFactory.getLogger(this.getClass());
public boolean evaluate(Object obj) {
log.info("test "+obj.toString());
return true;
}
}
I have a pathfield with the property predicate equal to PredicateVideo and when i run the page i can see inside the log:
Unable to retrieve the predicate PredicateVideo
Why?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Please go through the documentation of "CQ.form.PathField",
Link:- https://docs.adobe.com/docs/en/cq/5-6/widgets-api/index.html?class=CQ.form.PathField
You can use :
regex :
linkPattern : String
parLinkPattern : String
Or you would need to write custom pathfield,
Pathfield has a property called predicate which can be used for filtering. You can create and register a custom predicate that returns false for the paths you don't want to be visible in the the dialog. The name of the custom predicate can then be passed to the config of pathfield.
You can find information here : http://wemcode.wemblog.com/custom-predicate-for-pathfield
For more on predicates, the following links can be referred :
http://wemcode.wemblog.com/custom-predicate-for-pathfield
http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi
Please go through the documentation of "CQ.form.PathField",
Link:- https://docs.adobe.com/docs/en/cq/5-6/widgets-api/index.html?class=CQ.form.PathField
You can use :
regex :
linkPattern : String
parLinkPattern : String
Or you would need to write custom pathfield,
Pathfield has a property called predicate which can be used for filtering. You can create and register a custom predicate that returns false for the paths you don't want to be visible in the the dialog. The name of the custom predicate can then be passed to the config of pathfield.
You can find information here : http://wemcode.wemblog.com/custom-predicate-for-pathfield
For more on predicates, the following links can be referred :
http://wemcode.wemblog.com/custom-predicate-for-pathfield
http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies