on 03-18-2008 9:16 AM
Hi, I would like to have "date" field filled with todays date automatically after starting the application? Is there a simple way to do that? Regards, Balmer
Hi Balmer,
wdDoInit()
{
wdContext.currentContextElement().setDateElement( new Date(System.currentTimeMillis()));
}
Regards
- Vinod
*
Edited by: Vinod V on Mar 18, 2008 3:10 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you have a context attribute which is bound to the date field in the UI, then you can write this code in the wdDoInit():
//Let's say the context attribute is called "dateVal". Note that it should be of type java.sql.Date
wdContext.currentContextElement().setDateVal(new Date(System.currentTimeMillis()));
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Balmer,
//You can get current date
Date currDate = new Date(System.currentTimeMillis());
//You can set your context like this:
wdContext.currentContextElement().set<attribname>(currDate);
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Create attribute of type currDate. Then bind into Input filed. Then inside init() method :
java.util.Date tempDate = Calendar.getInstance().getTime();
Date sqlDate = new Date(tempDate.getTime());
wdContext.currentContextElement().setcurrDate(sqlDate);
Thanks,
Sunitha Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.