Topic:   how to set a default value to a date input in CAF screen
Jul 15, 2014 03:32 5 Replies 514 Views cabj4klt
Prev Next
Topic Replies (5)
  1. 1
    idnkx user

    cabj4klt

    Guys pls help.. I want to know how to set a default value to a date input in CAF screen. It has to take current date as default value..

    1
    idnkx user

    George

    Create a control accessor for it. in Initialize method set the current date time using the control accessor.

    1
    idnkx user

    cabj4klt

    Thanks Wash@idn.. I added the Control Accessor. It created the below code: public com.webmethods.caf.faces.component.input.DateInput getHtmlInputText() {
    return (com.webmethods.caf.faces.component.input.DateInput)findComponentInRoot("defaultForm1:htmlInputText");

    1
    idnkx user

    cabj4klt

    but how to in Initialize method set the current date time using the control accessor..? pls help..

    1
    idnkx user

    George

    get the current date in required format... and then use getHtmlInputText.setValue(currentDate); this should work..

Leave a Reply
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect