You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lacking much understanding of Scaladin internals, I'm unsure if this is a bug or not. It relates to a MatchError when trying to retrieve an item from a BeanContainer and how these items are wrapped. Using Scaladin 3
private val cbxAssociation = new ComboBox {
caption = "Please Select Your Association"
nullSelectionAllowed = false
description = "Select the association where you are registering these members."
inputPrompt = "Association Name"
width = 150 px;
itemCaptionPropertyId = "name"
immediate = true
p.setContainerDataSource(new BeanContainer[Int, Association](classOf[Association]) {
import com.googlecode.mapperdao.Query.{ select => dbselect }
val a = SportZmanInternetUI.associationEntity
val query = dbselect from a orderBy a.name
val associations = SportZmanInternetUI.queryDao.query(query)
associations foreach { association =>
addItem(association.id, association)
}
})
valueChangeListeners += { evt =>
val selectedAssociationId = evt.property.value.get.asInstanceOf[Int]
val association = getItem(selectedAssociationId)
debug("****" + association)
}
This code throws the following exception
Caused by: scala.MatchError: com.dtc.sportzman.internet.PayMembershipFeesPanel$$anon$2$$anon$6@5d63a2b3 (of class com.dtc.sportzman.internet.PayMembershipFeesPanel$$anon$2$$anon$6)
at vaadin.scala.internal.WrapperUtil$.wrapperFor(WrapperUtil.scala:12)
at vaadin.scala.Wrapper$class.wrapperFor(Wrapper.scala:8)
at vaadin.scala.AbstractComponent.wrapperFor(AbstractComponent.scala:25)
at vaadin.scala.Container$Viewer$class.container(Container.scala:151)
at vaadin.scala.AbstractSelect.container(AbstractSelect.scala:31)
at vaadin.scala.AbstractSelect.wrapItem(AbstractSelect.scala:86)
at vaadin.scala.Container$class.optionalWrapItem(Container.scala:61)
at vaadin.scala.AbstractSelect.optionalWrapItem(AbstractSelect.scala:31)
at vaadin.scala.Container$class.getItem(Container.scala:26)
at vaadin.scala.AbstractSelect.getItem(AbstractSelect.scala:31)
at com.dtc.sportzman.internet.PayMembershipFeesPanel$$anon$2$$anonfun$3.apply(PayMembershipFeesPanel.scala:48)
at com.dtc.sportzman.internet.PayMembershipFeesPanel$$anon$2$$anonfun$3.apply(PayMembershipFeesPanel.scala:46)
at vaadin.scala.internal.ValueChangeListener.valueChange(listeners.scala:72)
Obviously the Scaladin code isn't prepared for this but I don't know where to fix?
def wrapperFor[T](maybeWrapper: Any): Option[T] = {
if (maybeWrapper == null)
None
else
maybeWrapper match {
case mixin: ScaladinMixin => Option(mixin.wrapper.asInstanceOf[T])
case interfaceMixin: ScaladinInterfaceMixin => Option(interfaceMixin.wrapper.asInstanceOf[T])
}
}
The text was updated successfully, but these errors were encountered:
Lacking much understanding of Scaladin internals, I'm unsure if this is a bug or not. It relates to a MatchError when trying to retrieve an item from a BeanContainer and how these items are wrapped. Using Scaladin 3
This code throws the following exception
Obviously the Scaladin code isn't prepared for this but I don't know where to fix?
The text was updated successfully, but these errors were encountered: