سؤال

We stumbled upon a strange behaviour in IE11 -

In one of our Notes applications we store an array as a viewScope variable and in the onClick event of a button we parese it onto a variable (SSJS) via

var myList = new Array(viewScope.get("existingDates"));

in all browsers except IE (Safari, Chrome, Firefox) it works like a charm. in IE we get no array, but rather a string.

I checked this by using

viewScope.get("existingDates").getClass().getName().

It returns java.util.Vector in all the other browsers, java.lang.String in the IE.

A 'split' or comparable workarounds can only be seen as last resort solution due to variable variable content in our application and I also would like to refrain from using delimiters so as to avoid having to add and subtract them for all the other browsers in every run.

Does anybody have an idea how to avoid that kind of behaviour or on how to best deal with it?

Also - though this might be a novice question - I do not get why SSJS can have different outcome in different browsers in the first place? What did I not get there?

هل كانت مفيدة؟

المحلول

As @xpages-noob suggested, the erroneous behaviour occurred because we had a multiple Separator in the ListTextBox. After we removed that parameter, the code ran correctly in all browsers, including IE.

code before:

<xe:djextListTextBox 
  id="djListe"
  value="#{viewScope.existingDates}" readOnly="false"
  multipleTrim="true"
  multipleSeparator="#{javascript:@NewLine();}">
</xe:djextListTextBox>

code after:

<xe:djextListTextBox 
  id="djListe"
  value="#{viewScope.existingDates}" readOnly="false"
  multipleTrim="true">
</xe:djextListTextBox>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top