We use Wicket as our front end framework and until now our application is pure Java. However, I would like to start using a bit of Scala on some of our new classes. The old code would stay in Java.
After installing the maven-scala-plugin, scala-library, scalatest dependencies and downloading them I had to face the problem that I do not know how to mix Scala with Java in Wicket. Until now I have only seen tutorials about either pure Java or pure Scala projects in Wicket.
In the extended class of WebApplication you have something such as
public Class<? extends Page> getHomePage() {
return HomePage.class;
}
and if you are using Scala you would have something such as
def getHomePage = classOf[HomePage]
If I have a Scala class called HomePageScala.scala how can I call it from the java code?
How can I create a BookmarkablePageLink using Java code calling a Scala class? e.g
add(new BookmarkablePageLink<HomePageScala>("homePageScala", HomePageScala.class));
Is this actually even possible or do I have to use either 100% java or 100% scala?
Thank you very much in advance!