0

I have a app using PrimeFaces that was developed on Windows using WebSphere server.

When I try to run it on IBM AIX all of the SelectOneMenu is not working. The value selected is not sent to the bean and reset to default value on form submission. There is no JavaScript error and no Java error in console.

I use PrimeFaces 5.2 and Websphere server 8.5.5. I test the app in Google Chrome and Internet Explorer 11.

There is an example of SelectOneMenu that I do (Working on Windows):

<p:selectOneMenu id="selectType" 
    required="true"
    value="#{exampleBean.newExample.exampleType}"
    widgetVar="selectExampleType">

    <f:selectItem itemLabel="exampleType"
        itemValue="#{null}" 
        noSelectionOption="true" />

    <f:selectItems value="#{exampleBean.exampleTypeList}"
        var="exampleType" 
        itemLabel="#{exampleType.getCurrentDescription()}"
        itemValue="#{exampleType}" />

</p:selectOneMenu>
vinid223
  • 115
  • 2
  • 4
  • 15
  • Linux is not same as Unix. What OS exactly is it? Nonetheless, mentioning client (webbrowser) make/version would also be helpful. – BalusC Feb 18 '16 at 17:36
  • AIX By IBM, I put Linux because of the family of Unix – vinid223 Feb 18 '16 at 17:37
  • We use Internet Explorer 11 to test the app but we also tried on Google Chrome for both environment (AIX/Windows) – vinid223 Feb 18 '16 at 17:45
  • what did you debug (comparing working and non working environment)? – Kukeltje Feb 18 '16 at 18:55
  • @Kukeltje We tried to change the SelectOneMenu element from Primefaces to the jsf one, remove all css on the SelectOneMenu. We test all thoses changes on multiple browers. We also tried to add ajax call to update "manually" the bean and we also add our own Javascript but none of theses changes work – vinid223 Feb 18 '16 at 19:05

1 Answers1

0

I finally found the problem. It's when I override the getAsString method on some object and use this line of code to add a space between strings:

System.getProperty("line.separator")

It seems that AIX does not interpret this line as a space (I don't know why) so I had to replace it by a simple space between quotes like this:

" "

It could be nice if somebody can explain why this happened. It was by pure luck that I found this to be honest.

vinid223
  • 115
  • 2
  • 4
  • 15
  • I think it's because the line.operator was set to a Windows operator only and in the execution of the app on linux the operator wasn't working. – vinid223 Feb 18 '16 at 21:48