Page 1 of 1

5.1 MVC: Link to widget not opening window

Posted: September 19th, 2022, 10:04 am
by shalomsims
So I have a hyperlink control on my webpage with an event to open another widget in a window.

My assignment is to copy from 5.1 classic over to 5.1 MVC and I just copied the exact controls over.

Originally we were using a hyperlink control on a list view. I thought that might be the issue when clicking on the link would not open the widget window. However, when I make any event controller that opens the DuplicateListWidget while passing in parameters from the list the window doesn't open. If I don't pass any parameters the widget window opens just fine.

There is also no change in the parameters in the url when the link is selected.

I believe that using a button to open widget is probably the preferred option, however, I think I am either doing something wrong with my parameters or there is another issue here. Neither the button or the hyperlink control open the widget when I pass parameters. There are no errors. It just does nothing at all when clicked. I tested this also outside of the list view and got the same result. I also created a second Widget and got the same results again while trying to pass those parameters.
I created a test button with the same call to the DuplicateListWidget. I get the same result.
I created a test button with the same call to the DuplicateListWidget. I get the same result.
Two parameters being passed to the widget. Window opens as long as I don't pass anything.
Two parameters being passed to the widget. Window opens as long as I don't pass anything.

Re: 5.1 MVC: Link to widget not opening window

Posted: September 21st, 2022, 2:29 pm
by shalomsims
Found a fix for it thanks to Molly. She had a similar issue needing to pass ViewParameters dynamically.

In my case, I wrongfully assumed that since the link in the list was already in the row that the value was already dynamically referring to each corresponding row.

However, when I changed the event parameter to come from the model on the same value that was needed to be passed to the controller, it made the parameter pass dynamically and the page loads with the correct data.

Not sure if this is a bug or not. If I was a customer and I wanted to pass inputs to the widget I would assume that if I linked the parameter values through the field input that would pass the values correctly from the list view.

Image
Instead of using the field input I needed to use dynamic input from the model.
Instead of using the field input I needed to use dynamic input from the model.