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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:46:11+00:00 2026-05-26T15:46:11+00:00

I have a simple JSF 2.0 composite component example. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML

  • 0

I have a simple JSF 2.0 composite component example.

<!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:cc="http://java.sun.com/jsf/composite"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core">
<head>
    <title>
        A panel box component
    </title>
</head>
<body>
    <cc:interface>
        <cc:attribute name="model" required="true" type="at.test.Person"/>
    </cc:interface>
    <cc:implementation>
        <h:inputText value="#{model.vorname}">

        </h:inputText>
    </cc:implementation>
</body>

And here is my JSF test page:

 <!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:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:mc="http://java.sun.com/jsf/composite/mygourmet" >

<h:body>
<h:form>
    <mc:inputTest model="#{person}">

    </mc:inputTest>
    <h:commandButton value=""/>
    <h:outputText value="#{person.vorname}"/>
</h:form>
 </h:body>

</html>

I want that my composite component saves a string value in a JSF session bean with <h:inputText>. But the problem is, when I submit the form with the <h:commandButton> I see the following error:

Caused by: javax.el.PropertyNotFoundException: /resources/mygourmet/inputTest.xhtml      at line 18 and column 42 value="#{model.vorname}": Target Unreachable, identifier 'model' resolved to null
    at org.apache.myfaces.view.facelets.el.TagValueExpression.getType(TagValueExpression.java:73)
    at org.apache.myfaces.shared_impl.renderkit._SharedRendererUtils.findUIOutputConverter(_SharedRendererUtils.java:77)
  • 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-26T15:46:12+00:00Added an answer on May 26, 2026 at 3:46 pm

    You need to reference composite component attribute values by #{cc.attrs.<name>} where <name> is the attribute name. So, this should do:

    <h:inputText value="#{cc.attrs.model.vorname}">
    

    See also:

    • Java EE 6 tutorial – Facelets – Composite Components
    • Java EE 6 tutorial – Advanced Composite Components
    • <composite:xxx> tag documentation

    Unrelated to the concrete problem, all that <html><head><body> in the composite is unnecessary. I suggest to use <ui:component> since that’s more clear. See also our composite component wiki page for examples.

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

Sidebar

Related Questions

I have the following snippet: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
I have this simple code in facelets numbers.xhtml: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html
I have the following 3 simple pages in a JSF app. index.html start.html confirmSuccess.thml
I have a simple scrollableDataTable in a jsf <%@ taglib uri=http://java.sun.com/jsf/core prefix=f %> <%@
I have a very simple JSF 2.0 project. I have an index.xhtml file to
I have the following on my main jsf wrapper page: <head> <meta http-equiv=Content-Type content=text/xhtml;
I'm trying to implement this simple example in JSF: There is a user.xhtml page
I am new to JSF and have a problem with my simple JSF application.
I have some problem's with a simple application in JSF 2.0. I try to
Ok simple question. I have a JSF application, containing a login page. The problem

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.