1
<h:outputText fantasyattribute="shouldRaiseError" value="#{elcondition}" />

How can I configure IntelliJ to provide an error or a warning on fantasyattribute in the above example? This attribute is not registered in the VDL of the <h:outputText> tag.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Delayer
  • 409
  • 1
  • 5
  • 17
  • JSF tags are defined by a specific taglib for instance If I keep ctrl pressed on outputText, I got this spec from Intellij outputText Converter instance registered with this component. converter false javax.faces.convert.Converter ... continue ... JSF 2.2.14, Intellij 2019.3.3 More at https://www.tutorialspoint.com/jsf/jsf_custom_tag.htm – Delayer Apr 14 '20 at 08:24
  • 1
    Hi @Kukeltje what I'm looking for is this, in example you see outputText, fantasy attribute is not allowed in the taglib relative to outputText. So the relative taglib in this context is JSF/lib/jsf-support.jar!/resources/schemas/html_basic.taglib.xml in the http://java.sun.com/jsf/html namespace. Isn't there any way on intellij to raise a warning if I use "fantasyattribute" like in that case? That would be nice if applies to all the components, with custom taglib i.j. should raise a warn if I put an attribute on a component that doesn't exists. But... I'm not able to find it in intelij – Delayer Apr 14 '20 at 09:33
  • What is the 'taglib relative to outputText' ??? Or do you actually mean **RELATED** to outputtext? That would be waaaay more logical. Two things.... With JSF 2.2.x you should use other namespaces, see https://stackoverflow.com/questions/31068678/which-xml-namespace-to-use-with-jsf-2-2-and-up 2: jsf-support.jar does not sound like a well known jar file for existing JSF implementations... – Kukeltje Apr 14 '20 at 09:50
  • Ops... false friend for my language, related is right – Delayer Apr 14 '20 at 10:10
  • Anyway, just tried to change the namespace to http://xmlns.jcp.org/jsf/core and nothing changes, wrong attributes are not inspected and reported :( – Delayer Apr 14 '20 at 10:14
  • 3
    This is because standard XML supports ALL attributes. Of course, an IDE should be able to be configured to behave otherwise. This is a valid question, I've only improved the bad English. – BalusC Apr 14 '20 at 10:16
  • yes... that's a specialization of xml (xhtml), that is used for a purpose and tag are usefull only if existing behavior is match. So Intellij doesn't have this feature like all the others editors? (I.e. Netbeans) Edit. I see your edit @BalusC thanks for your edits in the title – Delayer Apr 14 '20 at 10:17
  • I have no idea. I don't use IntelliJ. – BalusC Apr 14 '20 at 10:45

0 Answers0