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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:56:34+00:00 2026-05-28T17:56:34+00:00

In my Grails 2.0 the following GSP code works: <g:formatDate date=${merchantTrans.dateCreated} /> But the

  • 0

In my Grails 2.0 the following GSP code works:

 <g:formatDate date="${merchantTrans.dateCreated}" />

But the code

 <g:formatDate date="${fieldValue(bean: merchantTrans, field: 'dateCreated')}" />

causes the following error:

Stacktrace follows: Message: Unknown class: org.codehaus.groovy.grails.web.util.StreamCharBuffer

I tried different combos of single and double quotes but got the same error. This code worked in Grails 1.3.7, so ? There, I actually got away using double quotes on dateCreated as well as on date=”…”.

If you have a moment, can you please test a dateCreated field in one of your domain objects to see if you get the same thing. Perhaps I have some other update-to-Grails 2.0 problem that I’m unaware of?

In case it matters, I iterate over the merchantTrans objects as so:

<g:each in="${merchantTransactionInstanceList}" status="i" var="merchantTrans">

Thanks, Ray

  • 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-05-28T17:56:35+00:00Added an answer on May 28, 2026 at 5:56 pm

    No that’s no bug. The fieldValue tag converts the passed property to a String and also does a HTML encoding. This means the response cannot be formatted as a Date simply because its a String.

    Only your first snippet passes the raw date:

    <g:formatDate date="${merchantTrans.dateCreated}" />
    

    It it worked prior Grails 2.0 this may have been a defect.

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

Sidebar

Related Questions

Hi I have the following code in my grails gsp <form action=upload-script-url method=post enctype=multipart/form-data>
I'm trying to reduce some repetitive GSP code in my Grails app. The following
From the book Groovy and Grails recipes I'm using the following code snippet: String
I have some text area field in my grails application. I got the following
I face a problem using Grails 2 submitToRemote tag. The following code is what
I'm following Scott Davis' tutorials on developing grails apps, but whenever i try to
I have the following domain class in my grails project: class Vacation { Date
I have following code (in grails and Searchable Plugin aka Compass): class Topic {
The grails manual shows the following example: <g:set var=now value=${new Date()} scope=request /> and
Per this similar post , I tried the following but none-worked, with error noted

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.