Template topbar responsive menus not working

Forum rules
Please note that response time for technical support is within 3-5 business days.
rene
Posts: 14
Joined: 20 Oct 2011, 11:37

22 Jul 2016, 11:56

In the omega live perview (http://www.primefaces.org/omega/) there appeares a left and a right responsive-menu in the topbar, if the browser screen is small enough. This function doesn't work in my application. If I click on one of the links nothing happens!?
I delpoy also the omega-1.0.1.war (live perview demo) to a local tomcat - the same problem.
Primefaces 6.0.1, Omega-Layout, Majorra 2.2.13, Tomcat
Testing with Chrome and Firefox

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Jul 2016, 08:25

How small? What is the width you have tested? We have checked against many mobile devices.

rene
Posts: 14
Joined: 20 Oct 2011, 11:37

25 Jul 2016, 11:14

The left topbar-menu icon (fa-bars) appears at a width lesser than 922px the rigth (fa-ellipsis-h) lesser than 576px. I see the icons but if I cklick on the icons - nothing happens - no menu is visible. I haven't also no jsf or java script error. simply nothing happens.
Primefaces 6.0.1, Omega-Layout, Majorra 2.2.13, Tomcat
Testing with Chrome and Firefox

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

25 Jul 2016, 18:53

@aragorn, @trypticon, can you replicate?

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

25 Jul 2016, 23:26

Everything works fine.I couldn't replicate it locally.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

26 Jul 2016, 08:39

Can you please try this issue after making the following change in your OmegaMenuRenderer.java?

Code: Select all

public class OmegaMenuRenderer extends BaseMenuRenderer {
     ....

    @Override
    protected void encodeScript(FacesContext context, AbstractMenu abstractMenu) throws IOException {
        OmegaMenu menu = (OmegaMenu) abstractMenu;
        String clientId = menu.getClientId(context);
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.initWithDomReady("Omega", menu.resolveWidgetVar(), clientId).finish(); // instead of wb.init(...).finish();
    }
    
}

rene
Posts: 14
Joined: 20 Oct 2011, 11:37

26 Jul 2016, 09:56

Ok. I remove the omega-menu.jar from the classpath and add the OmegaMenu.java and OmegaMenuRenderer.java and register them. Now it works fine !!!
But the strange thing - in the Source is the Line:

Code: Select all

wb.initWithDomReady("Omega", menu.resolveWidgetVar(), clientId).finish();
With wb.init(...) it doesn't work! Which line is packaged in the 1.0.1.JAR?
Primefaces 6.0.1, Omega-Layout, Majorra 2.2.13, Tomcat
Testing with Chrome and Firefox

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

26 Jul 2016, 10:05

init is packaged in 1.0.1 and initWithDomReady is in 1.0.

We're working on this for 1.0.2.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

26 Jul 2016, 10:19

The fix turned out to be super simple, just move sidebar.xhtml after topbar.xhtml in template.xhtml so it becomes;

Code: Select all

        <div class="wrapper">
            <ui:include src="topbar.xhtml" />
            
            <ui:include src="sidebar.xhtml" />
            
            <div class="main">
                <ui:insert name="content"/>
            </div>
            
            <ui:include src="footer.xhtml" />
        </div>
We'll do this change in tomorrow's Omega 1.0.2 release as well.

rene
Posts: 14
Joined: 20 Oct 2011, 11:37

26 Jul 2016, 16:46

I test the fix. it works :) . thank you.
Primefaces 6.0.1, Omega-Layout, Majorra 2.2.13, Tomcat
Testing with Chrome and Firefox

Post Reply

Return to “Omega - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests