Another one:
According to the docs, for using dynamic pages with parameters
page-params-by-href.groovy shows how to pass parameters to dynamic pages using the href element.
So here’s the bug. When passing a parameter to a page, example:
def hrefParams = [
user: i as String
]
href(name: "unlockActions", params: hrefParams, title: "Click here to define actions", page: "unlockActionsPage", description: "", required: false)
Now on the unlockActions page (dynamic):
def unlockActionsPage(params) {
def user = params.user ?: ""
log.debug "user:$user"
dynamicPage(name:"unlockActionsPage", title: "unlock actions" + (user ? " for user $user" : ""), uninstall: false, install: false) {
section {
input "individualDoorActions${user}", "bool", title: "unlock actions for each door", required: true, submitOnChange: true
}
}
}
When doing a submitOnChange: true and the page refreshes the param passed to the page is lost and the user shows up as null. That should not be the case, it should retain any parameters passed to it.