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 8278733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:06:38+00:00 2026-06-08T09:06:38+00:00

This is my Application.Scala package controllers import play.api._ import play.api.data.Form import play.api.mvc._ import _root_.scala.xml.Text

  • 0

This is my Application.Scala

package controllers

import play.api._
import play.api.data.Form
import play.api.mvc._



import _root_.scala.xml.Text


object Application extends Controller {

  def index = Action {
    Redirect(routes.Application.tasks)
  }


  def deleteTask(id: Long) = TODO

  val taskForm = Form(
  "label" -> nonEmptyText
)
def tasks = Action {
  Ok(views.html.index(Task.all(), taskForm))
}

  def newTask = Action { implicit request =>
  taskForm.bindFromRequest.fold(
    errors => BadRequest(views.html.index(Task.all(), errors)),
    label => {
      Task.create(label)
      Redirect(routes.Application.tasks)
    }
  )
}
}

I’m using play 2.0 framework. Where am I going wrong to get such an error?

  • 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-08T09:06:39+00:00Added an answer on June 8, 2026 at 9:06 am

    You can browse Play 2 docs here. By looking at the index I found that nonEmptyText is contained in play.api.data.Forms object.

    So, you need to either add import play.api.data.Forms._ as already suggested or replace the current not found symbol with Forms.nonEmptyText since it’s already imported.

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

Sidebar

Related Questions

I have to use scala parser inside Play Framework application. import scala.tools.nsc._ trait Foo
I have this scala application which is very simple . All that it does
My application structure is like this: application modules default student controllers forms studentParent.php models
Like in the basic hello world Play! app, you can do: object Application extends
Can you tell me, if this is possible, how to export a Scala application
I'm using Scala 2.8 and defining an Enumeration like this: object Stooges extends Enumeration
I have an SBT scala application that runs fine using sbt run. However, this
For learning purposes I'm trying to implement a simple play application that gets data
A Scala application does some data processing. It would be nice to show processing
This application is using windows integrated authentication in IIS. No anonymous login. It's also

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.