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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:14:18+00:00 2026-05-26T03:14:18+00:00

I have the following simple view main.xhtml , the request URL would be something

  • 0

I have the following simple view main.xhtml, the request URL would be something like:

http://localhost:8080/myproj/main.jsf?pq=2

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                template="/templating/layout-2col.xhtml">

  <ui:define name="metadata">
    <f:metadata>
      <f:viewParam name="pq" value="#{pqHome.id}" required="true">
        <f:convertNumber integerOnly="#{true}" />
      </f:viewParam>
      <f:event type="preRenderView" listener="#{pqHome.init}" />
    </f:metadata>
  </ui:define>

  ...

  <ui:define name="content-right">
    <h:form>
      <rich:panel>
        <f:facet name="header">
          Menu
        </f:facet>
        <rich:tabPanel binding="#{pqHome.tabPanel}">        
        </rich:tabPanel>
      </rich:panel>
    </h:form>
  </ui:define>

</ui:composition>

My bean:

@ManagedBean
@RequestScoped
public class PqHome implements Serializable
{
    @Inject
    private PqService pqService;

    //@ManagedProperty(value="#{param.pq}")
    private Integer id;
    private Prequalification instance;

    @Inject
    private PqPartnerListQuery pplq;
    private List<Partner> partners;

    private UITabPanel tabPanel;
    private List<UIComponent> tabs;

    //@PostConstruct
    public void init()
    {
        System.out.println("ID is " + id);

        instance = pqService.findSingleInstance(id);

        partners = pplq.getItemsForPq(id);

        System.out.println("Building tab manually...");

        // RF way...
        FacesContext fc = FacesContext.getCurrentInstance();
        Application application = FacesContext.getCurrentInstance().getApplication();

        tabPanel = (UITabPanel)application.createComponent(UITabPanel.COMPONENT_TYPE);
        tabPanel.setSwitchType(SwitchType.client);

        tabs = tabPanel.getChildren();

        for ( Partner partner : partners )
        {
            Company co = partner.getCompany();
            String companyName = co.getName();

            UITab tab = (UITab)application.createComponent(UITab.COMPONENT_TYPE);

            //tab.setTitle(companyName);
            tab.setName(companyName);
            tab.setId(co.getDndType());

            tabs.add(tab);
        }

        String firstTabName = partners.get(0).getCompany().getName();

        System.out.println("First tab name = " + firstTabName);

        tabPanel.setActiveItem(firstTabName);
    }

    public Integer getId()
    {
        return id;
    }

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Prequalification getInstance()
    {
        return instance;
    }

    public UITabPanel getTabPanel()
    {
        return tabPanel;
    }
}

When requesting the above page I get an error saying:

An Error Occurred:
/main.xhtml @221,53 binding="#{pqHome.tabPanel}": The class 'de.mycomp.myproj.beans.PqHome' does not have a writable property 'tabPanel'.
+- Stack Trace

javax.el.PropertyNotWritableException: /main.xhtml @221,53 binding="#{pqHome.tabPanel}": The class 'de.mycomp.myproj.beans.PqHome' does not have a writable property 'tabPanel'.
    at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136)
    at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1897)
    at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1109)
    at org.jboss.as.weld.webtier.jsf.ForwardingApplication.createComponent(ForwardingApplication.java:122)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:511)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:157)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)
...
    at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
    at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
    at java.lang.Thread.run(Unknown Source)

Why does JSF assume the tab panel EL binding="#{pqHome.tabPanel}" to be written/writable here? Is there a way to fix this, that is tell JSF to read here?

Note: The workaround would be to uncomment the @ManagedProperty and @PostConstruct annotations in the bean and outcomment the <f:event ...> in the view, but then I don’t see why I should be using <f:viewParam> and <f:metadata> at all…

Thanks

  • 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-26T03:14:19+00:00Added an answer on May 26, 2026 at 3:14 am

    JSF just needs to set the obtained or auto-created non-null component in the backing bean as you told it to do by binding. You need to provide a setter method. No excuses. If the getter returned a manually created component, just the very same component will be set. JSF won’t set the auto-created one.

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

Sidebar

Related Questions

I have a simple view in my MSSQL database. It consists of the following
I came across the following issue: I have a main simple page on which
I have following simple method in my main activity. private void showMap(String name )
I have the following simple kml which references an image file that I would
I have a reasonably simple split view application adapted from iPhone code. The main
I have following simple class: @interface Article: NSObject { NSString *title; } @property (copy,
We have the following simple Stored Procedure that runs as an overnight SQL server
I have the following simple button with an image as the template. The problem
I have the following simple function: private void EnableDisable941ScheduleBButton() { if (this._uosDepositorFrequency.Value != null)
I have the following simple python test script that uses Suds to call 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.