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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:44:41+00:00 2026-06-11T05:44:41+00:00

Consider a nested template: Base.xhtml: … <h:outputText value=#{uiParamter}/> <ui:insert name=header/> … etc. Layout.xhtml: <ui:composition

  • 0

Consider a nested template:

Base.xhtml:

...

<h:outputText value="#{uiParamter}"/>
<ui:insert name="header"/>

... etc.

Layout.xhtml:

<ui:composition template="Base.xhtml">

    ...

    <ui:insert name="content"/>

    ... etc.

</ui:composition>

When now defining a template client like this:

<ui:composition template="Layout.xhtml">

    <ui:define name="header"> foo </ui:define>
    <ui:define name="content"> foo2 </ui:define>
    <ui:param name="uiParameter" value="foo3"/>

</ui:composition>

does one have to forward the <ui:param> or <ui:define> in the Layout.xhtml to the Base.xhtml template by redefining it. e.g:

<ui:param name="uiParameter" value="#{uiParameter}">  
<ui:define name="header">
    <ui:insert name="header"/>
</ui:define>

One could also rephrase this question as: “Do template parameters behave cascading?”

  • 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-11T05:44:43+00:00Added an answer on June 11, 2026 at 5:44 am

    The answer is YES. I’ve run the following code on JBoss AS 7.0:

    nest1.xhtml:

        <!DOCTYPE html>
        <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:ui="http://java.sun.com/jsf/facelets">
        
        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title><ui:insert name="title">
                    Nested
                </ui:insert></title>
        </h:head>
        
        <h:body>
            <ui:insert name="main" />
            <h:outputText value="#{uiParam}"/>
        </h:body>
    
    </html>
    

    nest2.xhtml:

    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets" template="nest1.xhtml">
    
        <ui:define name="main">
            <p>Nested templated content.</p>
        </ui:define>
    </ui:composition>
    

    nest3.xhtml:

    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets" template="nest2.xhtml">
    
        <ui:define name="title">Nested Template</ui:define>
        <ui:param name="uiParam" value="ui param value" />
    </ui:composition>
    

    which was rendered as:

    screenshot of jboss output

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

Sidebar

Related Questions

simplifying my problem we can consider: template <class T> class Base{ typedef typename std::pair<T,
Consider the following nested type: public class Book { private class Chapter { }
Consider the following nested JSON: { state: [ Tennessee ], more_data: [ { letters:
Is it possible to have nested set capabilities in this somewhat custom setup? Consider
Consider having the following header file (c++): myclass.hpp #ifndef MYCLASSHPP_ #define MYCLASSHPP_ namespace A
Consider the following code: template <class x1, class x2 = int*> struct CoreTemplate {
Consider the following Mechanize form object #<Mechanize::Form {name f1} {method POST} {action f.php} {fields
please consider the following code: template <typename T> struct foo { template <typename S>
Consider languages like Python or JavaScript that allow functions to be nested like this:
Nested variables have prevented me from trying to use BASH more extensively... consider the

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.