[英]Tapestry, determine if form has errors in tml
I have a text in a form that I want to hide if the form has errors and replace it with the error message. 我在表单中有一个文本,如果表单有错误,我想隐藏该文本,然后将其替换为错误消息。 How do i determine in the tml that the current form has an error? 我如何确定在tml中当前表格有错误?
Tx Tx
You can inject your form in your java with the @Component annotation, and use the getHasError method. 您可以使用@Component批注将表单注入Java,并使用getHasError方法。 Then you can use this result with the "if" component. 然后,可以将此结果与“ if”组件一起使用。
Manu 马努
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.