Page 1 of 2

Use o:cache / p:cache for p:menu

Posted: 24 Mar 2021, 08:17
by rider
Hi,

I want to use o:cache / p:cache for the menu. I´ve heard it is working for other templates...

I´ve tried already:

Code: Select all

  <h:form id="menu-form">
            <o:cache key="cacheMenu" scope="session">
                <pm:tabMenu id="tabMenu" stateful="true">

                    <pm:tab id="testTab" icon="fa fa fa-tachometer"
                        title="Test">

                        <pm:menu>
                            <p:menuitem value="Dashboard" icon="fa fa-fw fa-tachometer"  outcome="/mypage" />
I´ve tried also:

Code: Select all

  
            <p:cache key="cacheMenu" scope="session">
                <pm:tabMenu id="tabMenu" stateful="true">

                    <pm:tab id="testTab" icon="fa fa fa-tachometer"
                        title="Test">
                        
                        <h:form id="menu-form">
                        <pm:menu>
                            <p:menuitem value="Dashboard" icon="fa fa-fw fa-tachometer"  outcome="/mypage" />
But after that my menu is not working anymore and all URL´s get a "#" to the end.
How can this be fixed?

Re: Use o:cache / p:cache for p:menu

Posted: 26 Mar 2021, 13:31
by merve7
Hi,
@siris, could you please check this issue?

Re: Use o:cache / p:cache for p:menu

Posted: 26 Mar 2021, 14:44
by siris
Hi,

We don't support o:cache. But you can use with p:cache. If you have any issue about this please attach a sample xhtml and bean code for us.

Best Regards,

Re: Use o:cache / p:cache for p:menu

Posted: 26 Mar 2021, 15:32
by rider
i have tried already with p:cache but it is the same.
Can you please check this. The code is already in my first post.
A bean is not needed here.

Please check also the discord channel. It was discussed here, so it is working for other primefaces templates

Re: Use o:cache / p:cache for p:menu

Posted: 26 Mar 2021, 15:40
by siris
Hi,

Your 2 code blocks are same. Please check it. And add p:cache code block for us.

Best Regards,

Re: Use o:cache / p:cache for p:menu

Posted: 26 Mar 2021, 16:08
by rider
Thanks, I have tried the Code in my first post already with p:cache, but it is the same like with o:cache. It was a copy / Paste issue in my First Post, i have edit ist. Please investigate it.

I think you can verify on your own.
Thanks

Re: Use o:cache / p:cache for p:menu

Posted: 30 Mar 2021, 14:45
by rider
@Siris:

Any update here?

Re: Use o:cache / p:cache for p:menu

Posted: 06 Apr 2021, 10:10
by siris
Hi,

Sorry for late response! What version of PrimeFaces are you using? I can't reproduce your issue in my tests. If you are using another version would you try again with Primefaces 10?

Best Regards,

Re: Use o:cache / p:cache for p:menu

Posted: 06 Apr 2021, 12:11
by rider
Thanks for your response.
I´m using PF8.... Morpheus is not ready for PF10. Why should I update to PF10 ?
Please see also: viewtopic.php?f=52&t=61390

I tried this a few weeks before to upgrade, but I got a few errors.

Re: Use o:cache / p:cache for p:menu

Posted: 10 Apr 2021, 08:10
by vished
hello PrimeTek, can you please give an update here?
We have the same issue here and want to cache the menu.

Please note in the discord channel are also complaining users the support for the Premium templates, as I can see here also in this thread.
I´m also surprised why rider should use Primefaces 10, if the template is not ready for version 10??