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

  • Home
  • SEARCH
  • 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 6985685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:42:42+00:00 2026-05-27T18:42:42+00:00

Using PrimeFaces, I want to update/refresh a pages central layout unit based on user

  • 0

Using PrimeFaces, I want to update/refresh a pages central layout unit based on user interaction with a menu (programmatically created MenuModel) that’s included in the same pages east layout unit. From what I can tell, this is not possible, but very well could be wrong. Thanks!

subMenu = new Submenu();
subMenu.setLabel("Sales");  
subMenu.setIcon("ui-icon ui-icon-home");

–

private String currentPage; //holds identifier of current content panel

–

<!-- navigation panel -->
<p:layoutUnit position="west" resizable="false" size="216">
    <ui:include src="./includes/navigationMenu.xhtml" />
</p:layoutUnit>  

<!-- content panel -->
<p:layoutUnit position="center">
    <ui:include src="/views/#{navigationBean.currentPage}.xhtml" />         
</p:layoutUnit>

Thanks!

  • 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-27T18:42:42+00:00Added an answer on May 27, 2026 at 6:42 pm

    I implemented a listener..

    MenuItem thisItem = (MenuItem)event.getComponent();
    String navigateTo = thisItem.getId();
    BeanManager beanManager = new BeanManager();
    NavigationBean navBean = (NavigationBean)beanManager.get("navigationBean");
    navBean.setCurrentPage(navigateTo);
    

    added it to the MenuItem as well as a call to the the templates refresh()…

    item.addActionListener(new MenuItemListener());
    item.setOnsuccess("refresh()");
    

    added the refresh method…

    function refresh(){
        document.location="#{request.contextPath}/faces/views/main.xhtml";
    }
    

    I really don’t care for this solution, but it’s better than the alternative, having untestable menu creation logic in markup.

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

Sidebar

Related Questions

I am using PrimeFaces 3.0.M4. I want to update the contents of PrimeFaces layout
I want to know if it is possible to run a command programmatically using
I'm using primefaces' accordion panel. Inside the tabs i have forms which are created
We are using Primefaces 3M4 and one of our pages has a p:dataTable which
I am using JSF2.0/primefaces I want to create a validator, the validator should validate
Using JDeveloper , I started developing a set of web pages for a project
Using C#, I need a class called User that has a username, password, active
I am using Primefaces and JSF2 . All my .xhtml files are dumped in
i am using primefaces library this is my jsp page source: <%@taglib uri=http://primefaces.prime.com.tr/ui prefix=p%>
I am trying to implement a Select All checkbox using primefaces component p:selectBooleanCheckbox and

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.