Hi
I have a weird problem - I have a bean with a 'firstName' property backed by a String field. However, since I want to do some processing of the string both on input and display, I have mirrored the getters and setters to create a virtual 'firstNameDisplay' property:
However, when I try to use 'spring:bind path="item.firstNameDisplay"' I get the following error:Code:public String getFirstName() { return firstName; } public String getFirstNameDisplay(){ return replaceWildcardForDisplay(firstName); } public void setFirstName(String firstName) { this.firstName = firstName; } public void setFirstNameDisplay(String firstNameDisplay){ setFirstName(replaceWildcardForDB(firstNameDisplay)); }Is this because it is a virtual field or is there some other problem I'm missing? I realise I could also do this with a PropertyEditor during binding, but this way seemed quicker to me initially...Code:org.springframework.context.NoSuchMessageException: No message found under code 'methodInvocation.item.firstNameDisplay' for locale 'en_US'. at org.springframework.context.support.DelegatingMessageSource.getMessage(DelegatingMessageSource.java:73) at org.springframework.context.support.DelegatingMessageSource.getMessage(DelegatingMessageSource.java:68) at org.springframework.context.support.AbstractApplicationContext.getMessage(AbstractApplicationContext.java:594) at org.springframework.web.servlet.support.RequestContext.getMessage(RequestContext.java:492) at org.springframework.web.servlet.support.BindStatus.getErrorMessages(BindStatus.java:171) at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:128) at org.springframework.web.servlet.tags.BindStatus.<init>(BindStatus.java:38) at org.springframework.web.servlet.tags.BindTag.doStartTagInternal(BindTag.java:105) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:70) at org.apache.jsp.WEB_002dINF.jsp.cma.searchUsers_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.cma.searchUsers_jsp:111)


Reply With Quote
).