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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:51:00+00:00 2026-06-16T08:51:00+00:00

As said in the title, i’d like to change a component property identified by

  • 0

As said in the title, i’d like to change a component property identified by an id in a jsf page from a managed bean. Here is my jsf code :

<p:calendar value="#{eventBean.beginDate}" id="from" pattern="dd/MM/yyyy HH:mm" required="true"/>

It’s a PrimeFaces component. At the initialization of the page, i’ve got an empty field that display by clicking in a calendar. Choosing a date fill the field with the selected value. My question is : how to fill the field with the current date at the initialization of my jsf page ? I dunno if there is a possibility by using PrimeFaces calendar component properties (i’ve try several things that didn’t work) and i’d like to know if that’s possible using managed bean.

Thank you !

  • 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-06-16T08:51:01+00:00Added an answer on June 16, 2026 at 8:51 am

    Just set the property during bean’s (post)construction.

    private Date beginDate;
    
    public EventBean() {
        // Here, in constructor.
        eventDate = new Date();
    }
    
    @PostConstruct
    public void init() {
        // Or here, in a @PostConstruct method. 
        // This is invoked after any dependency and managed property injection.
        eventDate = new Date();
    }
    

    Note that this approach is not specific to the calendar property. It applies to all kinds of properties.

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

Sidebar

Related Questions

Like the title said, .load() function won't load javascript from called page. Would be
As the title said, I need to raise (from the C# code behind a
Like the title said,how may i turn the grid(or page) and the components in
like said in the title I'd like to change a button's backgroun (using setBackgroundResource()
as title said, Im trying to change only the first occurrence of word.By using
As title said, I want to show another UIViewController from an existing UIViewController which
As the title said, if I update the values from App_GlobalResources file, the application
Just like the title said. For example: I have a class like this: class
all is said in the title, I want to get from an element all
Like I said in the title. I'm trying to compile libipsec right now 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.