我设法使用java后端使用jquery portlet处理我的JSP,使用此示例作为起点: http://jqueryui.com/demos/sortable/#portlets
对于每个portlet,我需要在portlet头上添加一个额外的图标,具体取决于用户是否拥有该portlet的权限。它就像
$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
.find(".portlet-header")
.addClass("ui-widget-header ui-corner-all")
.prepend('<span class="ui-icon ui-icon-plusthick"></span>')
/* if user has permission for this portlet */
.prepend('<span class="ui-icon ui-icon-pencil"></span>')
.end()
.find(".portlet-content");
$(".portlet-header .ui-icon-pencil").click(function() {
alert($(this).parents('.portlet').attr('id'))
/* go to a specific page for this portlet */
});
我的问题有点基础 - 每个portlet将该信息传递给jquery的最佳方法是什么?传递参数? (如果是这样,怎么样?)隐藏的div?我没有使用jquery足够长的时间来了解最好的方法。
答案 0 :(得分:0)
对于所有portlet和UI相关的最佳实现它的主题是Theme / Skin。
实施此恕我直言的最佳方式如下