#4853 closed defect (fixed)
[patch][cla]dojox.layout.FloatingPane with remote content is not resizable
Reported by: | guest | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | DojoX Layout | Version: | 1.0 |
Keywords: | dojox.layout.FloatingPane remote href resizable widget | Cc: | |
Blocked By: | Blocking: |
Description
a dojox.layout.FloatingPane? with remote content (i.e. with an attribute href) will not be resizable.
In order to reproduce it : take the test page dojox/layout/tests/test_FloatingPane.html and add an attribute resizeable="true" to the remote pane : <div dojoType="dojox.layout.FloatingPane?" resizeable="true"
title="remote pane" href="../../../dijit/tests/layout/doc0.html" style="width:250px; height:250px; background:#fff;"
</div>
the floating pane is not resizable.
I think it is only because you add resize handle : <div id="dojox_layout_ResizeHandle_0" class="dojoxResizeHandle dojoxResizeNW" dojoattachpoint="resizeHandle" widgetid="dojox_layout_ResizeHandle_0">
before getting the content from the server, so it is erased ?
Attachments (1)
Change History (11)
comment:1 Changed 13 years ago by
Owner: | changed from Tom Trenka to dante |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by
Milestone: | 1.1 → 1.2 |
---|
comment:3 Changed 13 years ago by
comment:4 Changed 13 years ago by
For legal purposes, the patch above (FloatingPane_ResizeHandle.patch) was submitted by myself, Angel Municio and I have already signed an CLA.
comment:5 Changed 13 years ago by
Summary: | dojox.layout.FloatingPane with remote content is not resizable → [patch][cla]dojox.layout.FloatingPane with remote content is not resizable |
---|
comment:6 Changed 13 years ago by
Milestone: | 1.2 → 1.1 |
---|
comment:7 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:8 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
dante
Sorry to be a pain, but you forgot to commit the file doc0.html. You need to either commit it or revert the line 132 in test_FloatingPane.html from:
title="Remote Pane" href="doc0.html" resizable="true"
to
title="remote pane" href="../../../dijit/tests/layout/doc0.html" resizable="true"
As it is, test_FloatingPane.html is giving an error in the remote pane.
Thanks.
comment:9 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
re-fixed in [12398] ... ref'd wrong ticket in commit.
comment:10 Changed 11 years ago by
Component: | Dojox → DojoX Layout |
---|
The root of the problem is that when ContainerPane? wants to set its contents internally, _setContent(cont) calls first the method destroyDescendants (which is inherited from _Widget). As advertised, destroyDescendants destroys all descendents including the ResizeHandler?.
There is no easy way to fix this one. The cleaner solution would be to implement a ReseizableContaintPane?, that extends ContaintPane? and overrides all the life-cycle and public functions that end up calling _setContent(cont) so they call an alternative method. Another solution would be to override _setContent(cont), but it is never a good idea to override private functions since ContentPane? could change its implementation. Another problem with having a ReseizableContaintPane?, is that not all FloatingPanes? are going to be resizables. So it would not be clean to have all FloatingPanes? extend ReseizableContaintPane?.
The patch that I submit is a little bit of a hack, but I think it is a good compromise solution and it's much better that FloatingPane? not working at all with setHref. What I did is adding a member to FloatingPane?:
and override
so it doesn't destroy the RresizeHandle? unless this._destroyResizeHandle is true.
When the FloatingPane? is resizable, I set this._destroyRresizeHandle to false, and reset it to true in the destroy() and destroyRecursive() methods so it gets destroyed when the FloatingPane? is destroyed.
I also changed test_FloatingPane.html to have a FloatingPane? that tests this fix and created a file doc0.html that will be used as a parameter to setHref. doc0.html has a button to calls setHref on itself to prove that the FloatingPane? doesn't loose the ResizeHandle?.
My email for any questions issues: angel dot municio at nexaweb dot com