Hi all,
I have the following scenario:
I have in my left menu a p:repeat to get records from the database, like e.g. contacts as showing in the template page:
Now I have the problem, that I will have for every page load a request to database, also if the menu is not collapsed.
But I need the request to the database only if I click e.g. on this menu panel:
Otherwise my page is loading more than really needed.
Do you have any ideas how I can improve this?
Thank you
Avoid request to database if menu panel is not open
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Thanks a lot for the screenshots. I added tabChange event to pm:tabMenu component on next version. You can use it for this issue.
Best Regards,
Thanks a lot for the screenshots. I added tabChange event to pm:tabMenu component on next version. You can use it for this issue.
Code: Select all
<h:form style="height: 100%">
<pm:tabMenu id="tabMenu">
<p:ajax event="tabChange" oncomplete="console.log('test')" />
<pm:tab id="tab1" icon="fa fa-folder-open" title="FEATURES">
...
</pm:tab>
...
Github Profile: https://github.com/mertsincan
Wow, very great. Thank you very much.
Means the datatable is rendering and showing only if the specific menu is loaded?
Something like p:outputPanel deffered ?
At the end I need to load only p:datatable, list, content for the active pm:tab.
Caching would be also very nice, because I have for each p:menu item a security request, if user has the permission or not.
Any ideas?
Means the datatable is rendering and showing only if the specific menu is loaded?
Something like p:outputPanel deffered ?
At the end I need to load only p:datatable, list, content for the active pm:tab.
Caching would be also very nice, because I have for each p:menu item a security request, if user has the permission or not.
Any ideas?
PF 8.0
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
I think you can update content using <p:ajax event="tabChange".
Best Regards,
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests