dynamicPage(s) and href question

I’m trying to create a dynamic page whos contents consist of href links of 1…n dynamic pages that are based on one page template.
Amazingly, that part works, I’m able to create multiple pages for data input, and generate the href links afterwords, as well as having a preferences map consisting of the data created by these pages, all of which are generated by one dynamic page template.

However, in order to re-populate the preferences from the page template when the href link is activated, i need to pass in some keys from the href link.
How do you do this?

Or is there another way to generate multiple dynamic pages based on a single page template, without defining a fixed number of these before hand…
Or another way, how do you pass parameters to a single dynamic page constructor such that you can re-populate the preference data at a later time?

1 Like

How to pass parameters in href?

Jez, Yea exactly what I need. I should have figured someone ran into this before I did, never even tried searching for it, thanks.

Let me know if it works for you. I’m not having any luck.

@Mike_Maxwell do you have a code snippet you can share of it working?

We need some examples of using href in the preferences, and more documentation around it. It keeps coming up.

Yea, nope…

                    name	: "${prefGroup.key}"
                    ,title	: "${prefGroup.value}" 
                    ,required	: false
                    ,page	: "group?yada=${prefGroup.key}"

def group() {
	log.debug "yada:${yada}"

Just spin cycle like you, crap…


def group(variables) {
    def yada = variables.yada
    log.debug "yada:${yada}"

It works great against statically named dynamic pages where page: = the dynamic page method.
I think all of us are looking to have a template dynamic page, then pass in additional parameters so the previously generated preferences can load back in for editing…

@Jim, have there been any recent changes to how the page names in the href are being parsed? In the thread linked above, it seems like they managed to figure out how to pass parameters by using page: name?var=value[&var2=value[...]] and a corresponding def name(variables) in which variables is a map of the passed variables ([var:value, var2:value]).

But that was a month ago.

The page method never gets called…

So, same results all around. I wonder if there’s some assumed information missing from the other thread, or a code change that makes it irrelevant.

Dunno, I hope it’s missing (presumptive tribal knowledge), vs removal from the method.
Probably someone figured, why would anyone want to pass parameters to a dynamic page using HTML syntax…

My thoughts ran in the additive direction, like maybe they added a parameters map to make it cleaner. No, don’t ask what the name of that property is; you have to guess.

Speaking of which, anything not coming from an ST rep is just that, a guess.

@llamas I have a question out to our engineering team to see if something changed.

Thanks. And/or if they can just provide the how-to information.

If you manage to get this fixed, I’ll write a dynamic page example using it for you! :smile:

1 Like

@llamas, check this out…

1 Like

Still unresolved, my genius hack only works in the IDE not in the App, @Jim we still need some help on this one…

We are looking into it - hope to have some more firm guidance on this by the end of today if all goes well.