presentation model binder
This commit is contained in:
parent
8709959a98
commit
de5528840d
|
|
@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
|||
* @see #setRequiredFields(String[])
|
||||
* @see #bind(Map)
|
||||
*/
|
||||
public class GenericBinder implements Binder {
|
||||
public class PresentationModelBinder implements Binder {
|
||||
|
||||
private PresentationModel presentationModel;
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ public class GenericBinder implements Binder {
|
|||
|
||||
private MessageSource messageSource;
|
||||
|
||||
public GenericBinder(PresentationModel presentationModel) {
|
||||
public PresentationModelBinder(PresentationModel presentationModel) {
|
||||
Assert.notNull(presentationModel, "The PresentationModel is required");
|
||||
this.presentationModel = presentationModel;
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ import org.springframework.ui.binding.PresentationModel;
|
|||
* @see #setDefaultPrefix(String)
|
||||
* @see #setPresentPrefix(String)
|
||||
*/
|
||||
public class WebBinder extends GenericBinder {
|
||||
public class WebBinder extends PresentationModelBinder {
|
||||
|
||||
private String defaultPrefix = "!";
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import org.springframework.ui.message.MockMessageSource;
|
|||
|
||||
public class GenericBinderTests {
|
||||
|
||||
private GenericBinder binder;
|
||||
private PresentationModelBinder binder;
|
||||
|
||||
private DefaultPresentationModel presentationModel;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ public class GenericBinderTests {
|
|||
public void setUp() {
|
||||
bean = new TestBean();
|
||||
presentationModel = new DefaultPresentationModel(bean);
|
||||
binder = new GenericBinder(presentationModel);
|
||||
binder = new PresentationModelBinder(presentationModel);
|
||||
LocaleContextHolder.setLocale(Locale.US);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue