![alt text][1]I have an Urlloader, and I'm unable to pass $foo$ value to the default value of a text field (I don't want a pulldown, because the user must be able to enter a value if nothing is coming from the url)
Assuming that you have a URL with something like ?username=fred
in it, and you want to prepopulate the TextField for usernames to the value of "fred", there are only a few ingredients for success here:
1) The "name" param on the TextField has to exactly match the querystring argument in the URL.
2) The TextField module has to be downstream from the URLLoader (read the framework intro page if you don't know what this means)
As far as the page doing the redirect, 95% of the time you'll be using a Redirector module, and if Redirector is passing along the selected value from a Pulldown/TextField/Checkbox/Radio/Tabs/Table/Chart, make sure it's passing $foo.rawValue$ and not just $foo$. The rawValue version of the key won't be backslash escaped and that's the version you want up in the URL.
UPDATE: The problem is simply that your name param on your TextField, and the value you have in the URL does not match. Much like Splunk field names in search results, $foo$ tokens in the Splunk UI are always case-sensitive. What you have here has FahrtBezeichner
as the name param of your TextField, and based on the debugging you're doing, you have fahrtBezeichner
in the URL. Note the lower-case f vs upper-case F is all that it takes for these names to not match at all. Change one or the other so that they match and it will all work the way you expect.
Additionally, remove this line from your TextField module:
<param name="default">$fahrtbezeichner$</param>
I assume you added this at a later phase thinking it might help. However you'll have to remove it, and with that line completely gone, it'll have the behavior you want automatically anyway.
Assuming that you have a URL with something like ?username=fred
in it, and you want to prepopulate the TextField for usernames to the value of "fred", there are only a few ingredients for success here:
1) The "name" param on the TextField has to exactly match the querystring argument in the URL.
2) The TextField module has to be downstream from the URLLoader (read the framework intro page if you don't know what this means)
As far as the page doing the redirect, 95% of the time you'll be using a Redirector module, and if Redirector is passing along the selected value from a Pulldown/TextField/Checkbox/Radio/Tabs/Table/Chart, make sure it's passing $foo.rawValue$ and not just $foo$. The rawValue version of the key won't be backslash escaped and that's the version you want up in the URL.
UPDATE: The problem is simply that your name param on your TextField, and the value you have in the URL does not match. Much like Splunk field names in search results, $foo$ tokens in the Splunk UI are always case-sensitive. What you have here has FahrtBezeichner
as the name param of your TextField, and based on the debugging you're doing, you have fahrtBezeichner
in the URL. Note the lower-case f vs upper-case F is all that it takes for these names to not match at all. Change one or the other so that they match and it will all work the way you expect.
Additionally, remove this line from your TextField module:
<param name="default">$fahrtbezeichner$</param>
I assume you added this at a later phase thinking it might help. However you'll have to remove it, and with that line completely gone, it'll have the behavior you want automatically anyway.
I've understood, it was not clear to me, that the input is taking automatically the value from the URL Variable if it has the same name.
Yes. you have to
1) resolve the casing issue
2) delete the <param name="default">$fahrtbezeichner$</param>
, because it is unnecessary and it will get in the way.
3) I'm afraid you cannot create group attributes dynamically with $foo$ tokens.
Even by changing this, it doesn't work .
I've also similar pb on a groupName from a table, and when I make a copy/paste from the variableName in a html module, it works...(and I see them in Debugmode)
Is it possible that default value, and groupname can't be set with a $foo$, or maybe for groupName, that it can't be set after the page is loaded ? (my groupName is set from a postProcess)
I've posted that code in the description...
thanks for posting XML. Indeed the problem was simply that your name param did not match the variable you were passing in the URL. Note that $foo$ tokens are always case-sensitive and you had a capital "F" in one, and a lowercase "f" in the other.
Here are the information, thx.
I only mention the Redirector module because that's where the URL's generally come from. 😃 But if you're just making links manually in HTML modules or embedding them into the app navigation, then yea you won't need to think about Redirector.
Can you send me the XML for the whole view? Incidentally what is the name param value?
$foo$ is working on the html module... but not on textfield
I'm not sure to understand why the redirected is needed and how it works ?