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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:25:04+00:00 2026-06-15T18:25:04+00:00

I tried to write in resources/ui/div.xhtml: <?xml version=1.0 encoding=utf-8?> <ui:component xmlns=http://www.w3.org/1999/xhtml xmlns:h=http://java.sun.com/jsf/html xmlns:composite=http://java.sun.com/jsf/composite xmlns:f=http://java.sun.com/jsf/core

  • 0

I tried to write in resources/ui/div.xhtml:

<?xml version="1.0" encoding="utf-8"?>
<ui:component xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:composite="http://java.sun.com/jsf/composite"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    >
    <composite:interface>
        <composite:attribute name="binding" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="bodyClass" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="header" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="headerClass" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="id" required="false" type="java.lang.String" />
        <composite:attribute name="ondblclick" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onkeydown" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onkeypress" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onkeyup" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onmousedown" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onmousemove" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onmouseout" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onmouseover" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onmouseup" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="rendered" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="style" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="styleClass" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="onclick" required="false"
            type="javax.el.ValueExpression" />
        <composite:attribute name="title" required="false"
            type="javax.el.ValueExpression" />
    </composite:interface>
    <composite:implementation>
        <rich:panel         
            binding="cc.attrs.binding"
            bodyClass="cc.attrs.bodyClass" header="cc.attrs.header"
            headerClass="cc.attrs.headerClass" id="cc.attrs.id"
            ondblclick="cc.attrs.ondblclick" onkeydown="cc.attrs.onkeydown"
            onkeypress="cc.attrs.onkeypress" onkeyup="cc.attrs.onkeyup"
            onmousedown="cc.attrs.onmousedown"
            onmousemove="cc.attrs.onmousemove"
            onmouseout="cc.attrs.onmouseout"
            onmouseover="cc.attrs.onmouseover"
            onmouseup="cc.attrs.onmouseup" rendered="cc.attrs.rendered"
            style="cc.attrs.style" styleClass="cc.attrs.styleClass" 
            onclick="cc.attrs.onclick" 
            title="cc.attrs.title">
            <composite:insertChildren />
        </rich:panel>
    </composite:implementation>
</ui:component>

and calling it from here:

<html
...
xmlns:u="http://java.sun.com/jsf/composite/ui">
...
<u:div styleClass="dualbrand">
    test        
</u:div>
...
</html>

but i’m getting error:

javax.servlet.ServletException: java.lang.String cannot be cast to
javax.faces.component.UIComponent
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)

if i changed the implementation into:

<composite:implementation>
    <rich:panel         
        binding="#{cc.attrs.binding}"
        bodyClass="#{cc.attrs.bodyClass}" header="#{cc.attrs.header}"
        headerClass="#{cc.attrs.headerClass}" id="#{cc.attrs.id}"
        ondblclick="#{cc.attrs.ondblclick}" onkeydown="#{cc.attrs.onkeydown}"
        onkeypress="#{cc.attrs.onkeypress}" onkeyup="#{cc.attrs.onkeyup}"
        onmousedown="#{cc.attrs.onmousedown}"
        onmousemove="#{cc.attrs.onmousemove}"
        onmouseout="#{cc.attrs.onmouseout}"
        onmouseover="#{cc.attrs.onmouseover}"
        onmouseup="#{cc.attrs.onmouseup}" rendered="#{cc.attrs.rendered}"
        style="#{cc.attrs.style}" styleClass="#{cc.attrs.styleClass}" 
        onclick="#{cc.attrs.onclick}" 
        title="#{cc.attrs.title}">
        <composite:insertChildren />
    </rich:panel>
</composite:implementation>

i would get:

javax.servlet.ServletException: /WEB-INF/templates/main.xhtml @34,33
styleClass=”dualbrand” Cannot convert dualbrand of type class
java.lang.String to class javax.el.ValueExpression
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)

what should i do to correctly wrap the panel?

  • 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-15T18:25:05+00:00Added an answer on June 15, 2026 at 6:25 pm

    As to your first exception, using attributename="cc.attrs.attributename" is in first place completely wrong. That’s not how it works. EL expressions are supposed to be enclosed in #{} as in attributename="#{cc.attrs.attributename}". That’s how the specification mandates it.

    As to your second exception, that’s because you declared the type to be a javax.el.ValueExpression instead of the actual object type behind the expression, which is java.lang.String in case of the styleClass attribute. Fix it accordingly:

    <composite:attribute name="styleClass" required="false"
        type="java.lang.String" />
    

    Do the same for the other types. For an overview of the right types, it’s helpful to consult the VDL documentation of <rich:panel>, which you’re trying to delegate to.

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

Sidebar

Related Questions

I have an XML File <? xml version=1.0 encoding=utf-8?> <resources> <string name=Foo>Bar</string> <string name=Foo1>Bar1</string>
I tried to write a function to check key code with JavaScript. It's working
I tried to write a script to list all files in directories and subdirectories
I tried to write a function that calculates a hamming distance between two codewords
I tried to write a Neural Network system, but even running through simple AND/OR/NOR
I tried to write a program that uses threads, but couldn't understand the o/p.
I tried to write a Taylor series expansion for exp(x)/sin(x) using fortran, but when
I've tried to write a function that will take an array of different amounts
I've tried to write reproducable example below. It is a mix of .Rmd and
I've tried to write the smallest chunk of code to narrow down a 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.