My main panel my FrameViewGwtImpl.java is a LayoutPanel. If I remove the
scrollpanel from FrameViewGwtImpl.java and set the LayoutPanel height to
e.g. 1000px, the scrollbars should appear (because this is more than the
client-height) like working_mobile_scroll.html.
Additional info: in my
Thank you Wayne for the FrameScrollerScreen.ui.xml.
The bad news is, the iframe underneath will not receive any events. In some
extremely limited cases this might be okay.
In my use case it is very important that the user can interact (clicking on
links) inside the iframe. On the other side,
Yeah, I'm sorry if I gave you false hope. I saw the content of the thread
and thought maybe I could help. I've done quite a bit with mgwt scrolling
and iframes separately, but putting them together is just problematic. I
don't know any hacks to get it to work. I think your only practical
.) working_mobile_scroll.html
displays a normal html with an iframe and I am able to scroll everywhere
on mobile browser (e.g. on Android Google Chrome)
If that works the way you want it, then its not a GWT Frame issue as the
GWT Frame is just a thin wrapper around the iframe element. The
Well, it's a mixed bag. After investigating more, I would probably
recommend just letting the frames scroll themselves like you demonstrated
earlier with your sample html file.
That said, I managed to come up with a hack for you that might work, but
probably won't for your case. I'm hoping it
Jens, thank you very much!
You helped me a lot! It works fine.
For others, who have the same problem, here is the working code (JSNI
method):
public native boolean optimizeFrameSize (String id)
/*-{
var newheight;
var newwidth;
var frame =
Admittedly, I didn't look too closely at your use case, but I believe I've
accomplished similar things using css with mgwt. You can check out my app at
app.carellaborate.com.
One thing that hung my up was in mgwt the scroll panel has to be a direct child
of touch panel, or something like that
Hi Wayne,
thank you! It would be very nice if you could help me with some CSS tweaks.
Your application has a good looking design and it is a good, innovative
idea :-)
But I did not see any frames there, so I hope you can help me with my
problem:
I want the same scrolling experience on my
You're right, there's no frames there, but you should be able to make them
behave like other content I think.
I saw you are using mgwt. Are you using the mgwt scroll panel? It can
probably work either way, but it would help to know.
Can you point me to a live url, or maybe capture the DOM
I want to set the frame-height to the height of the content in my frame. So
I can display it in mgwt with normal scrolling behavior.
The following code is not working:
in my ViewImpl.java:
constructor:
frame = new Frame(some-url/xyz.html);
frame.getElement().setId(framename);
And here is the exception-text I get:
uncaught: Exception caught: Exception caught: Exception caught: Exception
caught: (TypeError)
@xyz.client.views.experimental.FrameViewGwtImpl::setFrameSize(Ljava/lang/String;)([string:
'framename']): Cannot read property 'contentWindow' of null
Am
You must first add the Frame to the document
otherwise doc.getElementById() can not find it. You also have to wait until
the frame content is fully loaded before reading any size related values.
Finally your setFrameSize() seems not optimal. You call 4x getElementById()
instead of just 1x
Thank you! If I understand all correct:
1)
in my ViewImpl-Class in the Consructor I have to create the frame and load
the content.
The content (html-url) is from my war-directory:
frame = new Frame(GWT.getHostPageBaseURL() + ClientData/myhtml.html);
frame.getElement().setId(framename);
= $doc is
1)
in my ViewImpl-Class in the Consructor I have to create the frame and load
the content.
The content (html-url) is from my war-directory:
frame = new Frame(GWT.getHostPageBaseURL() + ClientData/myhtml.html);
frame.getElement().setId(framename);
= $doc is right here because it is in my
14 matches
Mail list logo