Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3600456
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:29:50+00:00 2026-05-18T20:29:50+00:00

I habe a problem with my latest Liferay Portlet or rather a JSP I’m

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:29:51+00:00Added an answer on May 18, 2026 at 8:29 pm
    <%
    List<String> names = new ArrayList<String>();
    names.add("me");
    names.add("myself");
    names.add("I");
    
    pageContext.setAttribute("names", names);
    %>
    
    <c:forEach var="name" items="${names}">
        <portlet:actionURL var="deleteURL">
            <portlet:param name="myName" value="${name}" />
        </portlet:actionURL>
    
        <liferay-ui:icon-delete label="<%= true %>" url="${deleteURL}"/>
    </c:forEach>
    

    Does this work for you?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I habe a problem with my latest Liferay Portlet or rather a JSP I'm
I habe a main table that i select from and a table with subelements
I am trying to convert a numpy array into a Java-like array using JPype's
We habe to use an old Dojo Version 1.1.x, our problem is to find
I habe a rendering Problem with Slickgrid in IE9. (As allways all other browsers
I really really need help in this. I am using node.js with mongodb and
I habe read here about defining method for a Javascript class Advantages of using
i habe many entries in excell ( more than 3000 ). actually their are
My aim is to habe a listing of all wave files in a specific
I was playing fallout 3 and in that game the computer temrinals ha nice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.