Questions tagged [playscalajs]

12 questions
3
votes
1 answer

In Scala, how to write an efficient json formatter for Map[IndexedSeq[String], Int]?

I think there is not a default format for Map[IndexedSeq[String], Int] in scala (right?) So I've written my own format as follows, however it's very slow. Is there a better way to do this? class IndexedSeqToIntMapFormat() extends…
user1819676
  • 369
  • 1
  • 12
2
votes
1 answer

ScalaJS fullLinkJS errors

I upgraded my Play+ScalaJS project from ScalaJS 0.6.32 to 1.4.0 several weeks ago. All has been working fine in development. Today I tried to deploy it and thus executed fullLinkJS for the first time. It generated a number of errors: sbt:browser>…
bwbecker
  • 1,031
  • 9
  • 21
2
votes
1 answer

ScalaJs With Play Framework (Error in Tests)

I am trying to use ScalaJs cross build project with Play Framework 2.5. I am facing a problem when I am trying to run the tests for Client.scala . The error I am getting is - caused by: TypeError: Cannot call method "appendChild" of null . Client…
1
vote
0 answers

ScalaJs Test with utest

I am working on a cross built ScalaJs project and have written ScalaJs Tests using utest. It was initially working fine and test cases did compile and gave result but now I am suddenly getting the below mentioned error. Please tell me as to what may…
1
vote
1 answer

Scoverage with ScalaJs Cross Build Project on Play Framework

I am working on a ScalaJs cross build application on Play Framework and want to use scoverage to check the coverage but I get linking errors. I went through some materials online and the information there seems to suggest that as of now it may not…
1
vote
0 answers

ScalaJS: how to parse ajax response from JSON to a case class

I'm trying ScalaJS with Play! Scala 2.4 and the serialization library for Scala uPickle. I don't manage to parse the return of an AJAX call. Here is my case class: @JSExportAll case class Room(id: String, name: String, presentation: String, images:…
Simon
  • 6,025
  • 7
  • 46
  • 98
1
vote
1 answer

PlayScalaJS with bootstrap not working

I recently came across the fact that the imports of bootstrap were not accessible in my code. Namely, the plugin alert for jQuery was not available within my code (jQuery.fn.alert was undefined). I had in the header:
Mikaël Mayer
  • 10,425
  • 6
  • 64
  • 101
0
votes
0 answers

Getting build artifacts in right folder when using sbt-web-scalajs

I have a ScalaJS + Play project with an SBT build file, and am using amongst others the plugin sbt-web-scalajs. There is a total of 4 subprojects in my build.sbt. Here's the beginning of that file: import sbt.Keys.libraryDependencies val…
nondeterministic
  • 501
  • 5
  • 17
0
votes
1 answer

converting from Java script Json to Scala Json without eleminating field name for update operation

I use a function to convert from a json information sent from the front end: def convertFromJson(json: JsValue): Item = { Item( (json \ "id").asOpt[String], (json \ "name").asOpt[String], (json \ "project").asOpt[String], (json \…
Jose Cabrera Zuniga
  • 2,348
  • 3
  • 31
  • 56
0
votes
1 answer

adding list's elements respect to a field of the elements in Scala

In Scala I have the next command: lPServ <- Pservs.getAll(.....some logical condition.....) each element of lPserv has a "price" and "quantity" fields. For this list, I need to get the total of adding each e.price * e.quantity where e…
Jose Cabrera Zuniga
  • 2,348
  • 3
  • 31
  • 56
0
votes
1 answer

Scala play api for JSON - getting Array of some case class from stringified JSON?

From our code, we call some service and get back stringified JSON as a result. The stringified JSON is of an array of "SomeItem", which just has four fields in it - 3 Longs and 1 String…
CustardBun
  • 3,457
  • 8
  • 39
  • 65
0
votes
1 answer

Soda Date Time with scalajs: type DateTime is not a member of package org.joda

I'm trying to use soda date time in my Play! scalajs application. Soda date time is imported (without any error) on the client side with "org.mdedetrich" %%% "soda-time" % "0.0.1-SNAPSHOT" But when I try to use it, simply like this: val dateTime…
Simon
  • 6,025
  • 7
  • 46
  • 98