Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    HTMLPane hide/show

    Hi,

    I have an HTMLPane as a member for a VLayout, which in turn is a member itself of a Canvas' children collection.

    I've initially configured the HTMLPane as follows:

    Code:
    	var htmlPane = HTMLPane.create
    		({
    			ID : 'myHtmlPane',
    			width : 200,
    			height : 200,
    			autoDraw : true,
    			showCustomScrollbars : false,
    			httpMethod : 'GET',
    			contentsType : 'page',
    			contentsURL : 'http://my-app-url/'
    		});
    Whenever I call hide() and then show() on the container Canvas, the HTMLPane reloads itself from the initial contentsURL ...

    The problem I have with this, is that the HTMLPane is also being manipulated directly to perform HTTP POST
    queries and re-issuing the initial HTTP GET, resets the current state in which that IFRAME was, before hide() was called.

    Is there a way to not have the HTMLPane re-load itself from the server upon show() being called ?

    Could I overload hide() and show() and cheat hide() so that it sizes/moves the HTMLPane out
    of the browser viewport without actually hiding it?

    Thanks for you help!

    #2
    By the way, the autoDraw property is now set to false, but that doesn't
    seem to fix my problem ...

    All I want is hide() and show() to just hide and show U/I-wise, without
    actually re-loading the page from the server.

    Anyone have any idea on this ?

    Thanks,

    Comment


      #3
      I figured it out ... If this may help anyone else experiencing the same/similar behavior, here's what my particular problem was ...

      I was issuing a Canvas.remove(htmlPaneLayout) on the parent canvas which contained the HTMLPane component. This had the
      undesired effect of having the htmlPane fetched from the server when show() was called subsequently on the HTMLPane.

      I removed that line of code and simply do a hide() + show() and it's all good now.

      Regards,

      Comment

      Working...
      X