Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2109

Joomla! 5.x Coding • "Current" state

$
0
0
I have an AdminForm showing a list of items. The items may be filtered from elements in a filter bar.

I have a toolbar (popup) button which I want to take that list, including any filters set, and show the data in a modal dialog.

I can do all of that except re-create/use the filters, I just get the full list. The popup button calls a method in the controller that

How can I regenerate the model state. It's clearly there somewhere since re-displaying the page (from the menu) re-applies the correct filters.

I looked at "getState()", but the new call finds __state_set has the value true, which prevents the previous state from being recalled, but it's a protected variable...

Ok, that gives me a clue as how to do this. I've made a method in the model called "cheat" which I call to then reset the protected variable and call getState. That works, but surely isn't a good way to do it. What's the right way?

Statistics: Posted by MarkRS — Tue Apr 23, 2024 4:49 pm



Viewing all articles
Browse latest Browse all 2109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>