我尝试更新 maven 项目,但在 .taglib.xml 文件中出现错误。在 Windows 计算机中不会出现此错误,但它发生在我的 macbook 中。请看下图。
taglib.xml 文件中的这段代码。
<?xml version="1.0" encoding="UTF-8"?>
<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
version="2.0">
<namespace>http://primefaces.org/babylon</namespace>
<tag>
<description><![CDATA[Menu is a navigation component for Babylon Layout.]]></description>
<tag-name>menu</tag-name>
<component>
<component-type>org.primefaces.component.BabylonMenu</component-type>
<renderer-type>org.primefaces.component.BabylonMenuRenderer</renderer-type>
</component>
<attribute>
<description><![CDATA[Unique identifier of the component in a namingContainer.]]></description>
<name>id</name>
<required>false</required>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[Boolean value to specify the rendering of the component, when set to false component will not be rendered.]]></description>
<name>rendered</name>
<required>false</required>
<type>java.lang.Boolean</type>
</attribute>
<attribute>
<description><![CDATA[An el expression referring to a server side UIComponent instance in a backing bean.]]></description>
<name>binding</name>
<required>false</required>
<type>javax.faces.component.UIComponent</type>
</attribute>
<attribute>
<description><![CDATA[Name of the client side widget.]]></description>
<name>widgetVar</name>
<required>false</required>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[A menu model instance to create menu programmatically.]]></description>
<name>model</name>
<required>false</required>
<type>org.primefaces.model.menu.MenuModel</type>
</attribute>
<attribute>
<description><![CDATA[Inline style of the main container element.]]></description>
<name>style</name>
<required>false</required>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[Style class of the main container element.]]></description>
<name>styleClass</name>
<required>false</required>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[Whether the orientation of the menu is horizontal.]]></description>
<name>horizontal</name>
<required>false</required>
<type>java.lang.Boolean</type>
</attribute>
<attribute>
<description><![CDATA[When enabled, scroll state is saved in a cookie for the session. Default is true.]]></description>
<name>statefulScroll</name>
<required>false</required>
<type>java.lang.Boolean</type>
<defaultValue>true</defaultValue>
</attribute>
</tag>
</facelet-taglib>
我不确定父项目的 pom.xml 中依赖项的库是否未添加到子项目中?
答案 0 :(得分:1)
我想您会发现 defaultValue
不允许出现在那里。我不确定它是否已声明。如果您将鼠标悬停在“属性”标签的名称上,悬停信息将显示那里的合法内容。您必须将其删除,当您希望 statefulScroll
为 true
时,请将其设置为这样。