Aug 25, 2016, 9:33 AM
94 Posts

Thank you for the input

  • Category: Debugging
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 2

Yes, I had to do exactly that, stripped everything out except the date, the upload and a Save button.  I discovered that the document would actually save, and THEN the date would get reformatted.  So, as a workaround, I added code to clear the date field in the oncomplete event of the Save button - and that actually works.  So, not a solution, but a workaround.  (I was able to do that only because the Save performed a partial refresh.  The form actually appears in a dojo dialog panel)

I'm still looking for a solution, because I'm afraid I'll run into this again in the future.

Here's how it looks before Save

and after Save

Here's the xpage code

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp=""><xp:panel id="panelCustPO">
            <xp:dominoDocument var="document3" formName="CustPOTemp" ignoreRequestParams="true">
        <xp:table style="background-color:rgb(242,242,242);border-color:rgb(128,128,128);border-style:solid;border-width:thin">
                <xp:td style="text-align:right">

                    <xp:label value="P.O. Received Date:" id="label101">
                <xp:td style="background-color:rgb(255,255,255)">
                    <xp:inputText id="DateRec" value="#{document3.DateRec}" style="height:20px">
                            <xp:convertDateTime pattern="MMM d, yyyy">
                <xp:td style="text-align:right" valign="top">
                    <xp:label value="P.O. Attachment:" id="label225"
                <xp:td style="background-color:rgb(255,255,255)">
                    <xp:fileUpload id="Attachments"
                        value="#{document3.Attachments}" style="width:99%;height:20px">
                <xp:td colspan="3" style="background-color:rgb(255,255,255);text-align:right;padding-top:10.0px">
                    <xp:button id="button18" value="OK" style="width:80px;margin-bottom:5.0px">
                        <xp:eventHandler event="onclick" submit="true"
                            refreshMode="partial" id="eventHandler55"
                                    <xp:saveDocument var="document3"></xp:saveDocument>
                                        message="save successful">
                            <xp:this.onComplete><![CDATA[//var fld = XSP.getElementById("#{id:DateRec}");
//fld.value = ""]]></xp:this.onComplete>