Java Code Examples for org.springframework.web.servlet.support.BindStatus#getEditor()

The following examples show how to use org.springframework.web.servlet.support.BindStatus#getEditor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SelectTag.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * Returns '{@code true}' if the bound value requires the
 * resultant '{@code select}' tag to be multi-select.
 */
private boolean forceMultiple() throws JspException {
	BindStatus bindStatus = getBindStatus();
	Class<?> valueType = bindStatus.getValueType();
	if (valueType != null && typeRequiresMultiple(valueType)) {
		return true;
	}
	else if (bindStatus.getEditor() != null) {
		Object editorValue = bindStatus.getEditor().getValue();
		if (editorValue != null && typeRequiresMultiple(editorValue.getClass())) {
			return true;
		}
	}
	return false;
}
 
Example 2
Source File: SelectTag.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * Returns '{@code true}' if the bound value requires the
 * resultant '{@code select}' tag to be multi-select.
 */
private boolean forceMultiple() throws JspException {
	BindStatus bindStatus = getBindStatus();
	Class<?> valueType = bindStatus.getValueType();
	if (valueType != null && typeRequiresMultiple(valueType)) {
		return true;
	}
	else if (bindStatus.getEditor() != null) {
		Object editorValue = bindStatus.getEditor().getValue();
		if (editorValue != null && typeRequiresMultiple(editorValue.getClass())) {
			return true;
		}
	}
	return false;
}
 
Example 3
Source File: SelectTag.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns '{@code true}' if the bound value requires the
 * resultant '{@code select}' tag to be multi-select.
 */
private boolean forceMultiple() throws JspException {
	BindStatus bindStatus = getBindStatus();
	Class<?> valueType = bindStatus.getValueType();
	if (valueType != null && typeRequiresMultiple(valueType)) {
		return true;
	}
	else if (bindStatus.getEditor() != null) {
		Object editorValue = bindStatus.getEditor().getValue();
		if (editorValue != null && typeRequiresMultiple(editorValue.getClass())) {
			return true;
		}
	}
	return false;
}
 
Example 4
Source File: SelectTag.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * Returns '{@code true}' if the bound value requires the
 * resultant '{@code select}' tag to be multi-select.
 */
private boolean forceMultiple() throws JspException {
	BindStatus bindStatus = getBindStatus();
	Class<?> valueType = bindStatus.getValueType();
	if (valueType != null && typeRequiresMultiple(valueType)) {
		return true;
	}
	else if (bindStatus.getEditor() != null) {
		Object editorValue = bindStatus.getEditor().getValue();
		if (editorValue != null && typeRequiresMultiple(editorValue.getClass())) {
			return true;
		}
	}
	return false;
}