I would like to use vaadin 7 + scala in order to display a page in which there is a label(with a default text), and a button.When one clicks the button, the text of the label changes. Initially the click event of the button has for purpose to call a method that makes a long time to execute(it’s a database datas retrieving). I thought the problem came from the long time of the method, but I saw that even without the database query there was an error.
here is some code:
the page:
package com.example.scaladinchat
import com.github.nscala_time.time.Imports._
import vaadin.scala.UI
import vaadin.scala.VerticalLayout
import vaadin.scala.Label
import vaadin.scala.server.ScaladinRequest
import vaadin.scala.Button
import metier.Objets.Rdv
import models.{oracle => myOracle}
class N02Parameters extends UI with myOracle with LabelUpdater{ app =>
val l=Label("zigouigoui")
def updateLabel(string:String){
access{
l.value=string
}
}
override def init(request: ScaladinRequest) {
def moi=this
content = new VerticalLayout {
add(l)
val b=Button("Click me!")
b.clickListeners+= {e=>
val manager=new OracleManager
manager.fetchAndUpdateDataWith(moi)
}
add(b)
}
}
}
Communication problem
Take note of any unsaved data, and click here to continue.(SyntaxError) stack: Ica@http://localhost:8080/N02:330 HR@http://localhost:8080/N02:315 _.Sc@http://localhost:8080/N02:338 _.Qc@http://localhost:8080/N02:123 hH/a.onreadystatechange<@http://localhost:8080/N02:299 pu/<@http://localhost:8080/N02:1957 fileName: http://localhost:8080/N02 lineNumber: 331 columnNumber: 0: syntax error - Original JSON-text: html>
[/code]it's a mix because I have v2.4 of the part "WebApp_ID"/"VaadinScala" (I kept v2.4 instead of 3.0) and in the servlet I added the push configuration.
Should I use WebApp_ID instead of VaadinScala?