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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:12:06+00:00 2026-06-07T22:12:06+00:00

I have this form, the line comboBox is suposed to be regenerated when changing

  • 0

I have this form, the line comboBox is suposed to be regenerated when changing the range one.
This is done with a4j from richfaces.

The form

It was working fine until I made it into a facelet component, here is my code :

Bean

@Getter
@Setter
@ManagedBean(name = "creerProduit")
@SessionScoped
public class CreerProduitBean implements Serializable {
    /** serial uid genere par eclipse */
    private static final long serialVersionUID = 7901115336087748268L;

    /** contenu des comboBox */
    private List<Gamme> listeGammesAffichables;// ce que contient la combox
    private List<Famille> listeFamillesAffichables;// ce que contient la combobox
    private List<Fournisseur> listeFournisseurAffichables;// ce que contient la combobox

    /** liste de toute les familles pour nos calculs */
    private List<Famille> listeFamilles;// la liste de toutes les famille (pour calculs)

    /** resultat du form*/
    private String nomFournisseur;
    private String nomFamille;
    private String nomGamme;
    private String designation;
    private String txRecu;
    private String txVerseCGP;
    private String txVerseDR;
    private String txIncompressible;
    private String indications;

    /**
     * Constructeur
     * Creates a new {@link CreerProduitBean} instance.
     * @throws Exception
     */
    public CreerProduitBean() throws Exception {
        ProduitDelegateImpl d = new ProduitDelegateImpl();
        // recuperation de toute les gamme et famille afin de
        // populer les comboBox
        listeGammesAffichables = d.readAll(Gamme.class);
        listeFournisseurAffichables = d.readAll(Fournisseur.class);
        listeFamilles = d.readAll(Famille.class);

        //permet de faire sauter le validator JSF
       // listeFamillesAffichables = d.readAll(Famille.class);
    }

    /**
     * fabrique le produit a partir des donnée affiché puis le sauvgarde
     * @return
     * @throws Exception
     */
    public String submit() throws Exception {
       ProduitDelegateImpl d = new ProduitDelegateImpl();

       Produit p = new Produit();
       p.setDesignation(designation);
       p.setRecu(Double.parseDouble(txRecu));
       p.setIncompressible(Double.parseDouble(txIncompressible));
       p.setVerseeAuCgp(Double.parseDouble(txVerseCGP));
       p.setVerseeAuDr(Double.parseDouble(txVerseDR));

       Famille f = new Famille();
       Gamme g = new Gamme();

       for (int i=0; i<listeGammesAffichables.size(); i++){
           if (listeGammesAffichables.get(i).getLibelle().equals(nomGamme)){
               g = listeGammesAffichables.get(i);
           }
       }

       for (int i=0; i<listeFamillesAffichables.size(); i++){
           if (listeFamillesAffichables.get(i).getLibelle().equals(nomFamille)){
               f = listeFamillesAffichables.get(i);
           }
       }

       f.setGamme(g);
       p.setFamille(f);

       d.create(p);

       return "../vues/rechercherProduit.xhtml";    
    }

    /**
     * Retourne la liste des famille disponible dans la gamme selectionée
     * @param event
     */
    public void filterFamily(javax.faces.event.ValueChangeEvent event){
        listeFamillesAffichables = new ArrayList<Famille>();
        for (int i=0; i<listeFamilles.size(); i++){
            if (listeFamilles.get(i).getGamme().getLibelle().equals((String)event.getNewValue())){
                listeFamillesAffichables.add(listeFamilles.get(i));
            }
        }
    }
}

facelet component :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- 
    prend en parametre :
    nomGamme
    listeGammesAffichables
    nomFamille
    listeFamillesAffichables
    nomFournisseur
    listeFournisseurAffichables
    designation
    txRecu
    txVerseCGP
    txVerseDR
    txIncompressible
    indications
    >>>methode<<<<
    filterFamily
     -->
<ui:composition 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:mytaglib="http://mytaglib.com/facelets"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a4j="http://richfaces.org/a4j">

        <h:panelGrid columns="4" width="800">
            <h:column>
                <h:outputText value="#{msg['Gamme']}" />:
            </h:column>
            <h:column>
                <h:selectOneMenu value="#{nomGamme}"
                valueChangeListener="#{filterFamily}">
                <f:selectItem itemLabel="-" itemValue="-" />
                <f:selectItems value="#{listeGammesAffichables}" var="g"
                itemValue="#{g.libelle}" itemLabel="#{g.libelle}" />
                <a4j:ajax event="valueChange" render="second" execute="@this" />
                </h:selectOneMenu>
            </h:column>
            <h:column>
                <h:outputText value="#{msg['Famille']}" />:
            </h:column>
            <h:column>
                <a4j:outputPanel id="second">
                <h:selectOneMenu value="#{nomFamille}">
                <f:selectItem itemLabel="-" itemValue="-" />
                <f:selectItems value="#{listeFamillesAffichables}" var="f"
                itemValue="#{f.libelle}" itemLabel="#{f.libelle}" />
                </h:selectOneMenu>
                </a4j:outputPanel>
            </h:column>
            <h:column>
                <h:outputText value="#{msg['Fournisseur']}" />: *
            </h:column>
            <h:column>
                <h:selectOneMenu value="#{nomFournisseur}">
                <f:selectItem itemLabel="-" itemValue="-" />
                <f:selectItems value="#{listeFournisseurAffichables}" var="g"
                itemValue="#{g.libelle}" itemLabel="#{g.libelle}" />
                </h:selectOneMenu>
            </h:column>
            <h:column>
            </h:column>
        </h:panelGrid>
        <br />
        <br />
        <h:outputText value="#{msg['DesignationProduit']}" />
        : *
        <br />
        <br />
        <h:inputText value="#{designation}" id="designation"
        style="#{component.valid ? '' : 'border-color:red;border-width:2px'}">
        <f:validateRegex pattern="^([a-zA-Z'àâéèêôùûçÀÂÉÈÔÙÛÇ0-9\s-]{1,30})$"></f:validateRegex>
        <rich:validator />
        </h:inputText>
        <h:message for="designation" />
        <br />
        <br />
        <h:outputText value="#{msg['TauxDeComission']}" />
        : *
        <br />
        <br />
        <h:panelGrid  columns="4" headerClass="heading"
        rowClasses="row1,row2">
        <h:column>
            <h:outputText value="#{msg['TxRecu']}" />
        </h:column>
        <h:column>
            <h:inputText value="#{txRecu}"
            style="#{component.valid ? '' : 'border-color:red;border-width:2px'}"
            id="TxRecu">
            <f:validateRegex pattern="^[0-9]*.?[0-9]+$"></f:validateRegex>
            <rich:validator />
            </h:inputText>
        </h:column>
        <h:column>
            <h:outputText value="#{msg['TxVerseCGP']}" />
        </h:column>
        <h:column>
            <h:inputText value="#{txVerseCGP}"
            style="#{component.valid ? '' : 'border-color:red;border-width:2px'}"
            id="TxVerseCGP">
            <f:validateRegex pattern="^[0-9]*.?[0-9]+$"></f:validateRegex>
            <rich:validator />
            </h:inputText>
        </h:column>
        <h:column>
            <h:outputText value="#{msg['TxVerseDR']}" />
        </h:column>
        <h:column>
            <h:inputText value="#{txVerseDR}"
            style="#{component.valid ? '' : 'border-color:red;border-width:2px'}"
            id="TxVerseDR">
            <f:validateRegex pattern="^[0-9]*.?[0-9]+$"></f:validateRegex>
            <rich:validator />
            </h:inputText>
        </h:column>
        <h:column>
            <h:outputText value="#{msg['TxIncompressible']}" />
        </h:column>
        <h:column>
            <h:inputText value="#{txIncompressible}"
            style="#{component.valid ? '' : 'border-color:red;border-width:2px'}"
            id="TxIncompressible">
            <f:validateRegex pattern="^[0-9]*.?[0-9]+$"></f:validateRegex>
            <rich:validator />
            </h:inputText>
        </h:column>
    </h:panelGrid>
    <br />
    <br />
    <h:outputText value="#{msg['Indications']}" />
    : *
    <br />
    <br />
    <h:inputTextarea value="#{indications}" cols="113"
        rows="10"
        style="#{component.valid ? '' : 'border-color:red;border-width:2px'}"
        id="indications">
        <f:validateRegex pattern="^([a-zA-Z'àâéèêôùûçÀÂÉÈÔÙÛÇ0-9\s-]{1,1000})$"></f:validateRegex>
        <rich:validator />
    </h:inputTextarea>
<br />
<br />
        <div class="boutons">
                <span><h:commandButton type="submit"
                        value="#{msg['Enregistrer']}" action="#{creerProduit.submit}" /></span> <span><h:commandButton
                        value="#{msg['Reinitialiser']}" type="reset" /></span> <span><h:commandButton
                        value="#{msg['Annuler']}" action="rechercherProduit.xhtml"
                        onclick="return confirm('#{msg['ConfirmerAnnulation']}');"
                        immediate="true" /></span>
            </div>
</ui:composition>

And here is how I call it in the jsf page :

<mytaglib:cmProduit 
                nomGamme="#{creerProduit.nomGamme}"
                listeGammesAffichables="#{creerProduit.listeGammesAffichables}"
                nomFamille="#{creerProduit.nomFamille}"
                listeFamillesAffichables="#{creerProduit.listeFamillesAffichables}"
                nomFournisseur="#{creerProduit.nomFournisseur}"
                listeFournisseurAffichables="#{creerProduit.listeFournisseurAffichables}"
                designation="#{creerProduit.designation}"
                txRecu="#{creerProduit.txRecu}"
                txVerseCGP="#{creerProduit.txVerseCGP}"
                txVerseDR="#{creerProduit.txVerseDR}"
                txIncompressible="#{creerProduit.txIncompressible}"
                indications="#{creerProduit.indications}"
                filterFamily="#{creerProduit.filterFamily}"
                 />

And when I redefine range, my tomcat is saying this :

GRAVE: /WEB-INF/forms/formProduit.xhtml @34,43 valueChangeListener=”#{filterFamily}”: /vues/creerProduit.xhtml @56,8 filterFamily=”#{creerProduit.filterFamily}”: Property ‘filterFamily’ not found on type com.me.web.beans.produit.CreerProduitBean
javax.faces.event.AbortProcessingException: /WEB-INF/forms/formProduit.xhtml @34,43 valueChangeListener=”#{filterFamily}”: /vues/creerProduit.xhtml @56,8 filterFamily=”#{creerProduit.filterFamily}”: Property ‘filterFamily’ not found on type com.me.web.beans.produit.CreerProduitBean

any idea why I can’t call this method?

  • 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-07T22:12:08+00:00Added an answer on June 7, 2026 at 10:12 pm

    That’s not a composite component. That’s also not a custom component. That’s a tag file. You need to declare the attribute as a method expression using <method-signature> in the .taglib.xml file. Otherwise it will default to a value expression which expects a property with a getter/setter.

    <attribute>
        <name>filterFamily</name>
        <method-signature>void method(javax.faces.event.ValueChangeEvent)</method-signature>
    </attribute>
    

    In a real composite component, you can declare it as <cc:attribute method-signature> instead.

    <cc:attribute name="filterFamily" method-signature="void method(javax.faces.event.ValueChangeEvent)" />
    

    See also:

    • When to use <ui:include>, tag files, composite components and/or custom components?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a form that consist of two textfield and one combobox. i want
Hello my smart friends i have this contact form that i am working on.
I have this form, in which i need to populate a combo box with
I have this form: <%= form_tag posts_path, :method => :get, :class => search_nav do
i have this form to serialize once i click the submit button, <form class=cashier_forms
I have this form: <tbody> <tr> <th>ID</th> <th>Name</th> <th>Birthdate</th> <th><input type=text autofocus=autofocus name=textinput1/></th> <th><input
I have this Form I am trying to upload my image but every time
I have this: form = $('#<%= params[:board_id] %>'); var $parent = form.closest(.biscuit).eq(0); I want
I have this form with a date input. echo $this->Form->create('Nodata'); echo $this->Form->input('date1', array('type' =>
I have this form: <form> <div class=box> <h1>Contact form :</h1> <label> <span>Typ: </span> <input

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.