Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Kommentar: Migrated to Confluence 5.3


If you want to add your own error object anytime through the Java API, just instantiate an UserError object and add it to the ErrorController. Be sure you also implement the inverse action to remove the error again.
Image Removed

Hinweis
See class com.jaxfront.demo.api.AddUserError


Codeblock
themeEclipse
languagejava
linenumberstrue
public class AddUserError implements Action {

...

 
public void perform(Type target) {

...

 
Error myError = new UserError("test-identifier", target, "message",Error.CLASSIFICATION_WARNING);

...


target.getDOM().getController().getErrorController().addError(myError);

...

 
}
} 
Hinweis
See class com.jaxfront.demo.api.RemoveUserError
Codeblock
themeEclipse
languagejava
linenumberstrue
public class RemoveUserError implements Action {

...

 
public void perform(Type target) {

...


target.getDOM().getController().getErrorController().removeUserError("test-identifier", target);

...


}

...


}