paged-tabs in Flow?

Thanks Darren. Version 1.0.2 should fix the bug. Cheers.

Thanks Alejandro - Version 1.0.2 works for me.

Alejandro - I’d like to ask, is it realistic to use this component if I require 5-8 tabs on the top level, with each top level tab having 2-5 nested tabs? That is essentially like having 10 (or more) ‘pages’ all on one web page, correct? Most of the nested tabs would also contain a grid (for which I’ve not yet figured out lazy loading (using only JDBC)). Thanks.

It depends. The relevant technical aspect to know is that all the components in the pages are kept in memory.

Darren, I just published version 1.1.0 that allows specifying custom tab content suppliers:

tabs.add(this::getTab1Content, "Tab 1");

In the previous example, the getTab1Content method is called when the “Tab 1” tab is selected. The PagedTabs class no longer keeps references to the content components directly but to the suppliers. Hope that helps!

Thanks Alejandro.

I have attempted this, however am having trouble with the double colon operator in this case. Using

tabs.add(this::getContactList, "Contact");

private ContactList getContactList(String sContactType)
{
	return new ContactList(sContactType);
}

The error being:

The target type of this expression must be a functional interface.

Would this achieve the same result?

`tabs.add(getContactList(), "Contact");`

I guess this may be a more general Java question, but appreciate your time.

Darren B:
Thanks Alejandro.

I have attempted this, however am having trouble with the double colon operator in this case.

That’s called a “method reference”. You can use a lambda expression instead: tabs.add(() -> getContactList(someParam), "Contact"). Check this out: https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html.

Thanks again.

I should add that I understand the :: method reference and the use of lambda expressions - I had just never heard the term ‘content suppliers’ or ‘suppliers’ in relation to this situation and thought perhaps there was something I was missing that was causing the method reference not to work in this case.

Thanks for the Component.