1
votes

I try to create own taglib, which extends an existing one: input-asset-links from liferay-ui. So I created file liferay-ui-ext.tld in WEB-INF/tld in my-ext-web whith this xml:

<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>

I added also in web.xml this code:

  <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>

and finally I wrote my own class InputAssetLinksTagExt, which extends InputAssetLinksTag in my-ext-impl.

After that I deployed an ext-plugin. I open in browser control panel, where I wanted to add new article (JournalArticle). And than I got this error:

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)

I didn't change anything else. The same situation occurs when I try to access site pages in control panel. There I have this error:

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)

I use liferay 6.2 GA3 CE and JDK 1.7.

Do I miss something?

1

1 Answers

0
votes

I'm so stupid... I didn't notice that in ext-plugin in pom.xml I have wrong version of taglib. God will judge me...