Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Scout Lazy Loading & Custom Themes
Scout Lazy Loading & Custom Themes [message #1828516] Thu, 11 June 2020 08:50 Go to next message
Luis Nothvogel is currently offline Luis NothvogelFriend
Messages: 56
Registered: October 2019
Member
Hello all,

I have got 2 Questions:

1) How do I implement lazy loading for any table?

2) How do I make my own themes? Or how do I add custom css to the light theme and the dark theme? So that when I select the dark theme that only the custom dark theme css file is used and not the one from the light one.

I am using Scout V.9

Thank you all for answering!
Re: Scout Lazy Loading & Custom Themes [message #1828560 is a reply to message #1828516] Fri, 12 June 2020 07:04 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Hi Luis

1.) Tell me more about how exactly "lazy loading" should work in your application. At which point in time do you need to load the data?

2.) Styling with CSS is documented here. Theming in Scout works with the file-names of the .less files in your Scout project. The default theme loads "colors.less". When the "dark" theme is active, Scout first looks for "colors-dark.less" and loads this file instead of "colors.less". When no colors-dark.less is found, it loads the default colors.less. Typically in your theme-specific .less file you first import the default file and then override the properties you must change for that theme. Example for a colors-dark.less:

/* -------------------------------- */
/* Scout dark theme                 */
/* extends: Scout default theme     */
/* -------------------------------- */
@import "scout/style/colors.less";

/* -------------------------------- */
/* Color palette                    */
/* -------------------------------- */

/* These are new gray colors used only in dark theme */
@palette-gray-1: #e4e4e6;
@palette-gray-2: #999999;
...


I'd recommend to take a look at the .less files here, to understand how we do theming in the Scout core (for instance /style/colors-dark.less or other files ending with "dark.less"


Eclipse Scout Homepage | Documentation | GitHub
Re: Scout Lazy Loading & Custom Themes [message #1828613 is a reply to message #1828560] Mon, 15 June 2020 08:18 Go to previous messageGo to next message
Luis Nothvogel is currently offline Luis NothvogelFriend
Messages: 56
Registered: October 2019
Member
Hey Andre,

Thank you for your anwer. I will try and do that.

But i dont quiet understand your question regarding the lazy loading. Basically after my login page i have a page with a table, which often has more rows than it can show. There i would prefer the lazy loading so that only the rows that can be shown are loaded and as soon as i scroll down in the table, it loads more. I hope to reduce the loading time of this page, cause somethimes it is quiet slow.

Thanks again :)
Re: Scout Lazy Loading & Custom Themes [message #1828911 is a reply to message #1828613] Mon, 22 June 2020 07:06 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Hi Luis

Alright, the subject "load data on scrolling" (sometimes also called "infinite scrolling") has been discussed before, Claudio's reply here is still valid today.

In order to keep the start-up of your Scout application fast without "infinite scrolling", you could simply limit the rows initially loaded from service/database (say 100 rows) and display a message in the status bar of the table (like "showing 100 rows from 12'345") and load the rest of the data only when a user clicks on the search button in the search form of the table-page.

Cheers,
André


Eclipse Scout Homepage | Documentation | GitHub

[Updated on: Mon, 22 June 2020 07:08]

Report message to a moderator

Previous Topic:ICacheRegistryService and CacheBuilder possible issue
Next Topic:Integration testing with Eclipse Scout
Goto Forum:
  


Current Time: Sat Dec 07 02:48:10 GMT 2024

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

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

Back to the top