I habe a problem with my latest Liferay Portlet or rather a JSP I’m using in this portlet.
I am using a string array that contains strings which are shown on the page with a delete-button. Each of these buttons calls an actionURL to submit the selected data to another function.
Maybe it’s easier to understand what I want to do by just looking at my example code:
<c:forEach var="name" items="<%=myNames %>">
<liferay-portlet:actionURL name="deleteName" var="${name}">
<liferay-portlet:param name="myName" value="${name}" />
</liferay-portlet:actionURL>
<c:out value="${name}" />
<liferay-ui:icon-delete label="<%= true %>" url="${name}"/>
</c:forEach>
Maybe you already noticed what my problem is: the var-attribute in the actionURL has to be a string. That’s why this example doesn’t work.
My question is now: how can I cast my $name variable dynamically to set it int the actionURL and later call it with the icon?
Thank you.
Does this work for you?