Navigate from an ExplicitPanel back to an Administrative Panel

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.

Parents Reply Children
  • 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.

  • 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:

    TE-18096: IAdministrationExplicitPanelController.GetUrl does not include explicit identifier

    Completed for 13.0, 12.1.5, 14.0

  •   I"m trying to use that messaging API to send a message across which should refresh the pane., but doesn't seem to be firing...

    Here is what I have. and these are both loaded up on explicit panels that are loaded right after each other.

    #registerEndOfPageHtml (  )
        ## end of page HTML
        <script type="text/javascript">
            jQuery(document).ready(function(){
                
    			jQuery.telligent.evolution.messaging.subscribe('refresh.reactions', function(data){
                    jQuery.telligent.evolution.administration.refresh(); 
    			 
    			});           

     jQuery.telligent.evolution.post({
                    url:"$core_v2_widget.GetExecutedFileUrl('save-edits.vm')", 
                    data:
                    {
                        "id":$reaction.Id,
                        "reactiontypeid":"$reactionTypeId", 
                        "triggertypeid":"$triggerTypeId", 
                        "configuration":configuration, 
                        "rules":rules, 
                        "contentid":"$course.ContentId" 
                    },    
                    success:function(response){
                        var data = {};
                        jQuery.telligent.evolution.messaging.publish("refresh.reactions", data, { crossWindow: true }); 
                        jQuery.telligent.evolution.administration.close();
                    }
                }); 

  • When subscribing to the message (if it is originating from a different panel potentially), in the options of the subscription (3rd parameter), specify:

    { excludeAutoNameSpaces: true }

    By default, subscriptions are scoped to individual panels. This will identify that the subscription is not limited to the current panel. Notice that when you exclude auto name spacing, it is important to unregister the subscription when the panel unloads:

    var subscription = $.telligent.evolution.messaging.subscribe('message_name', function(data) {
    	// do stuff
    }, { excludeAutoNameSpaces: true });
    			
    $.telligent.evolution.administration.on('panel.unloaded', function(){
    	$.telligent.evolution.messaging.unsubscribe(subscription);
    });