Error with xPage date field

Hi all,I’m having a problem when running my application on 8.5.2. The issue is related with the use of the converter xp:convertDateTime.

I’m now always getting the error :

Unterminated string litteral

It was rendred like this on 8.5.1 :

XSP.attachValidator(“view:_id1:approvalDate1”,null,new XSP.DateConverter(“dd/MM/yy”,“This field is not a valid date.”));

and it’s now like this on 8.5.2 :

XSP.attachValidator(“view:_id1:approvalDate1”,null,new XSP.DateConverter(“dd/MM/yy”,“This field is not a valid date.”),’

');

For some reason, the two quotes at the end of the statement are on two separate lines.

The consequence is the page is locked, no transaction is moving forward.

Does anyone have an idea on how to fix this ?

Ernesto

Subject: attachValidator Problem

Are you using an in-built validator or attaching one via CSJS? What is your XML? The extra parameter, from what I can see, is for a DateTimeRangeValidator. I’ve seen a few bits of code that were technically incorrect but happened to work in 8.5.1, and now don’t work in 8.5.2.

Subject: in-build validator

I’m using a in-build validator.Here is the xml :

<xp:inputText

					value="#{dominoDocument1.ApprovalDate}" id="approvalDate1"

					styleClass="value">





					<xp:this.multipleSeparator><![CDATA[#{javascript:"\n";}]]></xp:this.multipleSeparator>

					<xp:this.converter>

						<xp:convertDateTime dateStyle="short"

							ignoreUserTimeZone="false" type="date">

						</xp:convertDateTime>

					</xp:this.converter>

				</xp:inputText>

Subject: MV Separator?

Looking at your code and the output, I notice that the converter has this at the end:,’

')

and your separator is a new line. I’d suggest that’s causing the problem, that it’s putting a carriage return into the literal string of the javascript code, which javascript is objecting to.

If you don’t want to use a different separator, you might be able to call the relevant converter in client-side javascript, passing your separator \n yourself.