Search code examples
grailsjodatimegsp

Unable to resolve class LocalTime grails


I need realize a time input in my Grails application. I've downloaded joda-plugin for it. But when I want test it, writing a such string from doc example: <joda:timePicker name="myTime" value="${new LocalTime()}" precision="second" />, I get such error: Unable to resolve class LocalTime How to fix it?


Solution

  • You need to import the class in your GSP to be able to use it.

    Add

    <%@ page import="org.joda.time.LocalTime" %>
    

    at the top of your page.

    Alternatively, use a fully qualified class reference in your <joda:timePicker> tag.