Documentation discusses only how to access data within Model class, I need to pass url into Model class.
I can't send request from page by ajax, because service domain not exposed to extranet.
Your model class extends from RenderingModelImpl
. Or at least it should :).
Because of that there's a constructor that get passed current component node in and it's exposed to you via getNode()
method.
So assuming that when you click on Save changes
in your dialog, the value gets persisted under unsubscribeUrl
property, to access this value from execute()
method:
public String execute() {
// read unsubscribe url
String unsubscribeUrl = this.getNode().getProperty("unsubscribeUrl").getString();
}