I have an explicit panel loaded from an administrative panel. Wondering how, if I do some sort of AJAX save on my explicit panel I can go back to the previous panel and reload it.
I have an explicit panel loaded from an administrative panel. Wondering how, if I do some sort of AJAX save on my explicit panel I can go back to the previous panel and reload it.
To return to the previous panel, you can call
$.telligent.evolution.administration.close();
This will return to the previous panel in the history.
Before closing, the explicit panel can publish a message through the messaging JavaScript API Module which can be read and handled by the calling panel to reload its data.
is the reloading of panel data just done custom through the person implementing it or is there a specific javascript call that can reload the panel data?
For instance, I want to pass in a different ID to my explicit panel by clicking a link on the same panel... the hash changes, but the page doesn't reload.
Are you attempting to load an explicit panel from an explicit panel?
Generally, reloading is handled by the panel. $.telligent.evolution.administration.refresh() is available, but will reinitialize at the base of the current panel (so any sub-panels defined by the same panel implementation will be removed from the navigation stack).
Thanks Ben, that helped. The refresh methods works great, however the close() method does not seem to be working. It stays on the same panel but the notification I publish does work.
$.telligent.evolution.notifications.show("Save Successful!", {}); // works
$.telligent.evolution.administration.close(); // does not return to previous panel
If you are editing and reloading the admin UI to test the explicit panel, the history will be lost and close() will not have anywhere to return to. The stack of navigation between panels only persists within context of the page.
The role explicit panel, for example, uses ...close() to return to the role list, for example, but if you edit a role, reload the browser tab, and save, it will not return to the role list.
If you are editing and reloading the admin UI to test the explicit panel, the history will be lost and close() will not have anywhere to return to. The stack of navigation between panels only persists within context of the page.
The role explicit panel, for example, uses ...close() to return to the role list, for example, but if you edit a role, reload the browser tab, and save, it will not return to the role list.
So is there an administrative javascript call to navigate to a new panel? Right now I'm using a text link I get from something like this:
public string LearningLevelEdit(int levelId) { NameValueCollection nvc = new NameValueCollection(); nvc.Add("LearningLevelId", levelId.ToString()); return PluginManager.Get<Panels.Management.LearningLevelCreateEdit>().FirstOrDefault().GetNavigateUrl(nvc); }
If that is using IAdministrationExplicitPanelController.GetUrl(), that should be correct and it can be loaded directly (doesn't require using $.telligent.evolution.administration.open).
I do see that the URL generated using IAdministrationExplicitPanelController does not include a hash parameter _appaneltype=explicit
which may affect the navigation behavior. As a work-around, you could manually add this parameter to the hash parameter list generated from the existing GetUrl() method.
I've logged this issue as:
That worked. Thank You!!