one solution I could recommend is to write an event listener on page activation. If you have a generic pattern for the node where the content is saved; on activation of the page , just activate the node programatically.
This would be something like below
@Component
@Service
@Property(name = "event.topics", value = ReplicationAction.EVENT_TOPIC)
public class ReplicatonEventHandler implements Runnable, EventHandler {
private Logger LOG = LoggerFactory.getLogger(this.getClass());
private BundleContext bundleContext;
@Override
public void handleEvent(Event event) {
ReplicationAction action = ReplicationAction.fromEvent(event);
if (action != null) {
LOG.info("Replication action {} occured on {} ", action.getType().getName(), action.getPath());
if ("Activate".equalsIgnoreCase(action.getType().getName())) {
//Your logic here
}
}
}
public void run() {
LOG.info("Running...");
}
protected void activate(ComponentContext ctx) {
this.bundleContext = ctx.getBundleContext();
}
protected void deactivate(ComponentContext ctx) {
this.bundleContext = null;
}
}
Let me know if this doesn't help you .
Thanks
Veena