href as action does not carry over parameters
See original GitHub issueI would like to hand over a parameter (id) from one view to the next when clicking on a button like this: Both version however don’t work:
{
"type": "button",
"style": {
"height": "20"
},
"url": "file://image.png",
"action": {
"type": "$href",
"options": {
"url": "file://some-local-json.json"
},
"id": "1234567"
}
{
"type": "button",
"style": {
"height": "20"
},
"url": "file://image.png",
"action": {
"type": "$href",
"options": {
"url": "file://some-local-json.json"
"id": "1234567"
}
}
The version that does work is this one, which is however not usable in my setup, since I would also like to implement the $ok
two-way communication:
{
"type": "label",
"text": "Open view",
"href": {
"url": "file://some-local-json.json",
"options": {
"id": "1234567"
}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
adding a parameter to href link - html - Stack Overflow
SchoolId is a parameter that I need to add, I have tried .ToString() and it does not work, any help? The parameter is...
Read more >Window.location.href pass a wrong parameter to the controller
I know this is something simple, but I've never run across this before. I have the route. routes.MapRoute(" ...
Read more >Action link not passing route parameters to controller. - MSDN
I am trying to get the values from a form from an action link but there always null for example I have two...
Read more >Standard URL Syntax - Thymeleaf
<a th:href="@{http://www.thymeleaf/documentation.html}">. They are not modified at all (unless you have an URL Rewriting filter configured at your server ...
Read more >Integrate with other apps—ArcGIS Survey123 | Documentation
Before using a link that contains parameters to launch a survey in the field app, it is recommended that the app already be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@clsource I’m not sure what the blog post you mentioned has to do with this? I also don’t really understand the point about sandboxing where views all share a common global dictionary, that’s not really how sandboxing works. But regardless you originally closed this issue suggestion people not use the options and instead put their parameters into the $global dictionary, and I responded that that’s not a very good user experience. Now you’re suggesting that we use the parameter passing mechanism that mexophantes wanted all along. Letting two views manipulate a global variable is a very bad suggestion, it’s just bad software engineering. The right way is to follow the traditional stack method, which is what $href does, pass by value (not reference), then return by value (with $ok). The problem is that mexophantes says this does not work with href actions, but does with $href. I haven’t tried this to know since I’m passing values around using only $href, but at least now I think we’re all in agreement that we shouldn’t be communicating between views using $global variables.
Please read this
https://medium.com/@gliechtenstein/native-mobile-view-as-microservice-fd24ea62defa
Here is an example of using
$href
with params