Skip to content
Browse files

Better fix for the previous fix :)

  • Loading branch information...
1 parent 8843c52 commit 5001b46880d75aee80f1b0379f85966149ab2a53 @henrikerola committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 addon/src/main/scala/vaadin/scala/BeanItemContainer.scala
View
8 addon/src/main/scala/vaadin/scala/BeanItemContainer.scala
@@ -22,13 +22,13 @@ class BeanItemContainer[BT](override val p: com.vaadin.data.util.BeanItemContain
def addBean(bean: BT): BeanItem[BT] = new BeanItem[BT](bean)
- def wrapItem(unwrapped: com.vaadin.data.Item): Item = unwrapped match {
+ def wrapItem(unwrapped: com.vaadin.data.Item): Item = {
// must create BeanItem with the constructor that takes a Vaadin BeanItem not a bean.
- case beanItem: com.vaadin.data.util.BeanItem[_] => new BeanItem[Any](beanItem)
+ new BeanItem[BT](unwrapped.asInstanceOf[com.vaadin.data.util.BeanItem[BT]])
}
}
-class BeanItem[BT](override val p: com.vaadin.data.util.BeanItem[_]) extends Item {
+class BeanItem[BT](override val p: com.vaadin.data.util.BeanItem[BT]) extends Item {
def this(bean: BT) {
this(new com.vaadin.data.util.BeanItem[BT](bean))
@@ -38,5 +38,5 @@ class BeanItem[BT](override val p: com.vaadin.data.util.BeanItem[_]) extends Ite
this(new com.vaadin.data.util.BeanItem[BT](bean, propertyIds.asJavaCollection))
}
- val bean = p.getBean
+ val bean: BT = p.getBean
}

0 comments on commit 5001b46

Please sign in to comment.
Something went wrong with that request. Please try again.