Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » WebClient.PAGE_OVERFLOW with full screen Shell(How does WebClient.PAGE_OVERFLOW work?)
WebClient.PAGE_OVERFLOW with full screen Shell [message #1773345] Tue, 26 September 2017 15:07 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
Could someone please clarify how WebClient.PAGE_OVERFLOW is supposed to work in RAP?

Let's say I have a Shell that is full screen, when will the browser decide to enable vertical scrolling? I have WebClient.PAGE_OVERFLOW set to scrollY, which sometimes makes the browser's native vscroll appear, but it doesn't have any effect - I can scroll it up and down, but it doesn't affect my RAP application.

I suspect the problem lies in how I have defined my Shell and its' content, so I'm looking for some guidance on how it is supposed to be used.

My Shell is full screen, and contains various Composites and ScrolledComposites.

Do I effectively just size my controls to drop past the bottom edge of the Shell?

I can see that the RAP Demo uses this feature, and it works how I'd expect, so I know it is me using it wrong!

Any help appreciated!
John


---
Just because you can doesn't mean you should
Re: WebClient.PAGE_OVERFLOW with full screen Shell [message #1773926 is a reply to message #1773345] Fri, 06 October 2017 15:37 Go to previous messageGo to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
For anyone interested, I finally figured out what was missing in my code - I needed to set the CSS Style for overflow on the top-level Shell itself, as well as making the Shell fullscreen(true) earlier in the processing. Also added SWT.TITLE|SWT.CLOSE|SWT.RESIZE styles for the Shell, although I'm not sure if these were important - the fact that it is fullscreen seem to ignore the title/close parts anyway, which gives the results I needed.

To set overflow on the shell, I did this in code:

		String $el = "$el";
		exec( "rap.getObject( '", getId(shell), "' ).", $el, ".css( 'overflow', null );" );


and the exec method, which I think is published elsewhere, like this:

	  private static void exec( String... strings ) {
		    StringBuilder builder = new StringBuilder();
		    for( String str : strings ) {
		      builder.append( str );
		    }
		    JavaScriptExecutor executor = RWT.getClient().getService( JavaScriptExecutor.class );
		    executor.execute( builder.toString() );
		  }



---
Just because you can doesn't mean you should
Re: WebClient.PAGE_OVERFLOW with full screen Shell [message #1774983 is a reply to message #1773926] Mon, 23 October 2017 07:39 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi John,
here is a pointer how it's implemented in RAP demo [1].

[1] https://github.com/eclipse/rap/blob/master/examples/org.eclipse.rap.examples/src/org/eclipse/rap/examples/internal/MainUi.java#L73

HTH,
Ivan
Re: WebClient.PAGE_OVERFLOW with full screen Shell [message #1775192 is a reply to message #1774983] Thu, 26 October 2017 06:27 Go to previous message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 192
Registered: February 2013
Senior Member
Is online-demo for PAGE_OVERFLOW available?
Previous Topic:RAP - TreeViewer custom variant
Next Topic:Record Navigation Causes Whole Page Reloading
Goto Forum:
  


Current Time: Fri Apr 26 02:19:58 GMT 2024

Powered by FUDForum. Page generated in 0.02707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top