Announcement Announcement Module
No announcement yet.
when is getAsText() called? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • when is getAsText() called?

    After studying the code, it seems getAsText() is only called when there is a binding error. Is this true? I saw similar posts before but never got a clear understanding about how it works.
    Yet the Pro Java Development with Spring book, chapter 13, seems to suggest that the property editor hence the getAsText() will always be called within the <spring:bind>.

  • #2
    Does anybody has any idea? Thanks!


    • #3
      After plugging my head into the source code more, i figured out that the setAsText() will be called if there is an Error *instance* even there is no error.
      Thanks for your attention.


      • #4
        Ok, here is another twist.
        On Page 500, Pro Java Development With Spring book, it saids:
        "status.value": returns the value of the property (not transformed by any property editor....).
        "status.displayValue: returns the value of the original property, already transformed....

        I wonder the above staement is simply not true. Based on my previous posts, status.value always has the value Transformed. The code shows that status.displayValue just return the string is staus.value is a String and the toString() value if it's not so no property editor is involved with the displayValue.

        Can anyone verify this? thanks!