Vaadin and Scala

Has Scaladin been abandoned? If it hasn’t, does the current version work with Vaadin 7.6.x?

Thanks…

Last update was in Jan.

If you want to checkout the latest code you can use jitpack (as last official release was 3.1)

https://jitpack.io/#henrikerola/scaladin/-SNAPSHOT

Is there a way to add buttons to a table with scaladin?

So far I only get String name of the class eg Vaadin.scala.Button@488bceb

The property is defined like this:

userTable.addContainerProperty(“Password”, classOf[Button]
, None)

and the value set like this:

rowItem.getProperty(“Password”).value_=(btn)

scaladin 3.1.0, vaadin 7.6.4

Found a way that worked.

set the container Property like this:
userTable.addContainerProperty(“Password”, classOf[ com.vaadin.ui.Button ]
, None)

and add the button like this:
val btn = new Button // this is a scala.vaadin.Button - but the .p refers to the wrapped com.vaadin.ui.Button
rowItem.getProperty(“Password”).value_=(btn.p)

Question for Property trait in Scaladin:

I have a Custom component like this:

class MyComponent extends CustomComponent with Property[String]
{
// code to implement the Property trait
}

With Scaladin the problem is that Property Trait has the same p method as CustomComponent to do the encapsulation. So the error is ovverrdie the method in p property for Property trait… is ambiguos and has diferent parameter.

¿Any idea or comment?

Hi there! I have a simple question: does Scaladin work with the latest, 7.7.1 version of Vaadin?

Thanks.

I´m using Vaadin 8.1.0 and I want to know how can use functional interfaces in scala. Something like this:

column.setEditorComponent(component, Account::setStatus)

Mor eprecisely, har do I map the lambda BeanObject::setterMethod in scala. ANy idea?

[font=courier new]
case class Account(@BeanProperty var status)

column.setEditorComponent(component, Account::setStatus)
[/font]

I tryed this. It does not work. The problem is the syntax Account::setStatus. It does not compile (the :: notation is Java 8 lamba notation, not a part pf scala language).

If your read the las pargraph of https://vaadin.com/docs/-/part/framework/getting-started/getting-started-scala.html , it says ‘Scala does not support use of lambda expressiones for calling functional interfaces’. Vaadin expects a com.vaadin.server.Setter funcional interfaces as parameter. It don´t kno how to map the ‘::’ notation to scala.