JSF Validations & Hibernate cglib

Hi,
I'm having some trouble with using Hibernate with JSF.
When using hibernate, lazy loaded.
The problem is that i now have a CGLIB-enhanced version of one of my domain objects. The value of which is to be compared to a list of selectitems.
As it turns out, JSF tries casting my normal objects to a version of those EnhancedObjects, which gives me an IllegalArgumentException because of course the Parent class (ConfigProfile) cannot be cast to one of it's children (ConfigProfile$$EnhancerByCGLibxxx$$)
Has anyone ever come across this problem, and knows how to handle it ?
Thanks in advance !
Jeroen
My Exception :
12-jan-2007 11:18:14 com.sun.faces.lifecycle.ProcessValidationsPhase execute
WARNING: Cannot convert com.watchtalk.web.businessobject.ConnectProfile@966905 of type class com.watchtalk.web.businessobject.ConnectProfile to class com.watchtalk.web.businessobject.ConnectProfile$$EnhancerByCGLIB$$b8f981a2
java.lang.IllegalArgumentException: Cannot convert com.watchtalk.web.businessobject.ConnectProfile@966905 of type class com.watchtalk.web.businessobject.ConnectProfile to class com.watchtalk.web.businessobject.ConnectProfile$$EnhancerByCGLIB$$b8f981a2
     at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:367)
     at com.sun.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:52)
     at javax.faces.component.UISelectOne.matchValue(Unknown Source)
     at javax.faces.component.UISelectOne.validateValue(Unknown Source)
     at javax.faces.component.UIInput.validate(Unknown Source)
     at javax.faces.component.UIInput.executeValidate(Unknown Source)
     at javax.faces.component.UIInput.processValidators(Unknown Source)
     at javax.faces.component.UIForm.processValidators(Unknown Source)
     at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
     at javax.faces.component.UIViewRoot.processValidators(Unknown Source)
     at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(Unknown Source)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
     at javax.faces.webapp.FacesServlet.service(Unknown Source)

In my case the exception was from expr.setValue(el, bo), where the Object before was a CGLIB-Proxy and the new Class wasn't. The Solution was to set the value NULL, before set the new Object.
FacesContext context = FacesContext.getCurrentInstance();
ELContext el = context.getELContext();
ExpressionFactory ef = context.getApplication().getExpressionFactory();
ValueExpression expr = ef.createValueExpression(el, "${Businessobject}", Businessobject.class);
Service service = (Service) getBeanFromContext(service);
Businessobject bo = service.createBusinessobject();
expr.setValue(el, null);
expr.setValue(el, bo);
I hope this will be helpful for you.

Similar Messages

  • How to persist parent  and child tree node data through JSF and Hibernate

    Dear dudes,
    I'm a novice to JSF and Hibernate
    Actually i want to create a tree structure where for each child node, i should have the parent node reference in my form and then when i save, i need to save the corresponding child node data in the database.
    node-1
      node 1-1
         node 1-11a
      node 1-2
    node-2
       node 2-1
       node2-2Whenever i click node 1-1 the corresponding parent node ( node-1) reference should appear in my form and when i save this data this data should be saved under parent node and the tree should be re-rendered.
    How this can be accomplished and if there are any URL's please refer.

    Everybody need not face the same problem you faced. And moreover, everyone out here have their own issues to solve. If people are helping out here, its cause of their passion. Please try to be polite.
    First of all, what is that you have tried on the issue? Could you please share your work so that we can try to fill the gaps?

  • JSF Validator Lifecycle

    Hi all,
    I'm planning to check the username and password using jsf validator, however I'm a bit worry about the security when passing the value to the server. Will the value exposed when the validator is called?
    At first I planned to do some hashing before it transfer to server, however if it's hashed, then validation cannot be done, since the value already hashed.
    Any suggestion?
    Thanks.

    The validate() method accepts the UIComponent being validated, in this case the <h:inputText>. Use the UIInput.resetValue() method on it.

  • JHS and JSF Validation Conversion Error Customizations

    Hello
    Have JHS done any work about JSF validation or conversion error customizations?
    I mean the error messages such as "lablename:"value mus be entered etc.
    What can i do if i want to globally customize and localize this error messages.
    I have copied the key such as "javax.faces.component.UIInput.REQUIRED" in my appdeff resource bundle but JHS (or maybe ADF) gives own message yet.
    I Apologize if my problem don't depend on JHS. I wonder that JHS overrided JSF default messages.
    Thank You

    JHeadstart does not use any JSF standard message.
    JHeadstart uses ADF Faces which comes with its own bundle of error messages.
    Please use the JDeveloper forum for instructions on modifying ADF Faces error messages.
    Steven Davelaar,
    JHeadstart Team.

  • Skip JSF validation

    Hi,
    I have 1 form with 1 commanButton and 1 commanLink. Each form element has some validation set, e.g. required=true. When the commandButton is clicked I want to do this JSF-validation, but when the commandLink is clicked I would like to skip it. Is that possible to do in an easy way?
    Regards
    Pichdude

    Yes, very easy to do. Add the immediate="true" attribute to the commandLink.
    CowKing

  • Help me out with Directory structure for JSF+SPRING+HIBERNATE Project

    Hi frnds ,
    My name is Walter working for a startup software company . We are working on Hospital Management System (HMS) project .. MVC Architecture ...using Hibernate Spring and JSF ..we need to design Directory Structure for our project..
    plzz help me friends in suggesting MVC Directory structure ...? also plzz help me by directing me with the navigation flow?
    Thnxx in advance
    Regards
    Walter

    Thank you so much .. friends ..for your kind replies..thanks to Illu, anguquga and special thanks to BalusC for giving me the advice for hiring EE Artitech ..
    Anyways I have discussed with my teammates designing the directory structure
    anguquga your directory structure is close to what I have designed ..referiing to a sample application on web..
    Hospital Management system MVC architecture Directory structure
    This is the way the structure goes on ..
    model --> for Hibernate as well as Spring
    View --> for JSF
    src(-)
    |
    ------(-) java
         |
         -------(-) model
              |
              ------(+) businessobject
              |
              ------(-) dao
              |
              ------(+) hibernate
              |
              ------(+) exception
              |
              ------(-) service
              |
              ------ (+) impl
              |
              ------(+) util
              (-) view
              |
              ------(+) bean
              |
              ------(+) builder
              |
              ------(+) bundle
              |
              ------(+) servicelocator
              |
              ------(+) util
              |
              ------(+) validator
    (-) Web or WebRoot
    |
    ----- (-) JSP Files�etc.,
    |
    ----- (-) META-INF
    |
         ------     (+) Images
    |
         ------     (+) Scripts ==== CSS (cascading style sheets, JavaScript files etc.,)
    |
    ----- (-) WEB-INF =========xml files web.xml, faces-config.xml etc.,
         |
         -----(-) Classes
              |
    -----(-) HMS
    |
                   ----- (+) model
                   |
                   ----- (+) view
    |
    ----- (+) lib
    I am sure you may notice few errors .. if u find any plzz reply me back.... thnxx in advance for replies...and thnxx for giving your valuable replies...
    Walter (Kaleem)

  • Jsf validation

    Hi ,
    I have got a problem here.Please help me solve this.
    So its like this:
    I have one jsp(jsf)page , it has many validators .and some validation i did manually in action method.
    So the problem comes when validating when i clicked the save button first all the page level validation are validated and after giving correct value and saving again the validation message i gave are coming . So how can i get all message at a time.
    Thanks

    You can try this quick-and-dirty example:
    <h:messages globalOnly="true">
       <h:message for="tag1" />
       <f:verbatim><br/></f:verbatim>
       <h:message for="tag2" />
       ... // add other messages here
    </h:messages>Where tag1 and tag2 are id/name of your JSF tags on your form. However, I'm new to JSF so this may not be a best solution for you. You could give it a try and see how you go -:)

  • Is it possible to use a JSF Validator to perform a Dependency validation?

    I'm new to JSF, but getting more and more experience everyday. I've create some custom validators for a few input fields on my form and they are working beautifully. What I can't figure out is how to write a validator that will check a field for a value based on another fields value. For instance, I would like to require a person to enter an address if they select a Yes / No select box indicating they would like to supply an address.
    Does anyone know how I can do this? I've come up with a clunky work around by performing my dependency validations in my action page rather than a validator.
    Thanks!!!!

    Hi RaymondDeCampo.
    I have never been a big fan of how JSF (and even Struts)handle forms both in the front (the view) and the back.
    Forcing the developer to contend with writing a java class for each thinkable form does not look like a workable pattern to me. And tying the view (JSP or JSF page) tightly to the form classes and validators is also cumbersome.
    In many decent applications, the number of forms grows to more than a tiny handful and so would the number of classes that simply act as dummy data carriers.
    I do not see why I should have to maintain all the accompanying classes and validators and JSP code that each form comes with. Making changes to the structure of a form (say adding new fields or removing others, or even adding whole form pages into the sequence), modifying the model of a form (like renaming fields, adding new validation rules), or changing form view (e.g. switching from a list of checkboxes to a select dropdown, changing how and where error messages are presented, supporting a new language) are just some of those things that become tedious to maintain sentrally.
    No other model of building forms out there makes the named tasks any simpler, aprt from adding a new level of complexity to the simple data collection purpose of web forms. Well, except Formular. I have had Formular working in JSF and Struts although I ended up ditching the JSF way of handling forms altogether.
    I prefer good and solid separation of form components as outlined by Formular. Formular is the only API out that would allow me to migrate my forms from any Java web server to another without having to rewrite a line of code. Try upgrading your Struts form to JSF or vise versa and you'll get the idea of why I dropped the more hardwired way of coding web forms.
    With Formular, I have created a repository of validators (for doing my form checks). datasources (for populating lists, radios, checkboxes, and combos), and styles (for laying out my form elements). Making modifications to my repositories, I can do site-wide changes without touching my JSPs or Java classes. I can move form messages from the top of ALL my forms and place them just above the offending fields in one single style file, I can swap the markers on optional fields and use them only on required fields if the business manager wants to in a single go, I can even change validation rules that are attached to several fields in different web forms at one instance (how many hours did we save when one client wanted all buttons in the site changed to GIFs and all phone and address fields in their application and survey forms validated a little different?)
    Ack! Now It looks like I'm preaching, again so I'll hold myself.

  • Jsf spring hibernate session

    Hi, I'm currently using hibernate spring and JSF  1/ the first problem In the JSF common header page I try to test if a bean is in the session scope in order to show login or logout link, and the test always fails : the logout link is always displayed.  the JSF page : [code] <f:subview id="header" >        <h:form id="headerForm"> <table cellspacing="0" width="100%"> <tr> <td align="left" valign="middle">           <img border="0" src="images/logo1.jpg"/> </td>  <td align="right" valign="middle"> <br> <!--Accueil< -->  <c:choose> <c:when test="${empty sessionScope.accountBean}">  <h:commandLink action="Sign on"> <h:outputText value="Sign on"/> </h:commandLink>  </c:when> <c:otherwise> <h:commandLink id ="logout" action="#{accountBean.logoutAction}" >      <h:outputText value="log out"/> </h:commandLink> </c:otherwise> </c:choose> </td> </tr> </table>  <table cellspacing="0" width="100%"> <tr> <td> <hr color="#99ca3c" size="5" noShade SIZE=1> </td> </tr> </table>       </h:form> </f:subview>   [/code]   The accountBean code : [code] public class AccountBean extends BaseBean{ //private Logger log = Log.getLog(this); private String uid; private String password;  private boolean loggedIn; private AdminService adminService; private Admin admin; public AccountBean() { this.logger.debug("Authentication"); this.loggedIn = false; uid=null; password=null; // admin=new Admin(); } public String loginAction() {           try { this.logger.debug("loginAction");  admin = adminService.login(this.uid, this.password); //this.serviceLocator.getUserService().login(this.username, this.password);                                if (admin != null) { if("".equals(admin.getUid())|| "".equals(admin.getPassword())){ this.loggedIn=false; String msg = "Le mot de passe et l'identifiant doivent etre saisis ";                     addErrorMessage(msg + ", saississez un mot de passe et un identifiant corrects"); return NavigationResults.RETRY; } else{                     this.loggedIn = true; HttpSession session = SessionUtil.getSession(); session.setAttribute("Admin", this.uid);                                          return NavigationResults.SUCCESS; }                }                else {                     this.loggedIn = false;                                          String msg = "Le mot de passe est incorrect ";                     addErrorMessage(msg + ", saississez un mot de passe correct");                     this.logger.debug(msg);                                          return NavigationResults.RETRY;                }           }           catch (UsernameNotExistException ue) {                String msg = "L'identifiant (login) est incorrect";                this.logger.info(msg);                addErrorMessage(msg + ", ressaysissez votre identifiant.");                                return NavigationResults.RETRY;           }           catch (Exception e) {                this.logger.error("Could not log in user.", e);                addInfoMessage("Could not log in user: Internal Error");                                return NavigationResults.FAILURE;           }      }            /**      * The backing bean action to logout a user.      *       * @return the navigation result      */      public String logoutAction() {           //this.clear(); FacesContext fc = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) fc.getExternalContext().getSession(false); session.invalidate();            this.logger.debug("Logout successfully.");                      return NavigationResults.MAIN;      }        public String getPassword() { return password; }  public void setPassword(String password) { this.password = password; }  public String getUid() { return uid; }  public void setUid(String uid) { this.uid = uid; }  public Admin getAdmin() { return admin; }   public boolean getLoggedIn() { return loggedIn; }  public void setLoggedIn(boolean loggedIn) { this.loggedIn = loggedIn; }  public void setAdminService(AdminService adminService) { this.adminService = adminService; }   }    [/code]  the faces managed bean configuration [code] <managed-bean-name>accountBean</managed-bean-name> <managed-bean-class>fr.cbmjadmin.views.bean.AccountBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property>      <property-name>adminService</property-name> <value>#{adminService}</value> </managed-property>    [/code] 2/ the second problem : my application shows a list of datas. I log on the application , i update this list outside the application ( by using sql command) , i try to list my data using the application : the application does not reflect the modifications. I logout using the log out link, then i log on and the application does not reflect the modifications.  what happens? How could I resove these problems. How can i logout properly? how can i show logout link when the user is logged in? and hide the log out link when the user is logout Thanks.

    For the first problem, you need to realize that the accountBean always exists since you configured it in the faces-config.xml. So you should use something else (like a property on the bean) to determine if the user has actually logged in.
    Secondly, but still on the first issue, it is preferable to use the rendered attribute on the standard JSF components in this situation, instead of the JSTL tags.
    Now, as to the second problem, there are a number of possibilities:
    - did you commit the changes to the database?
    - did you verify that another connection with the native db client can see the changes?
    - are you using a cache with Hibernate? Are you taking the proper steps to notify the cache it might have stale data?
    - are you keeping the list in session scope in your application? (Logging out doesn't clear the session unless you explicitly code it that way.)

  • JSF - spring - hibernate and session

    Hi,
    I'm currently using hibernate spring and JSF
    1/ the first problem
    In the JSF common header page I try to test if a bean is in the session scope in order to show login or logout link, and the test always fails : the logout link is always displayed.
    the JSF page :
    <f:subview id="header" >
        <h:form id="headerForm">
            <table cellspacing="0" width="100%">
        <tr>
            <td align="left" valign="middle">
                  <a href="front.jsf"><img border="0" src="images/logo1.jpg"/></a>
            </td>
        <td align="right" valign="middle"> <br>
       <!--<a href="front.jsf" rendered="#"> Accueil<</a> -->
        <c:choose>
                    <c:when test="${empty sessionScope.accountBean}">
                        <h:commandLink action="Sign on">
                            <h:outputText value="Sign on"/>
                        </h:commandLink>  
                    </c:when>
                    <c:otherwise>
                        <h:commandLink id ="logout" action="#{accountBean.logoutAction}" >
                             <h:outputText value="log out"/>
                        </h:commandLink>
                   </c:otherwise>
                </c:choose>
            </td>
        </tr>
    </table>
    <table cellspacing="0" width="100%">
        <tr>
            <td>
                <hr color="#99ca3c"  size="5" noShade SIZE=1>
            </td>
        </tr>
    </table>
         </h:form>
    </f:subview>The accountBean code :
    public class AccountBean extends BaseBean{
    //private Logger log = Log.getLog(this);
        private String uid;
        private String password;
        private boolean loggedIn;
        private AdminService adminService;
        private Admin admin;
        public AccountBean() {
            this.logger.debug("Authentication");
            this.loggedIn = false;
            uid=null;
            password=null;
           // admin=new Admin();
    public String loginAction() {
              try {
                        this.logger.debug("loginAction");
                         admin = adminService.login(this.uid, this.password);
                                    //this.serviceLocator.getUserService().login(this.username, this.password);
                   if (admin != null) {
                                if("".equals(admin.getUid())|| "".equals(admin.getPassword())){
                                 this.loggedIn=false;
                                    String msg = "Le mot de passe et l'identifiant doivent etre saisis ";
                        addErrorMessage(msg + ", saississez un mot de passe et un identifiant corrects");
                                 return NavigationResults.RETRY;
                                else{
                        this.loggedIn = true;
                                    HttpSession session = SessionUtil.getSession();
                                    session.setAttribute("Admin", this.uid);
                        return NavigationResults.SUCCESS;
                   else {
                        this.loggedIn = false;
                        String msg = "Le mot de passe est incorrect ";
                        addErrorMessage(msg + ", saississez un mot de passe correct");
                        this.logger.debug(msg);
                        return NavigationResults.RETRY;
              catch (UsernameNotExistException ue) {
                   String msg = "L'identifiant (login) est incorrect";
                   this.logger.info(msg);
                   addErrorMessage(msg + ", ressaysissez votre identifiant.");
                   return NavigationResults.RETRY;
              catch (Exception e) {
                   this.logger.error("Could not log in user.", e);
                   addInfoMessage("Could not log in user: Internal Error");
                   return NavigationResults.FAILURE;
          * The backing bean action to logout a user.
          * @return the navigation result
         public String logoutAction() {
              //this.clear();
               FacesContext fc = FacesContext.getCurrentInstance();
               HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);
               session.invalidate();
              this.logger.debug("Logout successfully.");
              return NavigationResults.MAIN;
        public String getPassword() {
            return password;
        public void setPassword(String password) {
            this.password = password;
        public String getUid() {
            return uid;
        public void setUid(String uid) {
            this.uid = uid;
        public Admin getAdmin() {
            return admin;
        public boolean getLoggedIn() {
            return loggedIn;
        public void setLoggedIn(boolean loggedIn) {
            this.loggedIn = loggedIn;
        public void setAdminService(AdminService adminService) {
            this.adminService = adminService;
    }the faces managed bean configuration
    <managed-bean-name>accountBean</managed-bean-name>
        <managed-bean-class>fr.cbmjadmin.views.bean.AccountBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
         <property-name>adminService</property-name>
                <value>#{adminService}</value>
        </managed-property>2/ the second problem :
    my application shows a list of datas.
    I log on the application , i update this list outside the application ( by using sql command) , i try to list my data using the application : the application does not reflect the modifications. I logout using the log out link, then i log on and the application does not reflect the modifications.
    what happens?
    How could I resove these problems.
    How can i logout properly?
    how can i show logout link when the user is logged in? and hide the log out link when the user is logout
    Thanks.

    It depends on how you want to reprecate the session btwn instances or cluters
    there are three kinds File System, Memory to Memory, HA
    You can configure it from this property in the admin console
    Configuration on a cluster -> Availability Service -> Web Container Availability -> Persistence Type:

  • JSF Validation failure causes input values disappear

    I am using a custom validator in my application by creating a class that implements javax.faces.validator.Validator. I use this validator for some input fields. When the validation fails the values that the user has entered are lost. Is their any way that we can keep these values? These input fields are in DataTable.
    - Sandeep.
    Edited by: sgatl2 on Mar 24, 2010 10:41 AM

    If you see the JSF lifecycle, the validation phase comes before the update values phase.
    So if your custome validator fails, the model will not change.
    I would suggest you try with client side validation without a page refresh/server call.

  • JSF and Hibernate Lazy loading

    Hello,
    It seems like Hibernate session is being closed after exception. This makes a conflict with JSF, since after session is closed lazy initialization cannot take place and the view of the page cannot be rendered.
    Is it right that Hibernate session is closed after exception ?
    How can this problem be treated ?

    Thanks,
    The problem happened since I was making rollback right after the exception. The session is closed after a rollback ...
    I am already using session-per-request (my own implementation). I changed the code to make rollback only once at the end of the filter. If a caught exception happens during request I only register a request for rollback.

  • JSF Validation -Javascript

    Hai All ,
    I would like to introduce "Client side Validation" in to my JSF Application . What now i am doing is that i just simple write 'required=true" attribute in my all jsf component whichever component value i need to validate before going to next phase . i feel that this server side validation . what i want do is that i want write one common java script file for all jsp page which can be validated all jsp page before sending data to server.
    If you any idea please share with me
    Selvakumar.

    There are several javascript libraries available on the net that do this but be careful. Server side validation is always more secure unless you want to compare client side validation with server side validation to catch an attempted hack.

  • URGENT methode parametres JSF+ SPRING +HIBERNATE

    hello all the world I'm back
    help me plz :
    I want to search an employee from his number I use a search function (String number), I recalled your JSF + hibernate + spring so I'll post the code :
    code of jsp page
    <f:view>
              <h:form id="RechercheEmp">
                   <h:panelGrid columns="2">
                        <h:outputText  value="Entre le Matricule de l'employ� : "/>                    
                        <h:inputText  id="mat" value="#{todoBean.employes.matricule}"/>                    
                    <h:commandButton value="Submit" action="#{todoBean.chercherEmployer?matricule=mat}"/>
                   </h:panelGrid>
                   </h:form>
    </f:view>and code of bean JSF :
    public String chercherEmployer(String matricule) {
            log.debug("#DDD############ createemployesAction()");
            try {
                this.toDoService.chercherToDo(matricule);
                log.debug("#DDD############ checheremployesAction->success");
                return "success";
            } catch (JoTestException e) {
                e.printStackTrace();
                return "failure";
    }in layer service :
    public void chercherToDo(String matricule) throws JoTestException {
            log.debug("#DDD############ saveToDo(toDo) in Service TODO");
            toDoDao.chercherToDo(matricule);
    }and in the layer dao :
    public void chercherToDo(String matricule){
              log.debug("#DDD######### Savetodo in todoDAO : ");
              this.getHibernateTemplate().load(Employes.class, matricule);
    }but i have this probleme :
    javax.servlet.ServletException: #{todoBean.chercherEmployer?matricule=ma'}: javax.faces.el.MethodNotFoundException: chercherEmployer?matricule='mat': jotodo.gui.bean.ToDoBean.chercherEmployer?matricule='mat'()
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
    cause m�re
    javax.faces.FacesException: #{todoBean.chercherEmployer?matricule=mat}: javax.faces.el.MethodNotFoundException: chercherEmployer?matricule='mat': jotodo.gui.bean.ToDoBean.chercherEmployer?matricule='mat'()
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
         javax.faces.component.UICommand.broadcast(UICommand.java:312)
         javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    note La trace compl�te de la cause m�re de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/5.5.20.
    Apache Tomcat/5.5.20

    i changed my page jsp to this :
    <f:view>
              <h:form id="RechercheEmp">
                        <h:outputText  value="Entre le Matricule de l'employ� : "/>                    
                        <h:inputText  id="mat1" value="" />                    
                        <h:commandLink action="#{todoBean.chercherEmployer}">
                          <h:outputText value="Chercher" />
                          <f:param name="mat1" value="#{todoBean.employes.matricule}"/>
                        </h:commandLink>
                   </h:form>
    </f:view>is correct or no ?????????
    but i get again the same error :
    exception
    javax.servlet.ServletException: #{todoBean.chercherEmployer}: javax.faces.el.MethodNotFoundException: chercherEmployer: jotodo.gui.bean.ToDoBean.chercherEmployer()
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
    cause m�re
    javax.faces.FacesException: #{todoBean.chercherEmployer}: javax.faces.el.MethodNotFoundException: chercherEmployer: jotodo.gui.bean.ToDoBean.chercherEmployer()
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
         javax.faces.component.UICommand.broadcast(UICommand.java:312)
         javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)Edited by: Maq_Ichigo on Apr 29, 2008 3:09 AM
    Edited by: Maq_Ichigo on Apr 29, 2008 3:19 AM

  • How to obtain JSF Validation Messages Key?

    When a validation error occurs an error message component placed next to the component displays the message like "validation error:value is required".
    I know how to customize this message by having ur own resourece bundles. But i have this new requirement where i need to find not the message but the key corresponding to the message like 'javax.faces.component.UIInput.REQUIRED'.
    But when i look at the FacesMessage API all it has is summary and detail and no way to get this key of what hapenned. Is there anyway to do this using JSF API that iam unaware of or is it not possible at all?

    I knew how to customize the messages and the key. All i wanted to know is if i have an API that i cud use to find out the error key like javax.faces.UIInput.REQUIRED from a given FacesMessage instance?

Maybe you are looking for

  • Follow up to recent posts regarding rendering problems

    I've read all posts to Berrett below but can't seem to get my "Flip Video" camcorder (uses MPEG-4AVI) video into FCE without the rendering problem. I've tried to convert in two ways. Using MPEG Streamclip I transferred my video to my desktop using th

  • Can I be connected to two networks at the same time?

    Hi there I have an imac desktop with 10.5.8 running. I have a wireless network with my timecapsule and a printer connected to it. We have two mac computers in the house that print wirelessly via this network. I also have the internet coming in via a

  • Mac mini wireless options

    I have a pre-Intel Mac mini, early 2005 vintage, without an Apple Extreme Card pre-installed. My iBook G4 (and the MacBook I plan to purchase soon) both have the Card, and I want to get my Mac mini ready for both high-speed Internet use and a potenti

  • Rephrase..Have 2009 iMac running snow leopard should I upgrade to Mavericks

    Rephrase..Have 2009 iMac running snow leopard should I upgrade to Mavericks

  • Oracle ADF 11G R1 and 11G R2 and Internet Explorer 11 Support

    Hello, We are using Oracle ADF 11G R2 (11.1.2.4), and now that Microsoft has pushed Internet Explorer 11 to Windows 7 and Windows 8 computers, we are finding that our application is not working with IE11. You get the popup that states "You are using