1 2 3 Previous Next 30 Replies Latest reply on Aug 1, 2007 5:26 PM by Sergey Smirnov

    <a4j:commandButton> and <h:messages/>

    Krasimir Goutcev Apprentice

      This is my simple source test:

      <a4j:outputPanel id="myMessageanel" ajaxRendered="true">
       <h:messages />
      </a4j:outputPanel>
      
      <a4j:region id="a123">
      <h:form>
       <h:inputText value="#{delme.id}"></h:inputText>
       <a4j:commandButton action="#{delme.searchByID}" value="221" reRender="a123"></a4j:commandButton>
      </h:form>
      </a4j:region>


      BEan

      public String getId() {
       if (!id.equals("")) {
       try {
       throw new ObjectNotFoundException();
       } catch (ObjectNotFoundException e) {
       FacesContext.getCurrentInstance().addMessage(null,
       new FacesMessage(FacesMessage.SEVERITY_INFO,
       "No Result",
       ""));
       }
      
       }
       return id;
       }
       public void setId(String id) {
      
       this.id = id;
       }
       public String searchByID() {
       return null;
      
       }



      So TELL ME WHY MESSAGES NEVER SHOWN????
      WHAT IS WRONG??????

        1 2 3 Previous Next