Play Framework 2.0, Scala define input type and print a list -


I am using Play Framework 2.0, I am trying to print a table, and the types of my data Based on this, my program input will be different. I have already figured out how to use the class of instanceoff in my input, but when I do it on the list, it gives returns:

  Non-variable type logic models Type in message in Java   

Below is my code:

  @ (title: string) () content: object) & lt; Tr & gt; & Lt; TD & gt; @ Title & lt; / TD & gt; @if (content.isInstanceOf [date]) {& lt; Td> @ Content.asInstanceOf [date]. Format ("yyyy-MM-dd") & lt; / Td> } And {@if (content.isInstanceOf [list [medicine]]) {& lt; Td> & Lt; Table & gt; For @ (a & lt; - content) {@ a.name & lt; Br> } & Lt; / Table & gt; & Lt; TD & gt; } Other {& lt; Td> @ Content & lt; / Td> }}   

Please help ...

I do not think the warning is blocking compilation, it can obscure the actual compilation error. If in the examination (the warning should be removed)

Try content.isInstanceOf [java.util.List [_]] .

For this you inserted content: for (a & lt; - content.asInstanceOf [java.util.List [medicine]]) In Expression for

I am not sure how it is possible to know that a fully qualified name can be helpful from Java's list versus the list .

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -