Home » Eclipse Projects » Remote Application Platform (RAP) » Finding iFrame that corrensponds to TreeItem or TableRow (Finding iFrame that corrensponds to TreeItem or TableRow )
Finding iFrame that corrensponds to TreeItem or TableRow [message #821036] |
Wed, 14 March 2012 21:39 |
V B Messages: 8 Registered: March 2012 |
Junior Member |
|
|
Hi RAP experts,
I am really stuck with this. The whole project is in danger now because of this issue. I need help asap.
Please note that I have no knowledge of RAP and I need a quick hack/fix.
I am using RAP 1.3. Basically, our application behaves like this. When an TreeItem or TableRow is double-clicked, CTabItem opens that points to an iFrame, which loads a servlet. CTabItem loads a bunch of divs and an iFrame wrapped in a div element. We are not using any client widgets. The whole RAP application gets generated by server.
My question is: how can I find an iFrame in the client end (javascript space) that corresponds to the TreeItem and TableRow? I need solutions for both Table.js and TreeItem.js.
I was able to find double-click functions in TreeItem.js and Table.js that get triggered when TreeItem and TableRow get double clicked. So, in these double-click functions, I need to put some javascript code that finds the iFrame that is being loaded by TreeItem and TableRow. How do I do that?
[Updated on: Wed, 14 March 2012 21:41] Report message to a moderator
|
|
|
Re: Finding iFrame that corrensponds to TreeItem or TableRow [message #821402 is a reply to message #821036] |
Thu, 15 March 2012 10:04 |
Tim Buschtoens Messages: 396 Registered: July 2009 |
Senior Member |
|
|
Hi.
I'm not sure i understand your scenario. Let me recap:
* You have Tree and/or Table in your application.
* When an item in there is double-clicked, you programatically (in Java)
select an CTabItem.
* That CTabItem makes a control visible that contains a BrowserWidget
(i.e. Iframe).
* In that BrowserWidget you set an URL that points to a servlet.
* You somehow want a javascript reference to that iFrame that you use in
a hacked version of TreeItem.js/TableRow.js, and there are multiple iFrames.
It that about right?
Greetings
Tim
Am 14.03.2012 22:39, schrieb V B:
> Hi RAP experts,
>
> I am really stuck with this. The whole project is in danger now :(
> because of this issue. I need help asap.
>
> Please note that I have no knowledge of RAP and I need a quick hack/fix.
>
> I am using RAP 1.3. Basically, our application behaves like this. When
> an TreeItem or TableRow is double-clicked, CTabItem opens that points to
> an iFrame, which loads a servlet. CTabItem loads a bunch of divs and an
> iFrame wrapped in a div element.
>
> My question is: how can I find an iFrame in the client end (javascript
> space) that corresponds to the TreeItem and TableRow? I need solutions
> for both Table.js and TreeItem.js.
>
> I was able to find double-click functions in TreeItem.js and Table.js
> that get triggered when TreeItem and TableRow get double clicked. So, in
> these double-click functions, I need to put some javascript code that
> finds the iFrame that is being loaded by TreeItem and TableRow. How do I
> do that?
>
--
Tim Buschtöns
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
| | |
Re: Finding iFrame that corrensponds to TreeItem or TableRow [message #821621 is a reply to message #821542] |
Thu, 15 March 2012 16:06 |
V B Messages: 8 Registered: March 2012 |
Junior Member |
|
|
We are using RAP 1.3. For some reason RAP or Internet Explorer is not doing garbage collection when the iFrame gets destroyed by RAP. So, overtime, our users can't use the application, and they must restart the browser.
I developed my own custom memory-clearing function that clears all contents in the iFrame. However, my custom memory-clearing function must be called before the iFrame gets destroyed by RAP.
In Browser.js, there is no destroy : function() you mentioned. I found destroyFunction:function(name), but this function never gets called when the iFrame gets destroyed.
However, I found the destroy function in qx.js. When I put my code in destroy function of qx.js, I can see that my code is getting called. However, I don't know how I can get to the iFrame because the destroy function in qx.js gets called on everything.
Is there a way for me to get to the contents of iFrame before it gets destroyed? Is this possible to do somewhere in qx.js or some other .js file?
If it is not, is it possible to get to the contents of the iFrame when TreeItem and TableRow is double-clicked? In our application, every TreeItem and TableRow corresponds to the document. The document loads in a CTabItem. In the CTabItem, there is a Browser.js, which loads the iFrame with the servlet.
Vlad
|
|
|
Re: Finding iFrame that corrensponds to TreeItem or TableRow [message #821625 is a reply to message #821542] |
Thu, 15 March 2012 16:06 |
V B Messages: 8 Registered: March 2012 |
Junior Member |
|
|
We are using RAP 1.3. For some reason RAP or Internet Explorer is not doing garbage collection when the iFrame gets destroyed by RAP. So, overtime, our users can't use the application, and they must restart the browser.
I developed my own custom memory-clearing function that clears all contents in the iFrame. However, my custom memory-clearing function must be called before the iFrame gets destroyed by RAP.
In Browser.js, there is no destroy : function() you mentioned. I found destroyFunction:function(name), but this function never gets called when the iFrame gets destroyed.
However, I found the destroy function in qx.js. When I put my code in destroy function of qx.js, I can see that my code is getting called. However, I don't know how I can get to the iFrame because the destroy function in qx.js gets called on everything.
Is there a way for me to get to the contents of iFrame before it gets destroyed? Is this possible to do somewhere in qx.js or some other .js file?
If it is not, is it possible to get to the contents of the iFrame when TreeItem and TableRow is double-clicked? In our application, every TreeItem and TableRow corresponds to the document. The document loads in a CTabItem. In the CTabItem, there is a Browser.js, which loads the iFrame with the servlet.
Vlad
|
|
|
Re: Finding iFrame that corrensponds to TreeItem or TableRow [message #821634 is a reply to message #821621] |
Thu, 15 March 2012 16:19 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Vlad,
the memory leak in IE related to iframe was a know problem. See:
327440: Memory leak problem with Iframe in Internet Explorer
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327440
I don't know if the fix could be easily back ported to 1.3.
Best,
Ivan
On 3/15/2012 6:06 PM, V B wrote:
> We are using RAP 1.3. For some reason RAP or Internet Explorer is not
> doing garbage collection when the iFrame gets destroyed by RAP. So,
> overtime, our users can't use the application, and they must restart
> the browser.
>
> I developed my own custom memory-clearing function that clears all
> contents in the iFrame. However, my custom memory-clearing function
> must be called before the iFrame gets destroyed by RAP.
>
> In Browser.js, there is no destroy : function() you mentioned. I
> found destroyFunction:function(name), but this function never gets
> called when the iFrame gets destroyed.
>
> However, I found the destroy function in qx.js. When I put my code in
> destroy function of qx.js, I can see that my code is getting called.
> However, I don't know how I can get to the iFrame because the destroy
> function in qx.js gets called on everything.
>
> Is there a way for me to get to the contents of iFrame before it gets
> destroyed? Is this possible to do somewhere in qx.js or some other .js
> file?
>
> If it is not, is it possible to get to the contents of the iFrame when
> TreeItem and TableRow is double-clicked? In our application, every
> TreeItem and TableRow corresponds to the document. The document loads
> in a CTabItem. In the CTabItem, there is a Browser.js, which loads
> the iFrame with the servlet.
>
> Vlad
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: Finding iFrame that corrensponds to TreeItem or TableRow [message #821692 is a reply to message #821634] |
Thu, 15 March 2012 17:42 |
V B Messages: 8 Registered: March 2012 |
Junior Member |
|
|
Hi Ivan,
I tried RAP 1.4. The memory does get cleared when the iFrame is destroyed. However, my tests show that your fix only works in IE8. It does not work in IE6. We have a lot of clients that are still using IE6, and we can't upgrade them to IE8 yet.
My custom memory-clearing function works for all IEs. I just need a way to call it bbefore iFrame gets destroyed by RAP.
Could you please let me know how that can be done?
I tried:
-Calling my memory clearing code in the destruct method of Browser.js.
It did not work, since the iFrame was already destroyed by RAP by the time I called my function.
- I was told by RAP forum to put my memory clearing code in destroy method of Browser.js. Such method is not located in Browser.js.
- I put my code in the destroy function of qx.js. My code was called, but I was not able to get the iFrame since destroy gets called for everything.
If such thing is not possible, is it possible to get to the contents of the iFrame when TreeItem and TableRow is double-clicked? In our application, every
TreeItem and TableRow corresponds to the document. The document loads
in a CTabItem. In the CTabItem, there is a Browser.js, which loads
the iFrame. The iFrame's is populated by the servlet.
Any help is grately appreciated.
Vlad
|
|
|
Re: Finding iFrame that corrensponds to TreeItem or TableRow [message #821695 is a reply to message #821634] |
Thu, 15 March 2012 17:42 |
V B Messages: 8 Registered: March 2012 |
Junior Member |
|
|
Hi Ivan,
I tried RAP 1.4. The memory does get cleared when the iFrame is destroyed. However, my tests show that your fix only works in IE8. It does not work in IE6. We have a lot of clients that are still using IE6, and we can't upgrade them to IE8 yet.
My custom memory-clearing function works for all IEs. I just need a way to call it bbefore iFrame gets destroyed by RAP.
Could you please let me know how that can be done?
I tried:
-Calling my memory clearing code in the destruct method of Browser.js.
It did not work, since the iFrame was already destroyed by RAP by the time I called my function.
- I was told by RAP forum to put my memory clearing code in destroy method of Browser.js. Such method is not located in Browser.js.
- I put my code in the destroy function of qx.js. My code was called, but I was not able to get the iFrame since destroy gets called for everything.
If such thing is not possible, is it possible to get to the contents of the iFrame when TreeItem and TableRow is double-clicked? In our application, every
TreeItem and TableRow corresponds to the document. The document loads
in a CTabItem. In the CTabItem, there is a Browser.js, which loads
the iFrame. The iFrame's is populated by the servlet.
Any help is grately appreciated.
Vlad
|
|
|
Goto Forum:
Current Time: Wed Sep 25 11:17:09 GMT 2024
Powered by FUDForum. Page generated in 0.06427 seconds
|