liferay - 如何设置<aui :button> icon in Liferay without using Javascript?

标签 liferay portlet alloy-ui liferay-aui

我正在尝试将图标设置为 <aui:button>就像这个tutorial 。 但那里描述的解决方案在我的情况下效果不佳,因为我有一个表,并且在每一行上都有一个具有不同资源 URL 的按钮。像这样:

<portlet:resourceURL id="saveReport" var="saveReportURL">
   <portlet:param name="reportId" value="${report.reportId}" />
</portlet:resourceURL>

<aui:button onclick="location.href = '${saveReportURL}'"> 

<aui:button>可以设置图标吗不使用教程中描述的 JavaScript?

谢谢

最佳答案

您可以编写以下代码来设置liferay合金按钮中的图标

<aui:button type="cancel" cssClass="btn-info" icon="icon-upload-alt" iconAlign="right" value="upload" />

you need to use the icon attribute for this setting "Icon glyphs"
you need to use cssClass for adding extra design button class for the designing
you need to set iconAlign attribute for left or right side of the button text value

关于liferay - 如何设置<aui :button> icon in Liferay without using Javascript?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8987070/

相关文章:

alloy-ui - 如何将自定义按钮添加到 AlloyUI 调度程序的事件弹出窗口?

database - 将数据库从 Hypersonic 更改为 MySQL 后,Liferay 不保存设置

angularjs - Liferay7.0 portlet build with angular and typescript

Spring portlet mvc 提交编辑表单期间验证失败

jquery - Liferay 首次登录 Portlet CSS 问题

java - 如何验证 <aui :select> in a Liferay Form?

calendar - 音频 : Event rendering issue in month view

jax-rs - 使用 CXF JAX-RS 的 Liferay 7.1 自定义 portlet

database - 使用 Liferay 配置自定义数据库

java - Eclipse不会在Liferay maven项目中生成父主题文件