Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7627709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:29:46+00:00 2026-05-31T05:29:46+00:00

<ui:composition> <h:form> <p:menubar> <p:menuitem id=signup value=signup label=Sign Up action=goSignUp/> </p:menubar> <h:commandButton id =signup2 value=signup2

  • 0
<ui:composition>
        <h:form>
           <p:menubar>
                    <p:menuitem id="signup" value="signup" label="Sign Up" action="goSignUp"/>
           </p:menubar>

            <h:commandButton  id ="signup2" value="signup2" label="Sign Up" action="goSignUp" />

        </h:form>
 </ui:composition>

Why the upper one is NOT working and normal command button is working? I am including menuBar.xhtml to my page and after that menus are not working any more. If I Implement them straight to the original page without including them, they are working fine, why? Primefaces version 3.1 and JSF2.0 + Glassfish 3.1.

Cheers,
Sami

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:29:47+00:00Added an answer on May 31, 2026 at 5:29 am

    Ive checked your problem in my environment and have to say that it workes for me although I’ve made some minor changes.

    First I’ve created the composition page in my /WEB-INF/template/ folder:

    <body>
      <ui:composition>
        <p:menubar>
          <p:menuitem id="signup" value="signup" label="Sign Up" action="goSignUp" ajax="false"/>
        </p:menubar>
    
        <h:commandButton id="signup2" value="signup2" label="Sign Up" action="goSignUp" />
      </ui:composition>
    </body>
    

    And after that I’ve inserted it into my .xhtml file:

    <f:view>
      <h:body>
        <h:form>
            <ui:include src="/META-INF/template/navbar.xhtml" />
        </h:form>
      </h:body>
    </f:view>
    

    Everything workes great.
    Maybe you noticed the ajax=”false” attribute set on the <p:menuitem> tag. This value is set to true per default and stops the JSF implementation to execute its default lifecycle. By setting it to false you’ll get the regular JSF behavior.

    Hope this helped, have Fun!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been read this article : commandButton/commandLink/ajax action/listener method not invoked or input value
In my .xhtml page, I have the following form: <ui:composition xmlns:ui=http://java.sun.com/jsf/facelets template=./../template/CustomerTemplate.xhtml xmlns:h=http://java.sun.com/jsf/html xmlns:f=http://java.sun.com/jsf/core
I'm trying to do some form of composition with restrictions in XML Schema. I
When I use a <p:menuButton> as follows: <div id=div_menutop> <h:form id=form_top> <p:menubar id=mnb_top >
Are Composition and Inheritance the same? If I want to implement the composition pattern,
Possible Duplicate: Prefer composition over inheritance? I wonder, why (or in which cases) should
I am doing composition of two automaton (Actually it is a transducer). So at
As I know alpha composition uses straight alpha basically. But all GLES blending sample
Example: class MyClass { Composition m_Composition; void MyClass() { m_Composition = new Composition( this
I have Person entity which has composition with Location Entity @ManyToOne(fetch = FetchType.EAGER, cascade

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.