Validate the Date and display the message

Hi,
Deposit Date:[yyyy/MM/dd]
<td>
<t:inputCalendar id="dtTo" required="false" value="#{processApplication.depositDate}"
            renderAsPopup="true" popupTodayString="today" popupWeekString="week"
         renderPopupButtonAsImage="true" popupDateFormat="yyyy/MM/dd" size="12"
         maxlength="10"  forceId="true"  popupButtonStyleClass="calendar"
         title="YYYY/MM/DD"    popupButtonImageUrl="../../images/calendar.gif">
<f:convertDateTime type="date" pattern="yyyy/MM/dd" /></t:inputCalendar>
                                          </td>
              <td ><h:message for="dtTo" /></font></td> Incase, when the user selects a date that is way back into the future or some date that is in 1900 ...I want to display a confirm dialog box saying " Are you sure of the date selected ? " .
If yes..go ahead..if no give him another chance to select the date..
I tried with having onclick in *<t:inputCalendar>* but it is not getting fired.
Even if it gets fired, how can I check the condition that the Date entered is not the CurrentDate?
Is there anyother better way to achieve this?
Any help is appreciated.
Thanks.

<t:inputCalendar id="dtTo" required="false"
      value="#{processApplication.depositDate}" onchange="validatePastDate();"
      renderAsPopup="true" popupTodayString="today" popupWeekString="week"
      renderPopupButtonAsImage="true" popupDateFormat="yyyy/MM/dd" size="12"
      maxlength="10"     forceId="true"      popupButtonStyleClass="calendar"
      title="YYYY/MM/DD"     popupButtonImageUrl="../../images/calendar.gif">
<f:convertDateTime type="date" pattern="yyyy/MM/dd" /></t:inputCalendar>
function validatePastDate() {
   var ob = document.getElementById('form1:dtTo'); //not sure what you there
When I looked in the view source of the page...it is using id="dtTo" as its id.
Thanks.

Similar Messages

  • How to Read the one Source Column data and Display the Results

    Hi All,
         I have one PR_ProjectType Column in my Mastertable,Based on that Column we need to reed the column data and Display the Results
    Ex:
    Pr_ProjectType
    AD,AM
    AD
    AM
    AD,AM,TS,CS.OT,TS
    AD,AM          
    like that data will come now we need 1. Ad,AM then same we need 2. AD also same we need 3. AM also we need
    4.AD,AM,TS,CS.OT,TS in this string we need AD,AM  only.
    this logic we need we have thousand of data in the table.Please help this is urgent issue
    vasu

    Hi Vasu,
    Based on your description, you want to eliminate the substrings (eliminated by comma) that are not AD or AM in each value of the column. Personally, I don’t think this can be done by just using an expression in the Derived Column. To achieve your goal, here
    are two approaches for your reference:
    Method 1: On the query level. Replace the target substrings with different integer characters, and create a function to eliminate non-numeric characters, then replace the integer characters with the corresponding substrings. The statements
    for the custom function is as follows:
    CREATE FUNCTION dbo.udf_GetNumeric
    (@strAlphaNumeric VARCHAR(256))
    RETURNS VARCHAR(256)
    AS
    BEGIN
    DECLARE @intAlpha INT
    SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric)
    BEGIN
    WHILE @intAlpha > 0
    BEGIN
    SET @strAlphaNumeric = STUFF(@strAlphaNumeric, @intAlpha, 1, '' )
    SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric )
    END
    END
    RETURN ISNULL(@strAlphaNumeric,0)
    END
    GO
    The SQL commands used in the OLE DB Source is like:
    SELECT
    ID, REPLACE(REPLACE(REPLACE(REPLACE(dbo.udf_GetNumeric(REPLACE(REPLACE(REPLACE(REPLACE([ProjectType],'AD,',1),'AM,',2),'AD',3),'AM',4)),4,'AM'),3,'AD'),2,'AM,'),1,'AD,')
    FROM MyTable
    Method 2: Using a Script Component. Add a Derived Column Transform to replace the target substrings as method 1, use Regex in script to remove all non-numeric characters from the string, add another Derived Column to replace the integer
    characters to the corresponding substring. The script is as follows:
    using System.Text.RegularExpressions;
    Row.OutProjectType= Regex.Replace(Row.ProjectType, "[^.0-9]", "");
    References:
    http://blog.sqlauthority.com/2008/10/14/sql-server-get-numeric-value-from-alpha-numeric-string-udf-for-get-numeric-numbers-only/ 
    http://labs.kaliko.com/2009/09/c-remove-all-non-numeric-characters.html 
    Regards,
    Mike Yin
    TechNet Community Support

  • How to validate VO result and display error message?

    Hi,
    I have created 2 pages:
    Page 1: User to enter employee number and click 'Go' button to search (redirect to Page 2)
    Page 2: To display employee details
    In situation where employee is suspended, employee detail will be display as blank in Page 2.
    At the same time, we would like to display error message which inform user to refer to HR Department for this scenario.
    Need guidance on how to perform the validation and display error message.
    Thanks and Regards,
    Shiau Chin

    Hi Shiau,
    In this case instead of redirecting to next page, throw an exception on the same page.
    If you want redirect it to next page then while redirecting it to next page pass some info that can indicate that employee is suspended, get this value in Process request if it has value then throw exception else query details.
    Regards,
    Reetesh Sharma

  • Encrypt the data and make the model unusable

    hi, having to distribute the 3d animations made ​​with sap, I would like to be sure that the data contained in the CAD models exported (. rh. vds pdf 3d) can not be used to reconstruct the model. How can I encrypt the data and make the model unusable?
    thanks

    Max,
    There are other forms of file-based protection offered for mobile devices (SAP Afaria) and by other software vendors to secure the end deliverable (e.g. Adobe for 3D PDFs).   In addition, SAP's partner NextLabs offers a very comprehensive solution to automate the security of your sensitive information and even provide expiration dating.
    In addition to file protection, 3D Visual Enterprise includes a function to obfuscate the geometry itself thereby making reverse engineering almost impossible.   The "Randomize Objects" function can be used to randomly skew the vertices of the model by small amounts.  It keeps the normals correct, however, so that the object still looks smooth. This in turn makes precise measurements extremely difficult.
    Regards,
    Ken

  • Add text item data and display the output in another text item

    Hi! All,
    I have four text item. like HA,DA,basic_salary and total_sal.I want to add the data entered in the text item in HA,DA,basic_salary and display in total_sal text item.How can I do this.Please help in this matter.
    Thanks,
    Abha

    1.Select the text item TOTAL_SAL
    2.Open property palette
    3.Under Calculation node
         Set calculation mode as Formula
         Set Formula as nvl(:ha,0)+nvl(:da,0)+nvl(:basic_salary,0)                                                                                                                                                                                                                                                                                                                                                                                               

  • Every time I create a new row, I want a certain cell to display the date and time the row was created.  How do I do that?

    =NOW() updates the date and time continuously, I don't want to do that.  I just want the date and time in that cell to stay the same after that row is created.  Seems like this would be easy, but I can't figure it out.

    My preferred scheme is a variant of Barry's proposal 2
    create the new row
    select the cell in which you want to insert the date
    type the shortcut dedicated to one of the four "Insert date" services delivered with WordService from Devon Technologies (FREE)
    On a French keyboard, only one of the default shortcuts apply : cmd % which inserts the long date.
    But we may edit these shortcuts.
    Yvan KOENIG (VALLAURIS, France) mercredi 6 juillet 2011 15:12:16 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Scan through the records in the Form and display the message!

    Hello Everyone,
    We have a requirement, I do not know how to achieve it.
    In a Forms 6i, 2 fields Type, Comment.
    Type is a list of Values (1,2,3)
    Comment - Free Text Field.
    User can enter as much rows of data, but while user saves the data we have to validate that all the records of Same Type(Say 1). If not we have to display a Message.
    So how to achieve this? How to scan through the records in the Form. Any comments on it would be great.
    Thanks.

    User can enter as much rows of data, but while user saves the data we have to validate that all the records of Same Type(Say 1). If not we have to display a Message.I am assuming that you want to check from the first record. Suppose in first record the user coosed 1 and you will check for all the entries for 1.
    Couple of ways to do this.
    1. While user is entering first record. You can keep that selected type value in GLOBAL variable and while he is entering further records you can match type with that global variable. If it is not matching then you can display message.
    2. On KEY-COMMIT trigger you can start loop from first record and can check for all the records one by one. Like.
    DECLARE
      vVal DATATYPE;
    BEGIN
      GO_BLOCK('BLOCK_NAME');
      FIRST_RECORD;
      vVal:=:FORM_TYPE_FIELD;
      LOOP
        IF vVal!=:FORM_TYPE_FIELD THEN
          MESSAGE(..);
          EXIT;
        END IF;
        EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
        NEXT_RECORD;
      END LOOP;
    END;I would go for earlier approach and will use WHEN-VALIDATE-ITEM / PRE-INSERT for type field for this purpose. Because in KEY-COMMIT the system is doing same thing again.
    -Ammad
    Edited by: Ammad Ahmed on May 15, 2010 12:23 AM
    changes not equal sign to !=

  • How to Check the date and get the latest date?

    Hi Everyone,
    I've an internal table which holding few records which contain date field. How I can check this internal table by getting the record which contain "latest date" only? Kindly advise. Thank you.
    eg:
    I should only get the record which contain lastest date. (eg: I should picked up Record3)
    Table i_test
    Field 1              Field 2(date)
    Record1            20090322
    Record2            20090101
    Record3            20090601
    Moderator message - Please search before asking and do not ask basic questions - post locked
    Edited by: Rob Burbank on Jun 17, 2009 9:21 AM

    Its easy...sort the internal table using the field i.e. date field in DESCENDING manner
    SORT gt_final BY date_field DESCENDING.
    Read the first entry of the internal table..it will have what you require
    READ gt_final INDEX 1.

  • Comparing the Dates and Exclude the Dates with Blank one in BEx Query

    Hi all,
        I have created the Formula Variables ZFV_DATE1 on ZDATE1, ZFV_DATE2 on ZDATE2,
           Calculated KF ZCKF_Date with 'ZV_DATE1 <  ZV_DATE2' and
           Restricted KF ZRKF_DATE on Key Figure ZCKF_DATE & Characteristic ZDELETE = 'X' to find the Count.
    I should exclude if any ZDATE1 or ZDATE2 is Blank in the report. So I kept ZDATE1 & ZDATE2 with Exclude when it is Blank in Filter Section. It is excluding globally all Blank ZDATE1 & ZDATE2, but the Calculated KF logic 'ZV_DATE1 <  ZV_DATE2' is not working. It has 'ZV_DATE1 > ZV_DATE2' records also. Next I moved ZDATE1 & ZDATE2 to Restricted KF ZRKF_DATE to Exclude the Blank dates and the report doesn't show correct results. How could I get the correct results with 'ZV_DATE1 < ZV_DATE2' and any ZDATE1 or ZDATE2 is not Blank.
    Thanks,
    Venkat.

    In that case, you approach seems to be mor or less correct. Restrcit the report using Filters on ZDATE1 and ZDATE2 not equal to Blank. You have mentioned that you have defined the CKF as 'ZFV_DATE1 < ZFV_DATE2'. i am assuming you have used boolean operator here. In this case it would  result in '1' when the condition is true (i.e, when ZFVDATE2 is greater than ZFVDATE1), else it will result in a '0'. Now, in your report, you should create a condition where you only keep the records where this CKF, ZCKF_Date = 1. This would filter out all the ZCKF=0 records, and hence only thiose records with ZFV_DATE1 < ZFV_DATE2 would be shown.
    Regards,
    Satwik

  • Copying the data and ignoring the Script logic

    Hi,
    I have some data in Actual category for 2010.APR and I would like to COPY the same
    (through DM) to Budget category with my default script logic file.  When I am trying to
    Do the same it is copying the same data into Budget category, ignoring my script logic
    Actually it should increase the value.
    Can anybody help me in this regard.
    Thanks in adv.
    Raghu B.S.

    The problem it is into script logic.
    When you insert records you are inserting records with category Budget.
    But your default script logic is inserting new recotrds just in case if the input has category Actual.
    So you just to do a correction into your script logic to change the statement
    *WHEN CATEGORY
    *IS "ACTUAL"
    with
    *WHEN CATEGORY
    *IS "BUDGET"
    In this way the default script logic will be executed and after the copy you will have also the records generated by script logic.
    Regards
    Sorin Radulescu
    Edited by: Sorin Radulescu on Aug 5, 2010 2:15 PM

  • How can I get the data and store the data dynamically generated?

    When I entered an order, after the information for the order has been filled in, an order number has been generated dynamically. I want to record this number to my databank.
    The questions are, 1\how can I record the order number? 2\How can I write it back to my databank?
    I noticed Openscript_User_100 had asked the similar question, the post is here,
    Openscript - How to save data to Data bank at runtime
    Openscript - How to save data to Data bank at runtime
    Can Openscript_User_100 or somebody else be more specific on how to do that?
    Can I use the forms.textField.storeAttribute to do that? Where can I find the example for forms.textField.storeAttribute?

    Thanks aamat!
    I tried to look for the orderID in the detail pane HTML, I only have a screen shot in the Detail pane (Is this Detail Pane found in View-Details?) I can see the orderID on the screen shot (there is no other tab Screenshot is the only tab) but I cannot select it and replace it with variable.
    The only place I can select the orderID is in the Java Code,somehow the orderId is recorded there. Please see the code below.
    (I changed"[" to "{" in order to show the code correctly)
    beginStep("{11} Sales Orders (15371) - XXXX Customer", 0);
              forms.captureScreenshot(229);
                   think(8.39);
              forms.textField(230, "//forms:textField{(@name='ORDER_SOLD_TO_0')}")
                        .setFocus();
                   think(0.812);
              forms.window(231, "//forms:window{(@name='ORDER')}").selectMenu(
                        "Tools|Scheduling");
         endStep();
    Can you advise further?
    Edited by: DorothyLi on Dec 15, 2009 11:21 AM

  • I was using Internet Explorer but now have disabled it in preference to Firefox. But my Press Reader program by Newspaper Direct will not access the internet and display the paper. Their web site says it works with Firefox

    Under connection options in Press Reader I have three options. Use IE proxy settings; don't use proxy; Use custom proxy settings. I have tried all three and still cannot get a direct internet connection with Press Reader. The Press Reader site says it works with Firefox 2 and above. I am using Firefox 5.0. I can still go to my newspaper site and read the paper but I just can do it via Press Reader and therefore I can not download it for later reading.

    I notice that the home page redirects to a secure (HTTPS) address. I wonder whether there is a setting blocking this? What if you go directly to a secure page -- will it load?
    https://www.itvsn.com.au/include/sweb.dll/product?product=155602&category=92010&site_id=ITVSN
    Your add-ons list shows AVG, ZoneAlarm, and McAfee products. Could one of them be blocking this site? See whether you can add exceptions or just disable them temporarily and test whether that helps.

  • HT1926 when i try to download itunes 11 my computer stops the download and displays the message could not access network location #user profile%\start menu\programs\startup\

    when i try to download itunes 11.1 or any updates i get the message could not access network location #user profile%\start menu\programs\startup\. any help

    Let's try the fixit from the following Microsoft document with that one:
    Fix problems with programs that can't be installed or uninstalled

  • Need to run a sql query in the background and display the output in HTML

    Hi Guys,
    I have a link in my iprocurement webpage, when i click this link, a query (sql query) should be run and the output should be displayed in a HTML page. Any ideas of how this can be done. Help appreciated.
    We dont have OA Framework and we r using 11.5.7.
    help needed
    thanx

    Read Metalink Note 275880.1 which has the link to developer guide and personalization guide.

  • How to store ,retrieve and display the data in the structured format?

    Hi All,
    We have a requirement in which we need to store a information of type some thing like as below:
    "The PCM_OP_SEARCH opcode fails for the below search used in invoicing module:
    0 PIN_FLD_POID           POID [0] 0.0.0.1 /search -1 0
    0 PIN_FLD_FLAGS           INT [0] 728
    0 PIN_FLD_TEMPLATE        STR [0] " select sum( 1.F8 ), 1.F9 from /event 1, /item 2 where (2.F1 = V1 and  2.F5 >= V5 and 2.F6 < V6 and 2.F2 = V2) and 2.F3 = 1.F4 and  1.F7 like V7 group by 1.F9 "
    0 PIN_FLD_ARGS          ARRAY [1] allocated 20, used 1
    1     PIN_FLD_AR_BILLINFO_OBJ   POID [0] 0.0.0.1 /billinfo 10773245 3
    0 PIN_FLD_ARGS          ARRAY [2] allocated 20, used 1
    1     PIN_FLD_BILL_OBJ       POID [0] 0.0.0.0  0 0
    0 PIN_FLD_ARGS          ARRAY [3] allocated 20, used 1"
    I understand that we can store this as a Blob or Bfile format.But I need to retrieve the data and display it on the GUI in the same format.
    Can anyone please suggest me how can I achieve the same in APEX?
    Thank you for your time !!
    Regards,
    Shan

    And what would be wrong with putting this into a plain old table with columns, on which you could then create a form+report?

Maybe you are looking for