In IceFaces is there a situation when a property in a backing bean is read the first time but not the second time on the same page?

58 views Asked by At

I'm new to IceFaces and currently dealing with version 1.8 (not allowed to upgrade to any new version by the organization). On one of the pages the value of a property from a backing bean is being read fine the first time but sometimes it fails to read the second time in the same page. The code below will explain this better.

There is a backing bean called MyBean. MyBean has a property Action action. Action has a property Map validations. Validation has a property boolean isValid

in my xhtml file the expression #{mybean.action.validations['QRY'].isValid} is read correctly the first time but doesn't right after (happens only sometimes)

This is running on JBOSS 7 with IceFaces 1.8

All classes have the right getters and setters.

public class MyBean {
   ...
   private Action action;
   ...
}

public class Action {
   ...
   private Map<String, Validation> validations;
   ...
}

public class Validation {
   ...
   private boolean isValid;
   ...
}


<ice:selectBooleanCheckbox
   value="#{mybean.action.validations['QRY'].isValid}"
   partialSubmit="true"
   valueChangeListener="#{mybean.action.validations['QRY'].changeListener}">
</ice:selectBooleanCheckbox>
<h:outputText value="Validated"
   styleClass="#{mybean.action.validations['QRY'].isValid ? 'green' : 'red'}" />

in the above code snippet, there is a checkbox and the text 'Validated' right next to it. The style 'green' does font-color green and 'red' does font-color red.

Issue: Sometimes when the user comes to this page the checkbox is checked (value is read correctly from DB and so the checkbox appears checked) but the text appears red instead of green. Why and how does this happen? And sometimes when the user navigates away from this page and returns both the checkbox is unchecked and the text is red. To me it appears like the property was read correctly the first time but subsequent reads either failed or the state info was lost temporarily...

0

There are 0 answers