本文整理匯總了Java中org.springframework.web.bind.WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX屬性的典型用法代碼示例。如果您正苦於以下問題:Java WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX屬性的具體用法?Java WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX怎麽用?Java WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.springframework.web.bind.WebDataBinder
的用法示例。
在下文中一共展示了WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: writeTagContent
@Override
protected int writeTagContent(TagWriter tagWriter) throws JspException {
super.writeTagContent(tagWriter);
if (!isDisabled()) {
// Write out the 'field was present' marker.
tagWriter.startTag("input");
tagWriter.writeAttribute("type", "hidden");
String name = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + getName();
tagWriter.writeAttribute("name", name);
tagWriter.writeAttribute("value", processFieldValue(name, "on", getInputType()));
tagWriter.endTag();
}
return SKIP_BODY;
}
示例2: writeHiddenTagIfNecessary
/**
* If using a multi-select, a hidden element is needed to make sure all
* items are correctly unselected on the server-side in response to a
* {@code null} post.
*/
private void writeHiddenTagIfNecessary(TagWriter tagWriter) throws JspException {
if (isMultiple()) {
tagWriter.startTag("input");
tagWriter.writeAttribute("type", "hidden");
String name = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + getName();
tagWriter.writeAttribute("name", name);
tagWriter.writeAttribute("value", processFieldValue(name, "1", "hidden"));
tagWriter.endTag();
}
}