Tabnine Logo
ErrorsTag.setPath
Code IndexAdd Tabnine to your IDE (free)

How to use
setPath
method
in
org.springframework.web.servlet.tags.form.ErrorsTag

Best Java code snippets using org.springframework.web.servlet.tags.form.ErrorsTag.setPath (Showing top 6 results out of 315)

origin: spring-projects/spring-framework

@Override
@SuppressWarnings("serial")
protected void onSetUp() {
  this.tag = new ErrorsTag() {
    @Override
    protected TagWriter createTagWriter() {
      return new TagWriter(getWriter());
    }
  };
  this.tag.setPath("name");
  this.tag.setParent(getFormTag());
  this.tag.setPageContext(getPageContext());
}
origin: spring-projects/spring-framework

@Test
public void specificPathMatchesSpecificFieldOnly() throws Exception {
  this.tag.setPath("name");
  Errors errors = new BeanPropertyBindingResult(new TestBean(), "COMMAND_NAME");
  errors.reject("some.code", "object error");
  errors.rejectValue("name", "some.code", "field error");
  exposeBindingResult(errors);
  this.tag.doStartTag();
  assertNotNull(getPageContext().getAttribute(ErrorsTag.MESSAGES_ATTRIBUTE));
  this.tag.doEndTag();
  String output = getOutput();
  assertTrue(output.contains("id=\"name.errors\""));
  assertFalse(output.contains("object error"));
  assertTrue(output.contains("field error"));
}
origin: spring-projects/spring-framework

@Test
public void starMatchesAllErrors() throws Exception {
  this.tag.setPath("*");
  Errors errors = new BeanPropertyBindingResult(new TestBean(), "COMMAND_NAME");
  errors.reject("some.code", "object error");
  errors.rejectValue("name", "some.code", "field error");
  exposeBindingResult(errors);
  this.tag.doStartTag();
  assertNotNull(getPageContext().getAttribute(ErrorsTag.MESSAGES_ATTRIBUTE));
  this.tag.doEndTag();
  String output = getOutput();
  assertTrue(output.contains("id=\"testBean.errors\""));
  assertTrue(output.contains("object error"));
  assertTrue(output.contains("field error"));
}
origin: spring-projects/spring-framework

/**
 * https://jira.spring.io/browse/SPR-4005
 */
@Test
public void omittedPathMatchesObjectErrorsOnly() throws Exception {
  this.tag.setPath(null);
  Errors errors = new BeanPropertyBindingResult(new TestBean(), "COMMAND_NAME");
  errors.reject("some.code", "object error");
  errors.rejectValue("name", "some.code", "field error");
  exposeBindingResult(errors);
  this.tag.doStartTag();
  assertNotNull(getPageContext().getAttribute(ErrorsTag.MESSAGES_ATTRIBUTE));
  this.tag.doEndTag();
  String output = getOutput();
  assertTrue(output.contains("id=\"testBean.errors\""));
  assertTrue(output.contains("object error"));
  assertFalse(output.contains("field error"));
}
origin: org.metawidget.modules/metawidget-all

errorsTag.setPath( path );
origin: stackoverflow.com

errorsTag.setParent( this );
errorsTag.setPageContext( pageContext );
errorsTag.setPath( path );
errorsTag.doStartTag();
JspWriter out = pageContext.pushBody();
org.springframework.web.servlet.tags.formErrorsTagsetPath

Popular methods of ErrorsTag

  • getElement
    Get the HTML element must be used to render the error messages.
  • doEndTag
  • doStartTag
  • evaluate
  • getDelimiter
    Return the delimiter to be used between error messages.
  • getPropertyPath
  • setPageContext
  • writeDefaultAttributes
  • <init>
  • getBindStatus
  • getDisplayString
  • setBodyContent
  • getDisplayString,
  • setBodyContent,
  • setParent,
  • doAfterBody,
  • doFinally,
  • doInitBody,
  • release,
  • setCssClass,
  • setCssStyle

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • getSystemService (Context)
  • Kernel (java.awt.image)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JList (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now