swf 962, svn 961, svn 960
This commit is contained in:
@@ -51,7 +51,8 @@ public abstract class AbstractMappingResult implements MappingResult {
|
||||
public abstract Object getMappedValue();
|
||||
|
||||
public String toString() {
|
||||
ToStringCreator creator = new ToStringCreator(this).append("code", getCode()).append("error", isError());
|
||||
ToStringCreator creator = new ToStringCreator(this).append("mapping", mapping).append("code", getCode())
|
||||
.append("error", isError());
|
||||
if (isError()) {
|
||||
creator.append("errorCause", getErrorCause());
|
||||
}
|
||||
|
||||
@@ -81,13 +81,11 @@
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : 'smoking',
|
||||
widgetType : "dijit.form.RadioButton",
|
||||
widgetModule : "dijit.form.CheckBox",
|
||||
widgetAttrs : { value : true }}));
|
||||
widgetModule : "dijit.form.CheckBox"}));
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : 'non-smoking',
|
||||
widgetType : "dijit.form.RadioButton",
|
||||
widgetModule : "dijit.form.CheckBox",
|
||||
widgetAttrs : { value : false }}));
|
||||
widgetModule : "dijit.form.CheckBox"}));
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -203,8 +203,10 @@ public abstract class AbstractMvcView implements View {
|
||||
validate(model);
|
||||
}
|
||||
}
|
||||
requestContext.getFlashScope().put(ViewActionStateHolder.KEY,
|
||||
new ViewActionStateHolder(eventId, mappingResults));
|
||||
if (mappingResults != null && mappingResults.hasErrorResults()) {
|
||||
requestContext.getFlashScope().put(ViewActionStateHolder.KEY,
|
||||
new ViewActionStateHolder(eventId, mappingResults));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasFlowEvent() {
|
||||
|
||||
@@ -199,7 +199,7 @@ public class BindingModel extends AbstractErrors {
|
||||
}
|
||||
|
||||
public boolean test(MappingResult result) {
|
||||
if (field.equals(result.getMapping().getTargetExpression().getExpressionString())) {
|
||||
if (result.isError() && field.equals(result.getMapping().getTargetExpression().getExpressionString())) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PortletMvcViewTests extends TestCase {
|
||||
public void testResumeEvent() throws Exception {
|
||||
MockRequestContext context = new MockRequestContext();
|
||||
context.putRequestParameter("_eventId", "submit");
|
||||
context.putRequestParameter("booleanProperty", "true");
|
||||
context.putRequestParameter("booleanProperty", "bogus");
|
||||
context.putRequestParameter("_booleanProperty", "whatever");
|
||||
BindBean bindBean = new BindBean();
|
||||
StaticExpression modelObject = new StaticExpression(bindBean);
|
||||
|
||||
Reference in New Issue
Block a user