How to get the date from Oamessagedatefieldbean

Source: Internet
Author: User

          Oamessagedatefieldbean Datefrombean = (Oamessagedatefieldbean) webbean.findchildrecursive ("PReceiptFromDate");          =  datefrombean.gettext (PageContext);           = pagecontext.getoanlsservices (). Stringtodate (DATEFROMSTR);          Oracle.jbo.domain.Date recfromdatenew oracle.jbo.domain.Date (receiptfromdate);

Verify that the entered date cannot be greater than the last day of the current month

Oamessagedatefieldbean Datefield =(Oamessagedatefieldbean) webbean.findindexedchildrecursive ("Date"); Date valimaxdate=NewDate (); Calendar Cal=calendar.getinstance ();        Cal.settime (valimaxdate); Cal.set (Calendar.day_of_month,1); Cal.roll (Calendar.day_of_month,-1); Valimaxdate=Cal.gettime ();        Datefield.setmaxvalue (valimaxdate); LongMaxTime =Valimaxdate.gettime (); Datefield.setonblur ("Var dff=_getdatefieldformat (this); var vl=dff.parse (this.value); if (vl!= (void 0)) {var currtime=vl.gettime (), if (currtime> "+maxtime+") {alert (this.value+ ' cannot be greater than the last day of the month.); This.value= '; return false}}else{var msg= ' date format does not match or is empty, returns true to allow the system to verify: '; return true} ");

Required to display the day of the month and seconds, the second is always 00
String Userdateformat = pagecontext.getoanlsservices (). Getuserjavadateformat ();      = Userdateformat + "hh:mm:00";     New
Datebean.setattributevalue (on_submit_validater_attr, formatter);

Set Date specified format

        Oamessagetextinputbean money =             (oamessagetextinputbean) webbean.findchildrecursive ("money");         if NULL {            money.setrequired (this). Required_yes);             =                 new oadecimalvalidater ("#,###,###,# #0.00;-#,###,###,# #0. xx",                                        "#,###,###,## 0.00;-#,###,###,# #0) ");            Money.setattributevalue (on_submit_validater_attr, formatter);        }

Reference Links:

How to get the date from Oamessagedatefieldbean

Setting Calendar entries in OAF page

How to get the date from Oamessagedatefieldbean

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.