当前位置: 首页 > 知识库问答 >
问题:

添加自己的taglib后,视图中出现错误

经福
2023-03-14

我尝试创建自己的taglib,它扩展了现有的taglib:liferay-UI中的input-asset-links。因此,我在my-ext-web中的web-inf/tld中创建了文件liferay-ui-ext.tld,其中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>

我还在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>

13:48:19,661错误[http-bio-8080-exec-22][includetaG:129]当前URL/group/control_panel?refererplid=10648&doasgroupid=10182&controlpanelcategory=current_site.pages&p_p_id=156生成异常:/html/portlet/layouts_admin/view.jsp(行:98,列:2)找不到属性的setter方法:displayStyle在org.apache.jasper.compiler.errordispatcher.dispatch(errordispatcher.java:443)

我使用Liferay6.2GA3CE和JDK1.7。

我错过什么了吗?

共有1个答案

晁英彦
2023-03-14

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

 类似资料:
  • 我有一个片段,我在其中膨胀“Fragment\u board.xml”: 如您所见,fragment\u board包含一个自定义视图“BoardView”,我想从中加载以下“view\u board.xml”: 我的自定义视图包含两个滚动视图(我使用它进行平移),我希望能够在其他布局中重复使用它。BoardView扩展了外部(垂直)滚动视图,如下所示: 当我独立使用它时,它会膨胀得很好,我可以在

  • 我错过了什么依赖吗?

  • 我正在尝试用discord4j构建一个discordbot。我将这行代码添加到build.gradle文件中。 然而,在我尝试构建应用程序后,构建在task < code >:app:checkdebugduplicateclass 处失败。 我注意到模块不和不中有一个重复的类。搜索解决方案后,我找到了这个答案: 有时,重复类异常意味着某个依赖项隐式使用了项目中使用的某个库的较旧或较新版本, 但是

  • 添加此插件后,image_editor_pro在获取包时显示此错误… [memeistan]flutter pub get在memeistan中运行“flutter pub get”... 当前Dart SDK版本为2.10.4。

  • 所以,自从我在AndroidManifest文件中添加了一个服务块后,我一直收到一个错误,请查看我的清单。 错误显示: “失败[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED:在安装PackageLI:/data/app/vmdl1643630122.tmp/base.apk(位于二进制XML文件行#42):com.example.shoutout.MainActi

  • 我正在与拥有自己的的子视图作斗争。我有一个,带有一个视图(浅粉色)和