in Education by
I don't know how initialize a backing bean only when page loads, I am using Spring and ICEfaces. For declare backing bean for ICEfaces I use the Spring annotation @Controller and el-resolver in faces.config.xml because I need inject service objects in the backing bean, and @ManagedBean doesn't work. I use @PostConstructor but it is called when backing beans are created when application starts. I want to initialize my backing bean when page loads, not when backing bean is created. doesn't work for me because it is called everytime a partial submit is doing and i need to initialize only one time Thanks in advance and sorry for my english JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I suspect @Controller has a default scope of "singleton" and as such is initialized during application startup. You should apply @Scope("session") if you want to have bean initialized when it's referred to for the first time and stay in the session. @PostConstruct will be also called once at the appropriate time.

Related questions

0 votes
    I have minified all my js files using require, but require created a minified js file( main.min.js ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I have minified all my js files using require, but require created a minified js file( main.min.js ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 16, 2022 in Education by JackTerrance
0 votes
    $('#some-table').DataTable({ "language": { "url": "{{ asset('/js/plugins/lang.json') }} ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    $('#some-table').DataTable({ "language": { "url": "{{ asset('/js/plugins/lang.json') }} ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    Is it true that Seam only works with JSF?...
asked Jun 6, 2021 in Technology by JackTerrance
0 votes
0 votes
    When a local session bean is used in EJB?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    How do I redirect to another route without a hard refresh? I created an ionic / angular app for ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    Which of the following tag represents a piece of content that is only slightly related to the rest of the page in HTML5? A - section B - article C - aside D - header...
asked Dec 1, 2020 in Technology by JackTerrance
0 votes
    Installed Postgres-XC $>sudo apt-get install postgres-xc then $ postgres -V postgres (PostgreSQL) 9.2. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    Software Stack: React I am trying to get my website analytics, for this, I am using react-ga ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I need to determine the ID of a form field from within an action handler. The field is a part of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    I need to determine the ID of a form field from within an action handler. The field is a part of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    I have installed both plugins: WTP and JBoss Tools (3.3) for Eclipse Indigo, but could not found ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
...