I managed to get the jquery portlet working on my JSP with java backend, using this example as a starting point: http://jqueryui.com/demos/sortable/#portlets
for each portlet, i need to add an additional icon on the portlet header, depending on whether the user has permission on that portlet. so its something like
$(".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 */
});
my question is a little basic - what is the best way for each portlet to pass that info to jquery ? passing parameter? (if so, how?) hidden divs? i haven't used jquery long enough to know the best way.