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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:12:19+00:00 2026-06-11T07:12:19+00:00

I have a XHTML page which on submission goes back to itself. The backing

  • 0

I have a XHTML page which on submission goes back to itself.
The backing bean is session scoped. On the redirect to itself the page renders the h:datatable twice and gives me duplicate id error.I can visually see the table being rendered twice as well next to each other.

** xhtml page :**

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">

                <f:view>
                <h:form  >

                <h:dataTable binding="#{ecole.dataTable}" value="#{ecole.getEcoleList()}" var="c"
                border="0" width="100%" cellpadding="0" cellspacing="0" 
                styleClass="order-table"
                headerClass="order-table-header"
                rowClasses="order-table-odd-row,order-table-even-row"
            >

                        <h:column>
                            <f:facet name="header">
                                ID
                            </f:facet>
                                #{c.idEcole}
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                Nom
                            </f:facet>
                                #{c.nomEcole}
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                Description
                            </f:facet>
                                #{c.desc_ecl}
                        </h:column>
                        <h:column>
                             <f:facet styleclass="options-width" name="header">
                                        Options
                             </f:facet>
                             <h:commandLink action="#{ecole.editEcoleItem()}" title="Edit" >
                                <h:graphicImage style="border:0" url="/icones/b_edit.png" />
                             </h:commandLink>
                             &#xa0;&#xa0;&#xa0;
                             <h:commandLink title="Delete" 
                             onclick="return confirm('Voulez-vous confirmer la suppression?') ;" 
                                 action="#{ecole.deleteEcole(c)}"
                             >
                              <h:graphicImage style="border:0" url="/icones/b_drop.png" />
                             </h:commandLink>
                        </h:column>

        </h:dataTable>
                <!--  end product-table................................... --> 
                </h:form>
                </f:view>

this is error message shown :

 java.lang.IllegalStateException: Component ID j_id15:j_id16:j_id29 has already been found in the view.  See below for details.
    +id: null
     type: javax.faces.component.UIViewRoot@1abe6f6
      +id: javax_faces_location_HEAD
       type: javax.faces.component.UIPanel@c84a5d
        +id: j_id4
         type: javax.faces.component.UIOutput@18a5776
        +id: j_id22
         type: javax.faces.component.UIOutput@1742dcc
      +id: j_id19
       ...
  • 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-11T07:12:21+00:00Added an answer on June 11, 2026 at 7:12 am

    The binding attribute should bind to a request scoped bean or just be removed altogether and be replaced by a better alternative, depending on the concrete functional requirement.

    If I get the functional requirement right of being able to retrieve the current item in the editEcoleItem() method, then you can just pass it directly as method argument, exactly as you did in deleteEcole(). This way you can just remove the binding attribute altogether. That’s the JSF 2.0 / EL 2.2 way. Perhaps you were focusing too much on old JSF 1.x examples. You shouldn’t do that when developing with JSF 2.x.

    See also:

    • A JSF 2.0 CRUD example
    • How can I pass selected row to commandLink inside dataTable?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a XHTML page which on submission goes back to itself. The backing
Here is my use cases. I have a login page which is /public/login.xhtml .
I have a JSF project and I already have an index.xhtml page which is
I have a complex ICEFaces XHTML page that renders certain components conditionally, based on
I have a XHTML-based page which contains admin information. The admin should be able
I have the following conversation scoped backing bean: @Named @ConversationScoped public class TestConversation implements
I have a XHTML page in which there are four textboxes <h:column > <f:facet
i have a xhtml popup page which has two buttons.The two buttons have actionListener
I have an .xhtml page in which I have tried both BalusC's suggestion here
I have a xhtml page in which there can be 0 to 6 check

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.