8 Replies Latest reply on Dec 15, 2007 6:30 AM by Saeed Iqbal

    Problem with SelectOneMenu

    hager hager Newbie

      Hello,
      I'm using h:selectOneMenu and I have a problem :
      I fill my selectOneMenu with a List, when i submit my form, I remove the selected Item in the selectOneMenu.
      In my java code, when i debug, the selectedValue is deleted from the List, BUT when the page is submitted, the element still here.
      What's the problem, please help me. thanks

      mypage.xhtml


      <h:selectOneMenu id="selectOneAssignable" value="#{activitesByCollaborateurCrossData.assignable}">
      <s:selectItems
      value="#{activitesByCollaborateurCrossData.availableLines}"
      var="assign" label="#{assign.designation}"
      id="selectAssignable" />
      <s:convertEntity />
      </h:selectOneMenu>
      <h:commandLink action="#{activitesByCollaborateurCrossData.updateAssignable}">
      <h:graphicImage value="img/add.png" />
      </h:commandLink>



      in mybean.java

      public void addAssignable() {
       if(this.assignable != null){
       System.out.println("removed = "+this.availableLines.remove(this.assignable));
       this.lignes.add(assignable);
       listeAssignables.put(assignable.getDesignation(), assignable);
       Totaux.put(assignable.getDesignation(), new Float(0));
       this.updateTable();
       }
       }


        • 1. Re: Problem with SelectOneMenu
          hager hager Newbie

           

          public void updateAssignable()
           {
           System.out.println("updateAssignable ");
           this.addAssignable();
           }


          • 2. Re: Problem with SelectOneMenu
            Pete Muir Master

            I don't really understand.

            • 3. Re: Problem with SelectOneMenu
              hager hager Newbie

              hi,
              I have a selectOneMenu and a commandLink.
              when I click on this commandLink, I call a method which remove the selectItem on the selectOneMenu. After executing this method, in my List (java code), the element is deleted.So, the page is submitted, BUT, in my view, the element still here.
              thanks.

              • 4. Re: Problem with SelectOneMenu
                Pete Muir Master

                Are you updating the list outjected to the view. Show the code.

                • 5. Re: Problem with SelectOneMenu
                  hager hager Newbie

                  yes, exactly

                  this is my code :

                  @Out(scope = ScopeType.CONVERSATION)
                   private List<Assignable> availableLines;
                  
                   public void addAssignable() {
                   if(this.assignable != null){
                   System.out.println("removed = "+this.availableLines.remove(this.assignable));
                   for(Assignable it : this.availableLines)
                   {
                   System.out.println("Lignes Restantes : "+it.getDesignation());
                   }
                   this.lignes.add(assignable);
                   listeAssignables.put(assignable.getDesignation(), assignable);
                   Totaux.put(assignable.getDesignation(), new Float(0));
                   this.updateTable();
                   this.assignable = null;
                   }
                   }


                  • 6. Re: Problem with SelectOneMenu
                    hager hager Newbie

                    here my Bean.java:

                    package crossTable.action;
                    
                    import java.util.ArrayList;
                    import java.util.Calendar;
                    import java.util.Date;
                    import java.util.Iterator;
                    import java.util.List;
                    import java.util.Map;
                    import java.util.TreeMap;
                    
                    import javax.ejb.Remove;
                    import javax.ejb.Stateful;
                    
                    import org.jboss.seam.annotations.Begin;
                    import org.jboss.seam.annotations.Create;
                    import org.jboss.seam.annotations.Destroy;
                    import org.jboss.seam.annotations.In;
                    import org.jboss.seam.annotations.Name;
                    import org.jboss.seam.annotations.web.RequestParameter;
                    import org.jboss.seam.faces.FacesMessages;
                    
                    import com.fitnetapplication.resources.model.Assignable;
                    import com.fitnetapplication.resources.model.Collaborateur;
                    import com.fitnetapplication.resources.model.CollaborateurAffecte;
                    import com.fitnetapplication.resources.model.CollaborateurAffecteAstreinte;
                    import com.fitnetapplication.resources.model.CollaborateurHome;
                    import com.fitnetapplication.resources.model.CollaborateurList;
                    import com.fitnetapplication.resources.model.OperationsDiverses;
                    import com.fitnetapplication.resources.model.OperationsDiversesHome;
                    import com.fitnetapplication.resources.model.Regie;
                    import com.fitnetapplication.resources.model.Societe;
                    import com.fitnetapplication.resources.model.SocieteHome;
                    import com.fitnetapplication.resources.model.TypeAbsenceList;
                    import com.fitnetapplication.resources.model.TypeOperation;
                    import com.fitnetapplication.resources.service.ContratService;
                    import com.fitnetapplication.resources.service.DateService;
                    import com.fitnetapplication.resources.view.GestionConfiguration;
                    
                    import crossTable.Cell;
                    import crossTable.Column;
                    import crossTable.GenericCrossTable;
                    import crossTable.Line;
                    
                    @Stateful
                    @Name("activitesByCollaborateurCrossData")
                    public class activitesByCollaborateurCrossDataBean implements activitesByCollaborateurCrossData {
                    
                     /**
                     * Les Injections
                     */
                    
                     @In
                     FacesMessages facesMessages;
                    
                     @In(create=true)
                     OperationsDiversesHome operationsDiversesHome;
                    
                     @In
                     GestionConfiguration gestionConfiguration;
                    
                     @In(create = true)
                     private CollaborateurHome collaborateurHome;
                    
                     @In(create = true)
                     private CollaborateurList collaborateurList;
                    
                     @In(create = true)
                     private TypeAbsenceList typeAbsenceList;
                    
                     @In(create=true)
                     private SocieteHome societeHome;
                    
                     /**
                     * Les attributs de la Classe
                     */
                    
                     private List<Date> colonnes;
                    
                     /**
                     * cet attribut va contenir toutes les lignes Assignables
                     */
                     private List<Assignable> lignes;
                    
                     private List<Assignable> lignesBoiteNoire;
                    
                     /**
                     * cet attribut rempli le selectOneMenu au niveau de la Vue
                     */
                     private List<Assignable> availableLines;
                    
                     /**
                     * Cet attribut contient la valeur séléctionné à partir du selectOneMenu
                     */
                     private Assignable assignable;
                    
                     /**
                     * Date de Debut pour la saisie d'activité
                     */
                     private Date dateDebut;
                    
                     /**
                     * Date de Fin de la saisie d'activité
                     */
                     private Date dateFin;
                    
                     private String ligne;
                    
                     /**
                     * Map qui va contenir pour chaque designation de l'assignable, la valeur de sa charge (exprimée en jours)
                     */
                     private Map<String, Float> Totaux = new TreeMap<String, Float>();
                    
                     /**
                     * Map qui va contenir pour chaque designation, l'assignable correspondant
                     */
                     private Map<String, Assignable> listeAssignables = new TreeMap<String, Assignable>();
                    
                     private boolean pof;
                    
                     /**
                     * Contient le collaborateur séléctionné
                     */
                     private Collaborateur selectedCollaborateur;
                    
                     /**
                     * La CROSS DATA TABLE
                     */
                     private GenericCrossTable<Assignable, Date, Float> boiteNoire;
                    
                     @RequestParameter(value="realise")
                     private Boolean realise = new Boolean(false);
                    
                    
                     /**
                     * Les Setters et les Getters
                     */
                    
                     public List<Date> getColonnes()
                     {
                     return this.colonnes;
                     }
                    
                     public void setColonnes(List<Date> colonnes)
                     {
                     this.colonnes = colonnes;
                     }
                    
                     public List<Assignable> getLignes()
                     {
                     return this.lignes;
                     }
                    
                     public void setLignes(List<Assignable> lignes)
                     {
                     this.lignes = lignes;
                     }
                    
                     public GenericCrossTable<Assignable, Date, Float> getBoiteNoire()
                     {
                     return boiteNoire;
                     }
                    
                     public void setBoiteNoire(GenericCrossTable<Assignable, Date, Float> boiteNoire)
                     {
                     this.boiteNoire = boiteNoire;
                     }
                    
                     public Date getDateDebut()
                     {
                     return dateDebut;
                     }
                    
                     public void setDateDebut(Date dateDebut)
                     {
                     this.dateDebut = dateDebut;
                     }
                    
                     public Date getDateFin()
                     {
                     return dateFin;
                     }
                    
                     public void setDateFin(Date dateFin) {
                     this.dateFin = dateFin;
                     }
                    
                     public Collaborateur getSelectedCollaborateur()
                     {
                     return selectedCollaborateur;
                     }
                    
                     public void setSelectedCollaborateur(Collaborateur collaborateur)
                     {
                     this.selectedCollaborateur = collaborateurHome.getInstance();
                     }
                    
                     public List<Assignable> getAvailableLines()
                     {
                     availableLines.clear();
                     for(Assignable assignable : this.lignes)
                     {
                     if(!this.lignesBoiteNoire.contains(assignable))
                     {
                     System.out.println("assignable "+assignable.getDesignation());
                     this.availableLines.add(assignable);
                     }
                     }
                     return availableLines;
                     }
                    
                     public void setAvailableLines(List<Assignable> availableLines)
                     {
                     this.availableLines = availableLines;
                     }
                    
                     public Assignable getAssignable()
                     {
                     return assignable;
                     }
                    
                     public void setAssignable(Assignable assignable)
                     {
                     this.assignable = assignable;
                     }
                    
                     public TypeAbsenceList getTypeAbsenceList()
                     {
                     return typeAbsenceList;
                     }
                    
                     public void setTypeAbsenceList(TypeAbsenceList typeAbsenceList)
                     {
                     this.typeAbsenceList = typeAbsenceList;
                     }
                    
                     public void setRealise(Boolean realise)
                     {
                     this.realise = realise;
                     }
                    
                     public Boolean getRealise()
                     {
                     return this.realise;
                     }
                    
                     public String getLigne()
                     {
                     return ligne;
                     }
                    
                     public void setLigne(String ligne)
                     {
                     this.ligne=ligne;
                     }
                    
                     public void setRealise()
                     {
                     this.realise = true;
                     destroy();
                     init();
                     }
                    
                     public void setNotRealise()
                     {
                     this.realise = false;
                     destroy();
                     init();
                    
                     }
                    
                     /**
                     * Le Constructeur de la classe
                     * Au niveau de ce Constructeur, On initialise les Dates de début et de Fin
                     */
                     public activitesByCollaborateurCrossDataBean() {
                     dateDebut = DateService.normalizeMonth(new Date());
                     dateFin = DateService.normalizeMonthEnd(dateDebut);
                     }
                    
                    
                     /**
                     * Méthode Init()
                     */
                     @Create @Begin(join=true)
                     public void init()
                     {
                     System.out.println("Debut du Bean activitesByCollaborateurCrossData Avec Realise "+realise);
                     if(realise != null)
                     {
                     if(realise){
                     pof = true;
                     }
                     }
                     selectedCollaborateur = collaborateurHome.getDefinedInstance();
                     if(selectedCollaborateur == null)
                     {
                     selectedCollaborateur = (Collaborateur) collaborateurList.getResultList().get(0);
                     }
                     lignes = new ArrayList<Assignable>();
                     lignesBoiteNoire = new ArrayList<Assignable>();
                     availableLines = new ArrayList<Assignable>();
                    
                     for(CollaborateurAffecte collaborateurAffecte : selectedCollaborateur.getCollaborateurAffectes())
                     {
                     lignes.add(collaborateurAffecte);
                     listeAssignables.put(collaborateurAffecte.getDesignation(),collaborateurAffecte);
                     }
                    
                     for(Regie regie : selectedCollaborateur.getRegies())
                     {
                     lignes.add(regie);
                     listeAssignables.put(regie.getDesignation(),regie);
                     }
                    
                     this.updateOperationsDiverses(selectedCollaborateur);
                     for(OperationsDiverses operation : selectedCollaborateur.getOperationsDiverseses())
                     {
                     lignes.add(operation);
                     listeAssignables.put(operation.getDesignation(),operation);
                     }
                    
                     for(CollaborateurAffecteAstreinte collaborateurAffecteAstreinte : selectedCollaborateur.getCollaborateurAffecteAstreintes())
                     {
                     lignes.add(collaborateurAffecteAstreinte);
                     listeAssignables.put(collaborateurAffecteAstreinte.getDesignation(),collaborateurAffecteAstreinte);
                     }
                    
                     for(Assignable assignable : this.lignes)
                     {
                     this.lignesBoiteNoire.add(assignable);
                     }
                     updateTable();
                     Iterator<Line<Assignable,Float>> it = boiteNoire.getLineList().iterator();
                     while(it.hasNext())
                     {
                     Line<Assignable,Float> ligne = it.next();
                     List<Float> cellules = ligne.getCellContentList();
                     Float sommeCellulesLigne=new Float(0);
                     for (Float cellule : cellules)
                     {
                     sommeCellulesLigne+=cellule;
                     }
                    
                     if(sommeCellulesLigne==0){
                    
                     //this.availableLines.add(ligne.getLineDesignation());
                     this.lignesBoiteNoire.remove(ligne.getLineDesignation());
                     listeAssignables.remove(ligne.getLineDesignation().getDesignation());
                     }
                     }
                     updateTable();
                    
                     }
                    
                     public void updateTable()
                     {
                     String afficherConges = gestionConfiguration.getValue("Afficher Conge");
                     boolean affConge = Boolean.parseBoolean(afficherConges);
                     boiteNoire = ContratService.getSaisieActivite(selectedCollaborateur,this.lignesBoiteNoire, dateDebut,dateFin,this.pof,affConge);
                     }
                    
                     public void updateDates()
                     {
                     this.updateTable();
                     }
                    
                     @Remove
                     @Destroy
                     public void destroy()
                     {
                     System.out.println("Mort du Stateful Bean activitesByCollaborateur");
                     }
                    
                     public void sauvegarderCrossDataTable()
                     {
                     sauvegarderCrossDataTable(boiteNoire);
                     }
                    
                    
                     public void sauvegarderCrossDataTable(GenericCrossTable<Assignable, Date, Float> BoiteNoire) {
                    
                     for(Line<Assignable, Float> line : BoiteNoire.getLineList())
                     {
                     for(Cell<Float> cell : line.getCellList())
                     {
                     for(Column<Date> column : BoiteNoire.getColumnList())
                     {
                     if ((column.getColumnId() == cell.getColumnId())&&(!line.getLineDesignation().getDesignation().equalsIgnoreCase("Total")))
                     {
                     try
                     {
                     if(cell.getCellValue()!=0)
                     {
                     if(pof)
                     {
                     line.getLineDesignation().setChargeEffective(column.getColumnDesignation(),cell.getCellValue());
                     }
                     else
                     {
                     line.getLineDesignation().setChargePrevisionnelle(column.getColumnDesignation(),cell.getCellValue());
                     }
                     }
                     }
                     catch(Exception e)
                     {
                     e.printStackTrace();
                     }
                     }
                     }
                     }
                     }
                    
                     //Sauvegarde de toutes les modifications
                     /*Societe currentSociete = selectedCollaborateur.getSociete();
                     societeHome.setInstance(currentSociete);
                     societeHome.persist();*/
                     this.updateTable();
                     }
                    
                     /**
                     * Méthode qui décrémente la semaine
                     */
                     public void decrementWeek()
                     {
                     this.updateWeek(DateService.decrementWeek(this.dateDebut));
                     }
                    
                     /**
                     * Méthode qui retourne la semaine
                     */
                     public String getCurrentWeek()
                     {
                     return "Semaine " + DateService.weekNumber(this.dateDebut);
                     }
                    
                     /**
                     * Méthode qui incrémente la semaine
                     */
                     public void incrementWeek()
                     {
                     this.updateWeek(DateService.incrementWeek(this.dateDebut));
                     }
                    
                     /**
                     *
                     * @param dateDebut
                     */
                     private void updateWeek(Date dateDebut)
                     {
                     this.dateDebut = dateDebut;
                     this.dateFin = DateService.incrementWeek(dateDebut);
                     this.updateTable();
                     }
                    
                    
                    
                     /**
                     * Méthode permettant d'ajouter l'assignable à la cross DataTable
                     */
                     public void addAssignable()
                     {
                     if(this.assignable != null)
                     {
                     this.lignesBoiteNoire.add(assignable);
                     listeAssignables.put(assignable.getDesignation(), assignable);
                     Totaux.put(assignable.getDesignation(), new Float(0));
                     this.updateTable();
                     if(!this.getAvailableLines().isEmpty())
                     {
                     this.assignable = this.getAvailableLines().get(0);
                     }
                    
                     }
                     }
                    
                    
                     /**
                     *
                     */
                     public void debut()
                     {
                     System.out.println(realise);
                     if (selectedCollaborateur != collaborateurHome.getDefinedInstance())
                     init();
                     }
                    
                    
                     /**
                     * Méthode
                     * @param collaborateur
                     */
                     public void updateOperationsDiverses(Collaborateur collaborateur)
                     {
                     List<OperationsDiverses> operations = new ArrayList<OperationsDiverses>();
                     operations.addAll(collaborateur.getOperationsDiverseses());
                     List<TypeOperation> typeOperations = new ArrayList<TypeOperation>();
                     Societe societe = collaborateur.getSociete();
                     typeOperations.addAll(societe.getTypeOperations());
                     for(TypeOperation typeOperation : typeOperations){
                     if(!containsTypeOperation(operations, typeOperation)){
                     //Le lien n'existait pas, creation de celui-ci
                     OperationsDiverses chainonManquant = new OperationsDiverses();
                     chainonManquant.setOperationsDiversesId(0);
                     chainonManquant.setTypeOperation(typeOperation);
                     chainonManquant.setCollaborateur(collaborateur);
                     collaborateur.getOperationsDiverseses().add(chainonManquant);
                     operationsDiversesHome.setInstance(chainonManquant);
                     operationsDiversesHome.persist();
                     }
                     }
                     }
                    
                     /**
                     * Méthode qui permet d'indiquer si le typeOperation est contenue dans la liste operations
                     * @param operations : la liste de type d'opérations
                     * @param typeOperation : le type d'opération
                     * @return True si typeOperation est contenue dans operations, sinon False
                     */
                     public boolean containsTypeOperation(List<OperationsDiverses> operations, TypeOperation typeOperation)
                     {
                     for(OperationsDiverses operation : operations){
                     if(operation.getTypeOperation().equals(typeOperation)){
                     return true;
                     }
                     }
                     return false;
                     }
                    
                     /**
                     * Methode qui supprime une ligne de la cross dataTable, et qui remet à zéro la valeur de la charge effective ou prévisionnelle
                     */
                     public void supprimerLigne()
                     {
                     Calendar debut = DateService.turnDateToCalendar(dateDebut);
                     Calendar fin = DateService.turnDateToCalendar(dateFin);
                     for (Calendar mois = debut; mois.before(fin); mois.add(Calendar.MONTH, 1))
                     {
                     if(pof)
                     {
                     listeAssignables.get(ligne).setChargeEffective(mois.getTime(),0);
                     }
                     else
                     {
                     listeAssignables.get(ligne).setChargePrevisionnelle(mois.getTime(),0);
                     }
                     }
                     availableLines.add(listeAssignables.get(ligne));
                     this.lignesBoiteNoire.remove(listeAssignables.get(ligne));
                     listeAssignables.remove(ligne);
                     updateTable();
                     }
                    }




                    and my view.xhtml

                    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                     xmlns:s="http://jboss.com/products/seam/taglib"
                     xmlns:ui="http://java.sun.com/jsf/facelets"
                     xmlns:f="http://java.sun.com/jsf/core"
                     xmlns:h="http://java.sun.com/jsf/html"
                     xmlns:a4j="http://richfaces.org/a4j"
                     xmlns:rich="http://richfaces.org/rich"
                     xmlns:c="http://java.sun.com/jstl/core"
                     template="layout/template.xhtml">
                    
                     <ui:define name="body">
                     <h:panelGrid columns="1" styleClass="ThemeGrayMenu"
                     headerClass="th_m_jscook" cellspacing="0"
                     rendered="#{identity.loggedIn}" width="100%">
                     <f:facet name="header">
                     <h:panelGroup>
                     <h:panelGrid columns="1" styleClass="table_m" headerClass="th_m"
                     rowClasses="td_m" width="100%">
                    
                     <f:facet name="header">
                     <h:panelGroup>
                     <h:outputText
                     value="#{msgDropDownMenu.saisieEffectif} pour #{selectedCollaborateur.nomEtPrenom}:"
                     rendered="#{pof}" />
                    
                    
                     <h:outputText
                     value="#{msgDropDownMenu.saisiePrevisionnel} pour #{selectedCollaborateur.nomEtPrenom}:"
                     rendered="#{!pof}" />
                     </h:panelGroup>
                     </f:facet>
                    
                    
                     <h:form id="activitesByCollaborateurCrossDataForm">
                     <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
                     <h:panelGrid columns="3">
                     <h:panelGrid columns="3">
                     <h:outputText value="#{msgsMenu.dateDebut} : " />
                     <h:inputText id="dateDebut" size="16" required="true"
                     value="#{activitesByCollaborateurCrossData.dateDebut}">
                     <s:convertDateTime pattern="dd/MM/yyyy" />
                     </h:inputText>
                     <s:selectDate for="dateDebut" dateFormat="dd/MM/yyyy">
                     <h:graphicImage url="img/dtpick.gif" style="margin-left:5px" />
                     </s:selectDate>
                     </h:panelGrid>
                     <h:panelGrid columns="3">
                     <h:outputText value="#{msgsMenu.dateFin} : " />
                     <h:inputText id="dateFin" size="16" required="true"
                     value="#{activitesByCollaborateurCrossData.dateFin}">
                     <s:convertDateTime pattern="dd/MM/yyyy" />
                     </h:inputText>
                     <s:selectDate for="dateFin" dateFormat="dd/MM/yyyy">
                     <h:graphicImage url="img/dtpick.gif" style="margin-left:5px" />
                     </s:selectDate>
                     </h:panelGrid>
                     <h:commandLink value="" id="majDates"
                     action="#{activitesByCollaborateurCrossData.updateDates}">
                     <h:graphicImage value="img/tick.png" />
                     <s:conversationId />
                     </h:commandLink>
                     </h:panelGrid>
                    
                     <h:panelGrid columns="4">
                    
                     <h:selectOneMenu id="selectOneAssignable"
                     value="#{activitesByCollaborateurCrossData.assignable}">
                     <s:selectItems
                     value="#{activitesByCollaborateurCrossData.availableLines}"
                     var="assign" label="#{assign.designation}"
                     id="selectAssignable" />
                     <s:convertEntity />
                     </h:selectOneMenu>
                     <h:commandLink action="#{activitesByCollaborateurCrossData.addAssignable}">
                     <h:graphicImage value="img/add.png" />
                     <s:conversationId />
                     </h:commandLink>
                    
                     </h:panelGrid>
                    
                     <h:panelGrid columns="1">
                     <h:dataTable
                     value="#{activitesByCollaborateurCrossData.boiteNoire.lineDataModel}"
                     var="lineSimple" styleClass="table_s" columnClasses="table_s"
                     headerClass="th_s" rowClasses="td1_s,td2_s">
                    
                    
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="Activite" />
                     </f:facet>
                     <h:outputText value="#{lineSimple.lineDesignation.designation}">
                     <f:convertDateTime type="date" pattern="MMMMM yyyy" />
                     </h:outputText>
                     </h:column>
                    
                     <c:forEach
                     items="#{activitesByCollaborateurCrossData.boiteNoire.columnDataModel.wrappedData}"
                     var="columnSimple">
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="#{columnSimple.columnDesignation}">
                     <s:convertDateTime pattern="MMMMM yyyy" />
                     </h:outputText>
                     </f:facet>
                     <h:outputText style="align: left"
                     value="#{lineSimple.cellList[columnSimple.columnId].cellValue}"
                     rendered="#{lineSimple.lineDesignation.designation=='Total' || lineSimple.lineDesignation.designation=='Conges' || lineSimple.lineDesignation.designation=='Jours Ouvres'}">
                     <f:converter converterId="javax.faces.Float" />
                    
                     </h:outputText>
                     <h:inputText style="text-align:center;"
                     value="#{lineSimple.cellList[columnSimple.columnId].cellValue}"
                     rendered="#{lineSimple.lineDesignation.designation!='Total' and lineSimple.lineDesignation.designation!='Conges' and lineSimple.lineDesignation.designation!='Jours Ouvres'}">
                     <f:converter converterId="javax.faces.Float" />
                    
                     </h:inputText>
                    
                     </h:column>
                    
                     </c:forEach>
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="Action" />
                     </f:facet>
                     <s:link
                     rendered="#{lineSimple.lineDesignation.designation!='Total' and lineSimple.lineDesignation.designation!='Conges' and lineSimple.lineDesignation.designation!='Jours Ouvres'}"
                     id="delete"
                     action="#{activitesByCollaborateurCrossData.supprimerLigne}">
                     <f:param name="ligne"
                     value="#{lineSimple.lineDesignation.designation}" />
                    
                     <h:graphicImage value="/img/delete.gif" />
                     </s:link>
                     </h:column>
                    
                     </h:dataTable>
                     </h:panelGrid>
                     <h:panelGrid columns="2">
                     <s:link view="/Societe.xhtml" id="done" propagation="end">
                     <h:graphicImage value="/img/house_go.gif" />
                     </s:link>
                     <h:commandButton id="sauvegarderCrossDataTableBouton" value=""
                     action="#{activitesByCollaborateurCrossData.sauvegarderCrossDataTable}"
                     image="/img/disk.gif">
                     <s:conversationId />
                     </h:commandButton>
                    
                     </h:panelGrid>
                    
                     <h:panelGrid columns="1" styleClass="table_m" headerClass="th_m"
                     rowClasses="td_m" width="100%">
                     <f:facet name="header">
                     <h:outputText value="#{msgCollaborateur.entityName}" />
                     </f:facet>
                     <h:outputText
                     value="#{msgCollaborateur.entityName} #{msgsCommon.aucuneSelection}"
                     rendered="#{empty societeHome.collaborateurs}" />
                    
                     <h:dataTable value="#{collaborateurList.resultList}"
                     var="collaborateur"
                     rendered="#{not empty societeHome.collaborateurs}"
                     styleClass="table_s" columnClasses="table_s"
                     rowClasses="td1_s,td2_s" headerClass="th_s"
                     rowOnMouseOver="this.style.backgroundColor='#A5CBFF'"
                     rowOnMouseOut="this.style.backgroundColor='#FFFFE0'"
                     rowOnClick="this.style.backgroundColor='#FFE0E0'"
                     rowOnDblClick="this.style.backgroundColor='#E0E0E0'"
                     id="collaborateursxlsTable">
                    
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="action" />
                     </f:facet>
                     <s:link id="selectcollaborateur"
                     view="/PageactivitesByCollaborateurCrossData.xhtml"
                     action="#{activitesByCollaborateurCrossData.debut}">
                     <h:graphicImage value="/img/folder.gif" />
                     <f:param name="collaborateurCollaborateurId"
                     value="#{collaborateur.collaborateurId}" />
                     <f:param name="collaborateurFrom" value="Societe" />
                     <f:param name="realise"
                     value="#{activitesByCollaborateurCrossData.realise}" />
                    
                     </s:link>
                     </h:column>
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="#{msgCollaborateur.nom}" />
                     </f:facet>
                     <h:outputText value="#{collaborateur.nom}" />
                     </h:column>
                    
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="#{msgCollaborateur.prenom1}" />
                     </f:facet>
                     <h:outputText value="#{collaborateur.prenom1}" />
                     </h:column>
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="#{msgCollaborateur.type}" />
                     </f:facet>
                     <h:outputText
                     value="#{collaborateurHome.typeCollaborateurMap[collaborateur.type]}" />
                     </h:column>
                    
                     <h:column>
                     <f:facet name="header">
                     <h:outputText value="#{msgCollaborateur.codeCollaborateur}" />
                     </f:facet>
                     <h:outputText value="#{collaborateur.matriculeView}" />
                     </h:column>
                    
                    
                     <h:column>
                     <f:facet name="header">
                     <h:outputText
                     value="#{msgCollaborateur.numeroSecuriteSociale}" />
                     </f:facet>
                     <h:outputText value="#{collaborateur.numeroSecuriteSociale}" />
                     </h:column>
                    
                     </h:dataTable>
                    
                     </h:panelGrid>
                    
                     <h:panelGrid columns="4">
                     <s:link view="/PageactivitesByCollaborateurCrossData.xhtml"
                     rendered="#{collaborateurList.previousExists}" id="firstPage">
                     <h:graphicImage value="img/resultset_first.png" />
                     <f:param name="firstResult" value="0" />
                     <f:param name="realise"
                     value="#{activitesByCollaborateurCrossData.realise}" />
                     </s:link>
                     <s:link view="/PageactivitesByCollaborateurCrossData.xhtml"
                     rendered="#{collaborateurList.previousExists}" id="previousPage">
                     <h:graphicImage value="img/resultset_previous.png" />
                     <f:param name="firstResult"
                     value="#{collaborateurList.previousFirstResult}" />
                     <f:param name="realise"
                     value="#{activitesByCollaborateurCrossData.realise}" />
                     </s:link>
                     <s:link view="/PageactivitesByCollaborateurCrossData.xhtml"
                     rendered="#{collaborateurList.nextExists}" id="nextPage">
                     <h:graphicImage value="img/resultset_next.png" />
                     <f:param name="firstResult"
                     value="#{collaborateurList.nextFirstResult}" />
                     <f:param name="realise"
                     value="#{activitesByCollaborateurCrossData.realise}" />
                     </s:link>
                     <s:link view="/PageactivitesByCollaborateurCrossData.xhtml"
                     rendered="#{collaborateurList.nextExists}" id="lastPage">
                     <h:graphicImage value="img/resultset_last.png" />
                     <f:param name="firstResult"
                     value="#{collaborateurList.lastFirstResult}" />
                     <f:param name="realise"
                     value="#{activitesByCollaborateurCrossData.realise}" />
                     </s:link>
                     </h:panelGrid>
                     </h:form>
                     </h:panelGrid>
                     </h:panelGroup>
                     </f:facet>
                     </h:panelGrid>
                    
                    
                     </ui:define>
                    </ui:composition>


                    please help me, this problem make me crasy.
                    thank you very much

                    • 7. Re: Problem with SelectOneMenu
                      Saeed Iqbal Novice

                      I am having a similar issue.

                      • 8. Re: Problem with SelectOneMenu
                        Saeed Iqbal Novice

                        I fixed my issues by implementing
                        public boolean equals(Object obj)
                        and public int hashCode()
                        in the entity bean