问题标签 [taglib]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3434 浏览

java - 创建渲染 URL 以链接 Liferay 社区中的页面

我已经建立了一个 Liferay 社区,以及许多页面,每个页面都定义了自己的一组 portlet、主题和布局。我希望能够在这些页面之间创建链接。例如,假设我在顶级页面(我们称之为“主页”),我想从我的一个 portlet 中链接到另一个页面(例如“博客”)。

有没有办法使用 Liferay 或 Portlet API 根据我提供的页面参数创建渲染 url。据我所见,liferay-portlet-ext 标签库定义了一个 renderUrl 标签,我可以使用它来创建一个链接回同一页面的 URL,但是我看不到在这个标签中指定页面名称的方法.

我正在使用 Liferay 5.2.3。提前致谢。

0 投票
2 回答
1943 浏览

java - 如何迭代对象的arraylist

我使用 dao 设计模式,其中我返回一个数组列表对象,在对象内部我可以通过将对象类型转换为类来获取对象.getName() 之类的 getter,我想使用 jstl 标记进行迭代。我该怎么做。

0 投票
3 回答
1009 浏览

java - 在彼此中使用两个 struts2 taglib

我想互相使用两个 struts taglib,如下所示:

或者

但我在第二个中收到以下错误:

根据标记文件中的 TLD 或属性指令,属性值不接受任何表达式。

有人有解决方案吗?

谢谢

0 投票
1 回答
922 浏览

grails - 有没有办法做 gsp 部分而不是标签库?

我喜欢 freemarker 的一件事是您可以快速创建封装复杂 html 的新宏,以使页面更小更简洁。我是否必须制作标签库才能在 grails 中做同样的事情,或者是否有真正轻量级的语法来实现同样的事情?

0 投票
1 回答
1913 浏览

grails - Grails:从 Taglib 中获取当前视图名称

有没有办法找出正在评估的当前视图(或 gsp 文件)?

由于 URL 映射和转发,RequestURI 不起作用。

我正在尝试根据当前的 GSP 文件动态检索资源。例如,如果正在执行 product/view.gsp,我想包含 product/view.css 和 product/view.js(如果它们存在)。我遇到问题的部分是获取文本“视图”

0 投票
1 回答
4077 浏览

grails - 如何在 Taglib 中设置参数

我在调用 GrailsUI 自动完成标记的自定义标记库中有此代码:

这是我调用以填充自动完成的操作:

使用硬编码一切正常:

但我需要的是:

并且 params.tableId 不可用于自动完成。

那么如何在 taglib 中设置参数呢?

更新

事实证明 gui.autocomplete 提供了另外两个我不知道的参数。filterBy 和 filter 可用于精确地将过滤器参数传递给您的控制器。所以现在我这样做:

它工作得很好。所以我眼前的问题就解决了。但一般问题仍然存在:如何在 taglib 中设置参数?

0 投票
2 回答
2716 浏览

objective-c - A framework header cannot find its own header files in Xcode?

In Xcode, suppose that there is a framework named Foo. Inside the Foo.framework/Headers folder there are files File1.h and File2.h. The header file File1.h includes File2.h via the following directive:

The Foo framework is a re-package of a C++ library not specifically targeted for the Mac.

Now suppose I have a project that links to the Foo framework. It has a file MyFile.mm that includes File1.h via the following directive:

Now when I tried to compile MyFile.mm, it always fails because it can't find File2.h. How can I get this to compile and run without modifying the header files of the Foo framework?

For the curious, the actual framework in question is a framework-packaged version of Taglib taken from the Max source tree. The file that I tried to include was <taglib/mp4.tag> and compiling the .mm file that includes it always fail due to mp4tag.h is including <tag.h> without the <taglib/...> prefix in the include directive. The error is not only in this one header files, but there are similar issues in a large number of header files and thus modifying all of these include statements is non trivial. All of the required "missing" header files are actually present in the framework's Header subdirectory.

I'm trying to use Taglib in my app and although I was able to compile Taglib as a framework with header files and add it to my app, I can't seem to get the app to compile due to the issues above.

Anybody has any pointers?

Thanks.

0 投票
2 回答
473 浏览

c++ - 将文档添加到 Lucene 索引会导致崩溃

我正在尝试索引只有一个 ID3 帧的 mp3 文件。使用 CLucene 和 TagLib。以下代码工作正常:

但这会使应用程序崩溃:

这是为什么?!

0 投票
1 回答
1369 浏览

c# - 使用 C# 从 Web 读取 ID3 标签

我已经看过 TagLib Sharp 示例,说明他们如何从 Gnome VFS 中读取数据,但是有人知道如何从网站读取 MP3 文件并获取 ID3 信息的示例代码吗?

所以说我有一些 MP3,链接是这样的:“ http://myserver.com/indie/band1.mp3

我正在尝试使用 TagLib Sharp 来执行此操作:http: //developer.novell.com/wiki/index.php/TagLib_Sharp :_Examples

提前致谢!

0 投票
3 回答
6425 浏览

java - 自定义标记库导致“PWC6033:无法为 JSP 编译类”

当我尝试在我的 web 应用程序中使用自定义标记库时,它无法在 OS X(或 Windows)上使用 Eclipse 和 Run Jetty Run。当我对文件进行 WAR 并在运行 apache-tomcat-6.0.20 的 linux 服务器上运行它们时,没有问题。我在两种环境中都使用 3rd 方自定义标记库而没有问题。

自定义 taglib tld 看起来像

和标签处理程序

最后是 temp.jsp

我认为我的 taglib 定义/配置是正确的,因为整个事情在部署到 tomcat 时都可以工作,但是我整天都在尝试使这项工作在 Jetty 中无济于事。