on 08-06-2009 7:31 AM
hi experts ,
i am using a date type context attribute and i bound it with an input field and in ce 7.1 the date search help is automatically coming, problem is that the initial date is coming like : 1/12/3910 i want it to be set as current date. Please guide me how
to achieve that.
Thank you.
vishavdeep singh
Hi,
Suppose u created attribute XYZ of Date type and binded it to an input element.
In the wddoinit() method of the view, write the below code :-
wdContext.currentContextElement().setXYZ(new java.sql.Date( System.currentTimeMillis() ));
Regards
Shruti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishavdeep,
Just need to set the value of the attribute to the current date in wdDoInit method.. Let us say that you have an attribute named "Date" under some context which you have bound to the inputfield.
Then use the sollowing code:
wdContext.current<NODE_NAME>Element().setDate(new java.sql.Date( System.currentTimeMillis()));
I hope this solves your issue. Please revert back in case you need some further help on this.
Thanks and Regards,
Pravesh
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.