I am writing the ResourceChangeListener . I want current page path at ResourceChangeListener.PATHS.
PFB snippet where I want currentpage's path.
@component(immediate = true, service = ResourceChangeListener.class, enabled = true, property = {
"process.label = JSON Event Handler",
ResourceChangeListener.PATHS
+ "=CURRENTPAGEPATH",
ResourceChangeListener.CHANGES + "=ADDED", ResourceChangeListener.CHANGES + "=CHANGED" })
Views
Replies
Total Likes
As per the documentation you need to provide the path. Please see below
Array of paths or glob patterns - required.
A path is either absolute or relative. If it's a relative path, the relative path will be appended to all search paths of the resource resolver.
If the whole tree of all search paths should be observed, the special value .
should be used.
A glob pattern must start with the glob:
prefix (e.g. glob:**/*.html
). The following rules are used to interpret glob patterns:
*
character matches zero or more characters of a name component without crossing directory boundaries.**
characters match zero or more characters crossing directory boundaries.
@Saravanan_Dharmaraj yes but I want to handle the event for component's dialog change and that component will present at all the pages. That's why I want current page path.
@Anamika_13 if you want to capture change all the pages , then you can give "/content" itself, isnt it?
Please see this example
I want to capture event for the component's dialog.
Views
Like
Replies
Views
Likes
Replies
Views
Likes
Replies