[BBB-USERS] Read-once binding reads three times

  • From: <drekbour@fastmail.fm>
  • To: users@betterbeansbinding.kenai.com
  • Subject: [BBB-USERS] Read-once binding reads three times
  • Date: Wed, 27 Jan 2010 14:49:36 +0000 (GMT)

I have an expensive and uncached bean call which returns a
List<ExpensiveObject> that I wish to bind to a JComboBox.  For some
reason the EL parsing code is evaluating the property three times from
within a single call to bindingGroup.bind() despite READ_ONCE being
chosen.

NB 6.8 generated code (stripped down for clarity):
ELProperty eLProperty = ELProperty.create("${expensiveObjects}");
JComboBoxBinding jComboBoxBinding =
SwingBindings.createJComboBoxBinding(AutoBinding.UpdateStrategy.READ_ON
CE, serviceObject1, eLProperty, jComboBox1, "");
bindingGroup.addBinding(jComboBoxBinding);

Same behaviour with BB-1.2.1 and BBB-1.3.0

[ as an aside, is there a better architecture to call the service
method "findExpensiveObjects" to get this list instead of renaming it
and pretending it is a javabeans property getter ]

Thanks! Drek


[BBB-USERS] Read-once binding reads three times

drekbour 01/27/2010
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close