1 Reply Latest reply on Nov 26, 2011 9:08 PM by uncle-moose

    ajax listener does not post component values to managed bean

    uncle-moose

      I am followning the data table edit framework in the showcase. The popup panel contains a listener to calculate the cost. The listener will fire without the execute attribute but some of the values of the other components are not posted to server. When I add execute attribute to the f:ajax tag the listener does not fire.

       

      With out the exeucte attribue:

      Price entered was 10.00 not 1.00. However, the Unit value in dropdown is submitted correctly. The unit is Gallon which is 128 ounces.

       

       

      [#|2011-11-23T22:22:29.984-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=139;_ThreadName=Thread-2;|calculateCost|#]

       

      [#|2011-11-23T22:22:30.046-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=139;_ThreadName=Thread-2;|  Converted Unit = 128.0|#]

       

      [#|2011-11-23T22:22:30.046-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=139;_ThreadName=Thread-2;|Price 1.00\ Unit Count = 128.00|#]

       

      [#|2011-11-23T22:22:30.062-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=139;_ThreadName=Thread-2;|  Cost = 0.01|#]

       

      [#|2011-11-23T22:22:32.187-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=141;_ThreadName=Thread-2;|calculateCost|#]

       

      [#|2011-11-23T22:22:32.187-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=141;_ThreadName=Thread-2;|  Converted Unit = 128.0|#]

       

      [#|2011-11-23T22:22:32.187-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=141;_ThreadName=Thread-2;|Price 1.00\ Unit Count = 128.00|#]

       

      [#|2011-11-23T22:22:32.187-0700|INFO|glassfish3.1.1|com.bundt.price.domain.BundtItem|_ThreadID=141;_ThreadName=Thread-2;|  Cost = 0.01|#]

        • 1. Re: ajax listener does not post component values to managed bean
          uncle-moose

          Multiple things were occurring:

          1. popupPanel was inside form but commandButtons did not work either until popupPanel was changed from "parent" to domElementAttachment="form"
          2. My price attribute was a BigDecimal but was rendered as a Double. I was using Groovy and had to define a setter that took in a Double.

           

           

          All that is left is to figure out why tabindex does not work inside the popupPanel.