2015-06-06 12 views
1

我尝试创建自己的taglib,它扩展了现有的taglib:来自liferay-ui的input-asset-links。因此,我创建文件的Liferay-UI-ext.tld在WEB-INF/TLD我-EXT-网蒙山此xml:在添加自己的taglib之后,在视图中发生错误

<taglib 
    version="2.1" 
    xmlns="http://java.sun.com/xml/ns/j2ee" 
    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-jsptaglibrary_2_1.xsd" 
    > 
<description>Provides the Liferay UI component tags, prefixed with <![CDATA[<code>liferay-ui:</code>]]>. 
</description> 
<tlib-version>1.0</tlib-version> 
<short-name>liferay-ui-ext</short-name> 
<uri>http://liferay.com/tld/ui-ext</uri> 
<tag> 
    <name>input-asset-links-with-order</name> 
    <tag-class>com.liferay.taglib.ui.InputAssetLinksTagWithOrder</tag-class> 
    <body-content>JSP</body-content> 
    <attribute> 
     <name>assetEntryId</name> 
     <required>false</required> 
     <rtexprvalue>true</rtexprvalue> 
    </attribute> 
    <attribute> 
     <name>className</name> 
     <required>false</required> 
     <rtexprvalue>true</rtexprvalue> 
    </attribute> 
    <attribute> 
     <name>classPK</name> 
     <required>false</required> 
     <rtexprvalue>true</rtexprvalue> 
    </attribute> 
    <attribute> 
     <name>orderable</name> 
     <required>false</required> 
     <rtexprvalue>true</rtexprvalue> 
    </attribute> 
</tag> 

我还添加了在web.xml这段代码:

<jsp-config> 
    <taglib> 
     <taglib-uri>http://liferay.com/tld/ui-ext</taglib-uri> 
     <taglib-location>path-to-file-with-tld/taglib-location> 
    </taglib> 
</jsp-config> 

最后我写了我自己的InputAssetLinksTagExt类,它扩展了my-ext-impl中的InputAssetLinksTag。

之后,我部署了一个ext插件。我打开浏览器控制面板,在那里我想添加新的文章(JournalArticle)。而我得到这个错误:

13:32:41,978 ERROR [http-bio-8080-exec-14][IncludeTag:129] Current URL /group/control_panel/manage?p_p_auth=LfoI5AiI&p_p_id=15&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10182&refererPlid=10648&controlPanelCategory=current_site.content&_15_struts_action=%2Fjournal%2Fedit_article&_15_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_auth%3DLfoI5AiI%26p_p_id%3D15%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26doAsGroupId%3D10182%26refererPlid%3D10648%26controlPanelCategory%3Dcurrent_site.content&_15_groupId=10182&_15_folderId=0&_15_articleId=10659&_15_status=-1 generates exception: /html/portlet/journal/article/content.jsp (line: 474, column: 5) Unable to find setter method for attribute: checkRequired org.apache.jasper.JasperException: /html/portlet/journal/article/content.jsp (line: 474, column: 5) Unable to find setter method for attribute: checkRequired at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:149) at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2868) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:3092) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2262) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1757) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1773) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1773) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434) at org.apache.jasper.compiler.Node$Root.accept(Node.java:475)

我没有改变任何东西。当我尝试访问控制面板中的网站页面时,会发生同样的情况。我有这个错误:

13:48:19,661 ERROR [http-bio-8080-exec-22][IncludeTag:129] Current URL /group/control_panel?refererPlid=10648&doAsGroupId=10182&controlPanelCategory=current_site.pages&p_p_id=156 generates exception: /html/portlet/layouts_admin/view.jsp (line: 98, column: 2) Unable to find setter method for attribute: displayStyle org.apache.jasper.JasperException: /html/portlet/layouts_admin/view.jsp (line: 98, column: 2) Unable to find setter method for attribute: displayStyle at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443)

我使用liferay 6.2 GA3 CE和JDK 1.7。

我想念什么?

回答

0

我很愚蠢......我没有注意到在pom.xml中的ext-plugin中我有错误版本的taglib。上帝会审判我......

相关问题