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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:53:00+00:00 2026-06-11T11:53:00+00:00

This is just a why is something weird happening question. I made a mistake

  • 0

This is just a why is something weird happening question.

I made a mistake and was supposed to use “cssClass” but typed “class” instead. However “class” is not defined as a property of the textarea tag so I expected the behaviour to be the same as the cssClass value (a non defined property should be rendered as is, and it does render the property but has a strange value and that value does not seem to be alterable. Any value I feed it is ignored and defaults to the class which backs the tag).

For instance if I define a “turkey” value I would expect a turkey value to be rendered in html and it is as we can see in the following example.

Here is what I used on the JSP:

<s:textarea turkey="" class="" name="qualLine.description" value="%{description}"/>

Here is what was rendered:

<textarea name="qualLine.description" cols="" rows="" id="cows" class="class java.util.HashMap" turkey="">test</textarea>

My question isn’t what should I do, because I should have used cssClass instead of class, my question is: Is this expected and why?

  • 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-11T11:53:01+00:00Added an answer on June 11, 2026 at 11:53 am

    Perhaps it is related to the Freemarker TemplateModel being used?

    In the dynamic-attributes.ftl, which is included from the textarea.ftl to resolve the dynamic attributes, the attribute value is first evaluated against the ValueStack using a StrutsUtil.translateVariables instance, which just uses a static call to the TestParseUtil.translateVariables. But when that doesn’t evaluate to anything (null or void), it then reverts to the attribute name – class.

    This value, “class”, is then evaluated as a Freemarker expression – ${class} – in the dynamic-attributes.ftl.

    The StrutsUtil is placed in the Freemarker template model from the FreemarkerManager which calls the ContextUtil to retrieve a map of Struts2 objects to place into the template model. This map that is placed in the TemplateModel is a HashMap (perhaps the culprit map?).

    So, this is obviously not a complete answer, so I don’t expect the “answer” to be accepted, but it was too much to place in a comment and it may help to shed some light. If I have time later in the week, I may pull down the Struts2 source and play with it to find the real answer. But more likely, I won’t take the time!

    Interesting question for sure, though.

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

Sidebar

Related Questions

This is probably a pretty basic question, but just something that I wanted to
OK, I realize that question might seem weird, but I just noticed something that
This is just a simple question. I've been reading the source of something which
Not sure if I've just missed something but this doesn't work: $(this).children('td.threadtitle a').html('thread title');
I am sure I am just missing something. But I have googled this for
I tried something like this but it just makes the background of the image
this is weird to me, it's got to be something obvious but when using
I just came across something pretty weird to me : when you use the
this seems straightforward enough, I don't know if it's a bug, or just something
Ok, I don't know if this is possible, just something wrong with my code...

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.