简体   繁体   English

如何使用IntelliJ验证XHTML页面上的JSF错误?

[英]How to validate JSF errors on XHTML pages with IntelliJ?

i just installed IntelliJ and created a web project with JSF. 我刚刚安装了IntelliJ,并使用JSF创建了一个Web项目。 I created a xhtml page and a managed bean. 我创建了一个xhtml页面和一个托管bean。 In my managed bean i have a method: 在我的托管bean中,我有一个方法:

public void doSomething(int x){}

Then, in my xhtml: 然后,在我的xhtml中:

<h:commandButton value="Do it!" action="#{myManagedBean.doSomething()}"/>

As you noticed, my method requires an integer parameter, but when i called it i passed no parameters. 如您所见,我的方法需要一个整数参数,但是当我调用它时,我没有传递任何参数。 It should show an error on this line but it does not. 它应该在此行显示错误,但不会。 It only shows an error if i do a "Ctrl+Click" above the doSomething() statement. 如果我在doSomething()语句上方执行“ Ctrl + Click”,它只会显示错误。 But it does not highlight the error or anything like that. 但是它不会突出显示错误或类似的东西。

How can i change it do behave like eclipse or netbeans, where it shows a big error on the file name and on the line where the error happened? 我如何更改它的行为就像eclipse或netbeans,它们在文件名和发生错误的行上显示一个大错误?

Intellij highlight errors in expression language. Intellij突出显示表达语言中的错误。 but Intellij Idea 13 JSF support is not very stable yet. 但是Intellij Idea 13对JSF的支持还不是很稳定。 you can see some problems with highlights in JSF pages. 您会在JSF页面中看到一些突出显示的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM