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 9305067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:50:52+00:00 2026-06-18T23:50:52+00:00

I have ajax functionality to add names and show on the same page in

  • 0

I have ajax functionality to add names and show on the same page in a table manner with one image(on left of text) and one “X” image(on right to delete). It should be added like, from left to right and after completing one row, it should start from next row.

So I need to show an arraylist of string in p:datagrid or any other tag which can be used with same functionality.

I tried with combination of ui:repeat and p:panelgrid but I was unable to get datagrid funtionallty. I did not used p:dataTable because it would add new element on bottom side not as I need.

P.S.

<h:form>

        <h:selectOneMenu id="recepients" value="#{controller.selected}">
            <f:selectItem itemLabel="Select" itemValue=""></f:selectItem>
            <f:selectItem itemLabel="Info1" itemValue="Info1"></f:selectItem>
            <f:selectItem itemLabel="Info2" itemValue="Info2"></f:selectItem>
            <f:selectItem itemLabel="Info3" itemValue="Info3"></f:selectItem>
            <f:selectItem itemLabel="Info4" itemValue="Info4"></f:selectItem>
            <f:selectItem itemLabel="Info5" itemValue="Info5"></f:selectItem>


        </h:selectOneMenu>
        <p:commandButton value="Add" action="#{controller.submit}"
            update="nameslist" />

        <p:dataGrid id="nameslist" value="#{controller.tempNameList}"
            var="name" columns="3">
            <p:column>
                <p:outputLabel value="%" />
            </p:column>
            <p:column>
                <p:outputLabel value="#{name}" />
            </p:column>
            <p:column>
                <p:commandLink value="X" action="#{controller.delete(name)}"
                    update="nameslist">
                </p:commandLink>                


            </p:column>

        </p:dataGrid>
    </h:form>

The result should be like this…

% Abc X
% Xyz X
% dfd X

plz consider % as image and X as close symbol

  • 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-06-18T23:50:53+00:00Added an answer on June 18, 2026 at 11:50 pm

    The <p:dataGrid> doesn’t support <p:column>. This column layout is only applicable to <p:dataTable>.

    Replace all those <p:column> by a single grouping component, e.g. <h:panelGroup> or maybe <p:panel>, exactly as shown on showcase site.

    <p:dataGrid id="nameslist" value="#{controller.tempNameList}" var="name" columns="3">
        <h:panelGroup>
            <p:outputLabel value="%" />
            <p:outputLabel value="#{name}" />
            <p:commandLink value="X" action="#{controller.delete(name)}" update="nameslist" />
        </h:panelGroup>
    </p:dataGrid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wanting to add some AJAX functionality to my Rails app, but have no
I have a WCF based service that I use to expose AJAX functionality. Sometimes
I am having trouble adding ajax functionality to existing asp.net 4 website. I have
I am working on a filter functionality using ajax/jquery and php/mysql.I have two sets
I have an Ajax request that can return more than one valid value, so
All, I want to add Ajax functionality to my Asp.net project. Currently I just
I've been trying to add auto complete functionality to a text box. I want
I have an ASP.NET 3.5 page with some AJAX, some Validators and some business-rule
I have a JQGrid which has add/edit form functionality enabled. Both are working fine.
I am struggling with a problem about automatic AJAX load of page. I have

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.