Scaladin 3.0 problem w/ScaladinSession

When using Scaladin 3.0-SNAPSHOT, a call to:

ScaladinSession.current

when using Vaadin in a portlet under Liferay 6.1.20 ea, generates exception:

Caused by: scala.MatchError: com.vaadin.server.VaadinPortletSession@636b7158 (of class com.vaadin.server.VaadinPortletSession)
at vaadin.scala.internal.WrapperUtil$.wrapperFor(WrapperUtil.scala:12) [scaladin.jar:3.0-SNAPSHOT]

    at vaadin.scala.server.ScaladinSession$.current(ScaladinSession.scala:20) [scaladin.jar:3.0-SNAPSHOT]

Rest of the portlet operates fine. The call to ScaladinSession.current was intended to set the portlet mode back to view after saving a form in the edit mode.

ScaladinSession.current.p.asInstanceOf[VaadinPortletSession]
.setPortletMode(self.p, PortletMode.VIEW)

  • note that “self” == this at the Scaladin UI level this code was run in