The ShowCaptionInStatusBarInterceptorFactory throws a NullPointerException when configured in the formComponentInterceptorFactory.
The reason is that the variable caption should be tested for Null in order to prevent the NPE. Alternatively I would be ok (prefer) if with an non-existing caption property the text "propertyName.caption" is returned.Code:private String getCaption( String propertyName ) { String caption = formModel.getFieldFace( propertyName ).getCaption(); if( caption.contains( ".caption" ) ) { // FIXME dirty hack, otherwise "propertyName.caption" is shown in the // status bar return null; } return caption; }
Configuring the ShowCaptionInStatusBarInterceptorFactory means that I intentionally want to have status bar messages and thus I should provide these properties anyway.
I have posted this as issue in JIRA but posting this here too for discussion of alternatively returning "propertyName.caption".
Is there a way to configure the property bundles components such that I can choose whether Null or "propertyName.caption" (i.e. the resource name) is returned (I believe the Struts framework provides such an option)?
Thanks
Martin


Reply With Quote