snowindy opened a new issue, #14242:
URL: https://github.com/apache/grails-core/issues/14242

   Hello I have domains like this:
   
   ```
   Charge{
       BudgetIndex budgetIndex
   }
   BudgetIndex{
       PaymentEnumType paymentType
   }
   ```
   
   page edit.gsp for Charge contains
   
   ```
   <f:all bean="chargeInstance"/>
   ```
   
   /_field/budgetIndex/_input.gsp contains
   
   ```
   <f:all bean="${value}"/>
   ```
   
   When I enter /charge/edit/1
   I see that labels for bean budgetIndex are defaults, not the ones I 
specified in message.properties.
   
   Digging into the problem shows that this is because label is resolved with 
incorrect code
   
   ```
   budgetIndex_$$_javassist_10.paymentType.label
   ```
   
   The message code should have been:
   
   ```
   budgetIndex.paymentType.label
   ```
   
   Again, this is because of hibernate proxy objects.
   
   To see the code I added println here:
   
   ```
   private String resolveMessage(List<String> keysInPreferenceOrder, String 
defaultMessage) {
       def message = keysInPreferenceOrder.findResult { key ->
           println "key = $key"
           message(code: key, default: null) ?: null
       }
       message ?: defaultMessage
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to