1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    2
    Vote Rating
    0
    dorj is on a distinguished road

      0  

    Default extjs panel silverlight unloads

    extjs panel silverlight unloads


    Hi,
    I have a silverlight control loaded in a tabpanel of extjs. On changing the state of silverlight grid for e.g clicking a radio button and then going to some other tabpanel, the silverlight control unloads, it hits application_exit while debugging. If i dont change the state and click away to other panel, silverlight control does not unload.

    Would appreciate if any one knows about this and has a fix.

    Thanks,

    This is how i call Silverlight control.


    function CreateSilverlightObject(params) {

    paramValues = params;
    var div = document.createElement("div");
    div.setAttribute(
    "id", "silver_div");
    document.body.appendChild(div);
    Silverlight.createObjectEx({
    source:
    "ClientBin/Dashboard.xap",
    parentElement: div,
    id:
    "SilverlightControl_1",
    properties: {
    width:
    "100%",
    height:
    "100%",
    version:
    "1.1",
    enableHtmlAccess:
    "true",
    isWindowless:
    'True',
    background:
    'transparent'
    },
    events: {
    onLoad: onSLLoad,
    onError: onSilverlightError
    }
    //, initParams: "params=" + params
    });
    return div.getAttribute("id");
    }

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,489
    Vote Rating
    283
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Never used Silverlight but have seen similar things with Flash and Applets. Have you tried changing the hideMode on the panel that is being used as a tab? When you change between tabs it hides the previous tab and for some embedded objects this causes them to exit and reload in some browsers. Changing the hideMode to offsets can sometimes help but you need to be careful to ensure you put it on the right component (annoyingly it isn't something you can just write into your Flash/Applet/Silverlight wrapper component, you're at the mercy of a correctly configured container further up the chain).

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    278
    Vote Rating
    0
    amanind is on a distinguished road

      0  

    Default


    Hi Skirtle,

    I dont think "offset" is any value for hidemode, either it is true or false

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,489
    Vote Rating
    283
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    From the docs:

    hideMode : String
    How this component should be hidden. Supported values are 'visibility' (css visibility), 'offsets' (negative offset position) and 'display' (css display).

    Note: the default of 'display' is generally preferred since items are automatically laid out when they are first shown (no sizing is done while hidden).
    The only correction I would make to my earlier post is that you might also like to try a hideMode of visibility. In some experiments I was doing with Flash yesterday I found that offsets fixed problems for Chrome but not Firefox, whereas visibility seemed to work for both. In that case I was working with a collapsible panel and I also needed to set animCollapse: false but that shouldn't be relevant for tabs.

Thread Participants: 2

Tags for this Thread