I have a utility file utils.scala.html that looks like this:
@renderTableRow(columnTag: String, columns: Seq[String]) = {
<tr>
@for(column <- columns) {
<@columnTag>
@column
</@columnTag>
}
</tr>
}
I want to call this helper function from the rest of my view files to create table headers.
@import views.html.mycommon.utils
@renderQuotesTable() = {
<table class="table table-bordered table-striped">
<thead>
@utils.renderTableRow("th", Seq("Name", "Date of Birth", "Age"))
</thead>
<tbody>
</tbody>
}
But I get the following error message
The renderTableRow value is not a member of the views.html.mycommon.utils object.
What am I missing here?
source
share