Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:03:11+00:00 2026-06-05T22:03:11+00:00

Since Intellij does not yet support the Play-Scala-Template-Engine I was thinking about using plain

  • 0

Since Intellij does not yet support the Play-Scala-Template-Engine I was thinking about using plain Scala for the time being, since having no code-completion, import help really slows my development down.

Is it possible to use plain Scala, not the @-ish wrapper, as a template-engine in Play 2.0? I guess that I could simply return ok(Htmp.apply("fooo")) from my (java) controllers and construct view-generating static methods in scala as my pseudo-templates, but I would like the overall structure of the project to similar to the “original”.

To illustrate:

a normal template for my Meetings-Controller would be stored in

/app/views/Meetings/list.scala.html

and look something akin to this:

@(currentUser: User, meetings: Set[Meeting])

@main("Possible Meeting Dates") {
 @for(meeting <- meetings){
  "do fancy layout"
 }
}

I would want the whole thing to be stored under

/app/views/Meetings/list.scala

and contain something akin to this:

import play.api.templates._

def render(user: User, meetings:Set[Meeting]): Html = {
  Html("doing the layout here")
}

So my IDE gets that this is Scala and helps accordingly. Doing the latter whilst renaming the file to list.scala.html does not quite work: play compile causes some reference to be generated. I am able to call

views.html.Meetings.list.render()

like expected, but it does not take any parameters.

Do I need to adhere to a certain signature for the compiler-magic to work, or does this whole Idea simply not work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:03:13+00:00Added an answer on June 5, 2026 at 10:03 pm

    I tried a very personal solutions. Reported (but not liked 🙁 ) here :

    https://stackoverflow.com/questions/7731573/how-would-you-improve-this-scala-basic-xml-template

    Hope that can of an help…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[I've decided to give IntelliJ another go (to replace Eclipse), since its Groovy support
Since Javascript does not have any functionality by itself to communicate over raw sockets
I am using a Scala compilation server. This is probably not related to my
Since the membership provider does not allow me to add additional fields for a
since memcpy should be highly optimized nowadays, does it still make sense to optimize
Since regular jQuery animations are not fluent on iOS ( .hide() , slideDown() ),
Does Intellij have any way of customizing the filtering the methods that are displayed
I've been using Eclipse since 2.x and IDEs in general for over 20 years
Scala 2.8.1 I have implemented a very simple external DSL using parser/combinators for QA
The IntelliJ Groovy/Grails support in IntelliJ IDEA 8.1 is great. However, I've recently upgraded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.