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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:39:23+00:00 2026-05-25T19:39:23+00:00

I have this page: <?xml version=’1.0′ encoding=’UTF-8′ ?> <!DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0

  • 0

I have this page:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
    template="./templates/template.xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://java.sun.com/jstl/core">

    <ui:define name="main_title">AO MMS Messages</ui:define>
    <ui:define name="main">
    <rich:dataTable value="#{dataProviderBean.aoRequests}" var="item">
        <f:facet name="noData">No messages are available.</f:facet>
        <rich:column>
            <f:facet name="header">Profile</f:facet>
               #{item.profile.username}
           </rich:column>
        <rich:column>
            <f:facet name="header">Timestamp</f:facet>
               #{item.timestamp}
           </rich:column>
        <rich:column>
            <f:facet name="header">Recipient</f:facet>
               #{item.recipient}
           </rich:column>
        <rich:column>
            <f:facet name="header">Sender</f:facet>
               #{item.sender}
           </rich:column>
        <rich:column>
            <f:facet name="header">Text</f:facet>
            <h:outputText value="Contents: #{item.getContentByStringType('text/plain')}" />
               <c:forEach var="content" items="#{item.getContentByStringType('text/plain')}">
                <h:outputText value="Content: #{content}" />
               </c:forEach>
           </rich:column>
        <rich:column>
            <f:facet name="header">Headers</f:facet>
               #{item.headers}
           </rich:column>
    </rich:dataTable>
    </ui:define>
</ui:composition>

But the column Text prints only this:

Contents: [TextContent [content=Hello World in MMS]] Content:

Why does it not iterate over the list?

Request class for more info:

public class Request {

    private Profile profile;
    private Map<String, String> headers;
    private Date timestamp;
    private MessageType messageType;
    private Map<String, ArrayList<Content>> contents;

    public Request(MessageType messageType) {
        this.messageType = messageType;
        this.timestamp = new Date();
    }

    public Profile getProfile() {
        return profile;
    }

    public void setProfile(Profile profile) {
        this.profile = profile;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public MessageType getMessageType() {
        return messageType;
    }

    public void setMessageType(MessageType messageType) {
        this.messageType = messageType;
    }

    public Map<String, ArrayList<Content>> getContents() {
        return contents;
    }

    public void setContents(Map<String, ArrayList<Content>> contents) {
        this.contents = contents;
    }

    public List<Content> getContentByStringType(String type) {
        return contents.get(type);
    }

    public String getSender() {
        return headers.get(HttpHeaders.X_NOKIA_MMSC_FROM.getValue()).replaceAll("/.*", "");
    }

    public String getRecipient() {
        return headers.get(HttpHeaders.X_NOKIA_MMSC_TO.getValue()).replaceAll("/.*", "");
    }

    @Override
    public String toString() {
        return "Request [profile=" + profile + ", headers=" + headers + ", timestamp=" + timestamp
                + ", messageType=" + messageType + ", contents=" + contents + "]";
    }

}
  • 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-25T19:39:23+00:00Added an answer on May 25, 2026 at 7:39 pm

    Use ui:repeat instead of c:forEach in that situation.

    c:forEachdoes not work here because you are trying to refer var item which is not defined (c:forEach is a TagHandler so it is trying to evaluate item when the tree is being built; rich:dataTable is a Component and it defines the var item only on render response).

    For more information on the matter you could read the following article: . TagHandler vs Component

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

Sidebar

Related Questions

Taking the XSLT and XML from this page as an example: http://www.w3schools.com/xsl/xsl_transformation.asp I have
i have this page . login: fer password: m Note: after login you will
I have this serious: I have ASP.NET page, This page contents Update panel with
So I have this page here: http://www.eminentmedia.com/development/powercity/ As you can see when you mouse
He, I have this page where i have checkboxes next to every item in
I have this html page which is very simple, it contains a text box
Note: I'm using Google Chrome Currently I have this test page http://www.evecakes.com/doodles/canvas_size_issue.htm It should
I'm working on an ASP.NET page, using VB.NET and I have this hierarchy: Page
I have this simple Jsp page: <%@ page language=java import=java.awt.Color%> <% Color background =
I have this query: SELECT page.id, revision.title, revision.number FROM page INNER JOIN revision ON

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.