2 Replies Latest reply on Sep 7, 2013 8:09 PM by Endrik Lelo

    Reset af:inputText values and clear cache

    Endrik Lelo

      Greeting everyone!

      I use JDev Version


      I have three af:inputText components, all pointin to persistent attributes from one VO. One of these fields gets it's value calculated (in a managed bean) from the others two values. This is done on value change of these two fields. The problem is when i reset these other two fields (meaning, when i delete the content inside of them). The value on the third field does not to change at first. From the controls i've done, it seems that it keeps a value in a cache. So when i clear the first field, the value of the third field remains the same, and when i clear the value from the second field too, then the third field gets the value cleared from the second field.

      I know this might be a bit confusing so here is the basic code snippet i've tried:



          public void getTotalContractInfo(ValueChangeEvent valueChangeEvent) {

              System.out.println("A value is changing!");

              if (tvshContractInfo.getValue()!= null && it14.getValue()!= null) {

                 BigDecimal x = new BigDecimal(tvshContractInfo.getValue().toString());

                  BigDecimal y= new BigDecimal(it14.getValue().toString());

                  BigDecimal i = new BigDecimal(100);

                  BigDecimal m = (y.multiply(x)).divide(i);




              else if (tvshContractInfo.getValue()== null && it14.getValue()!= null){




              else if (it14.getValue()== null ){





      Any ideas what is happening? I've tried several techniques to refresh the components or clear the binding cache, but none of them seems to work.


      Thank you in advance!