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

  • Home
  • SEARCH
  • 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 7830803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:24:45+00:00 2026-06-02T11:24:45+00:00

When I try to load the page the datatable is empty. Using the <h:dataTable

  • 0

When I try to load the page the datatable is empty. Using the <h:dataTable ... /> the data shows up in the rows. However after further inspection the list is actually written….but it seems like it uses the toString() of the list directly in the value attribute of the datatable. What is wrong?

Backing bean

@Named
@RequestScoped
public class QuestionTableBacking {

    @Inject
    private QuestionServiceLocal questionService;

    public List<Question> getAllQuestions() {
        return questionService.getAllQuestions();
    }
}

Facelet file

        <h:form>

           <p:dataTable value="#{questionTableBacking.allQuestions}" var="question" >
               <p:column>
                   <h:outputText value="#{question.description}" />
               </p:column>

               <p:column>
                   <h:link outcome="report" value="Rapporter" />
               </p:column>
           </p:dataTable>

        </h:form>

This is what I see in firebug

<p:datatable value="[com.mycompany.myapp.domain.Question@7cf9175c, com.mycompany.myapp.domain.Question@456cd91d, com.mycompany.myapp.domain.Question@6d222286,..... var="question">
               <p:column>
               </p:column>

               <p:column><a href="/myapp/report.faces">Report</a>
               </p:column>
           </p:datatable>

POM file ( they are contained in correct parent elements )

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>3.2</version>
    <scope>compile</scope>
</dependency>

<repository>
    <id>prime-repo</id>
    <name>PrimeFaces Maven Repository</name>
    <url>http://repository.primefaces.org</url>
    <layout>default</layout>
</repository>

Warning: This page calls for XML namespace http://primefaces.org/ui
declared with prefix p but no taglibrary exists for that namespace.

Complete file:

<?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:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:o="http://openfaces.org/">

<h:head>
    <title>Simple JSF Facelets page</title>
</h:head>

<h:body>

    <ui:composition template="templates/masterLayout.xhtml">
        <ui:define name="windowTitle">Question</ui:define>

        <ui:define name="content">
            <div id="page-intro">
                <h2>Titile</h2>

                <p>Blah blah</p>
            </div>

            <h:form>
                <div class="question-filter-container">
                    <o:inputTextFilter id="quesiton-filter" styleClass="input-text question-filter" for="question-table"
                                       expression="#{question.description}"
                                       promptText="" />
                </div>

                <o:dataTable value="#{questionTableBacking.allQuestions}" var="question" rowKey="#{question.id}"
                             id="question-table" pageSize="25" applyDefaultStyle="false"
                             cellspacing="0">
                    <f:facet name="below">
                        <o:dataTablePaginator id="paginator" pageNumberPrefix="Side" pageCountPreposition="av"
                                              styleClass="question-paginator" />
                    </f:facet>
                    <o:column>
                        <h:outputText value="#{question.description}" />
                    </o:column>
                    <o:column bodyClass="question-operations">
                        <h:link outcome="report" value="Report" />
                    </o:column>
                </o:dataTable>
            </h:form>

        </ui:define>
    </ui:composition>

</h:body>

</html>
  • 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-02T11:24:47+00:00Added an answer on June 2, 2026 at 11:24 am

    #{question.description} should be turned into String value that is inside the currently iterated question objects .description propety , isn’t that what you see in the output? if that the case , then its all fine…

    EDIT

    after looking at your question update it seems that you haven’t added primefaces jar to your project…

    have you added xmlns:p=”http://primefaces.org/ui to your xhtml file?

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

Sidebar

Related Questions

When i try to load a page that resides in /var/www/vhosts/mypage/httpdocs/index.php using a browser
When I try to load the following page in IE7 & IE8 I receive
I am assigning ViewState[something] in Page Load of content page and when I try
Hi I want to set opacity for a form in page load. I try
when i try to do this and load the webforms page, i get this
I try to load a loginView in my app delegate but it only shows
I'm using the following HQL query to try and load a set of objects
Hi i am trying to load list of Students onload of a Page in
It gives me this error when I try to load the page: Notice: Undefined
I'm using a spynner package fo Python and when I try to load a

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.