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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:28:54+00:00 2026-05-15T05:28:54+00:00

This expression is not working :- <f:facet name=header> Search Results for #{SearchResultsBean.searchPhrase} </f:facet> But

  • 0

This expression is not working :-

  <f:facet name="header">
      Search Results for #{SearchResultsBean.searchPhrase}
  </f:facet>

But if i just remove that line from outside f:facet, it works. Why is this happening? Is this the intended behavior? Thanks in advance 🙂

  • 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-15T05:28:55+00:00Added an answer on May 15, 2026 at 5:28 am

    I am not sure, but this might be related to the fact that the f:facet can contain only one child. Try this instead:

    <f:facet name="header">
        <h:outputText value="Search Results for #{SearchResultsBean.searchPhrase}" />
    </f:facet>
    

    or maybe

    <f:facet name="header">
        <h:panelGroup>Search Results for #{SearchResultsBean.searchPhrase}</h:panelGroup>
    </f:facet>
    

    Update:

    I just did a local test and actually, your initial approach works just here.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html 
        xmlns="http://www.w3.org/1999/xhtml" 
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
        <h:head>
            <title>test</title>
        </h:head>
        <h:body>
            <h:dataTable value="#{bean.list}" var="item">
                <h:column>
                    <f:facet name="header">
                        foo #{bean.text} bar
                    </f:facet>
                    #{item}
                </h:column>
            </h:dataTable>
        </h:body>
    </html>
    

    with

    package mypackage;
    
    import java.util.Arrays;
    import java.util.List;
    
    import javax.faces.bean.ManagedBean;
    
    @ManagedBean
    public class Bean {
    
        public List<String> getList() {
            return Arrays.asList("foo", "bar");
        }
    
        public String getText() { 
            return "text";
        }
    
    }
    

    yields

    foo text bar
    foo
    bar

    That was using Mojarra 2.0.2 on Tomcat 6.0.20. Which versions was you using? Was your approach similar?

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

Sidebar

Related Questions

^[A-Za-z ]+$ this expression working but it is not accepting single space i want
How can I update this regular expression to find and replace not just /news/
I want to match D11-RONPLAYER_DEF_15_PO using this regular expression: D\[0-9]+-\[A-Z]*PLAYER_(DEF\[0-9]*)_(\[^_]+)_ but it does not
I have a simple problem on .xhtml page. This expression is not working :-
I've found this snippet: http://fssnip.net/8o But I'm working not only with retriable functions, but
I've read: Expression Language in JSP not working but it's slightly different. Using EL
Why is this boost::lambda expression not working? boost::function<bool (boost::uint64_t, boost::uint64_t&, unsigned int, float)> myFunct
Why is this regular expression not working? Console.WriteLine(Regex.IsMatch(password, (?!^[a-zA-Z]*$))); As you can see the
I'm trying to get this expression to work, I'm pretty sure its not the
They said this expression is valid in C, and that it means calling 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.