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 6610293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:49:20+00:00 2026-05-25T19:49:20+00:00

As title. The problem is the attribute in the bean is fixed after init().

  • 0

As title.

The problem is the attribute in the bean is fixed after init().

I want to update the count attribute when ever i access #{managedBean.xyz} method in JSF

I want to stick with the sessionscoped instead of view/request because it saves some time for the Object re-creation.

I don’t want to do the attribute update manually in every xyz function. 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-25T19:49:21+00:00Added an answer on May 25, 2026 at 7:49 pm

    If I understand you correctly, you want to invoke a bean method on every view which involves the bean?

    Add <f:event type="preRenderView"> to those views.

    <f:event type="preRenderView" listener="#{managedBean.countUp}" />
    

    with

    public void countUp() {
        count++;
    }
    

    It will be invoked only once on every request.

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

Sidebar

Related Questions

Ok title is confusing, Ill tell you my problem first: the polymorphic_url method was
Problem: Sometimes you will want to access a component from javascript with getElementById ,
Hard to come up with a proper title for this problem. Anyway... I'm currently
excuse me in advance if this is not the right title for the problem
The problem is in the title - IE is misbehaving and is saying that
I've problem like in title. I'm using ruby with Sinatra framework and trying to
The title of the question pretty much states the problem. Is it possible?
Not sure the title fully describes the problem/question I'm trying to ask, sorry. One
Wow crazy title! But here's the problem. In efforts to dry up my school
Sorry for the vague title, as I really can't explain this problem succinctly. Basically

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.