Announcement Announcement Module
Collapse
No announcement yet.
transient field property Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • transient field property

    Hi,

    In my entity class I have declared a transient field and created getter/setter methods. Based on a property of entity class, I have to populate the transient field value. As @Formula annotation is not working for me, I have to modify the getter method by calling a sql statement.

    I am getting the value as per my desire, how ever my getter method is called 6times while show.jspx is called. All I can say is I have 6 fields defined in my entity class.

    Why my getter method is called multiple times? Any help is highly appreciated.

    Thanks,

  • #2
    Hi,

    Please help me in understanding why the getter method is called multiple times. Also, how do I use init method using annotations? Will that solve this problem?

    Thanks,
    Gupta

    Comment


    • #3
      Hi Gupta,

      The problem is that the Spring MVC EL integration uses the toString() method on your type quite frequently. Normally this has no major impact on your application but since you are calling DB functionality from your accessor it becomes a problem. The solution is to push in the toString() method into the .java source and remove the getXX() call from it. Alternatively you can remove the @RooToString annotation from the type.

      Comment

      Working...
      X