2 Replies Latest reply on Feb 11, 2009 11:25 AM by schlumsch

    Problem accessing parameters of out of facesContext

    schlumsch

      Hello again,

      i`m new with jsf and trying 2 get a value out of the facesContext, but when i launch this code the context is empty. Can someone tell me what im doing wrong and how to solve the problem?

       <h:commandButton value="Testmethode(a)" action="#{planingResults.testmethod}" style="width:170px;">
       <f:param name="editId" id="editId" value="uebergabewert in da hause"/>
      </h:commandButton>
      


       public String testmethod() {
      
       String a = "";
       ExternalContext extCont = FacesContext.getCurrentInstance().getExternalContext();
       Object b = FacesContext.getCurrentInstance().getExternalContext()
       .getRequestParameterMap().get("editId");
       String meineId = FacesContext.getCurrentInstance().getExternalContext()
       .getRequestParameterMap().get("editId").toString();
       System.out.println(meineId);
       return a;
       }
      
      


      Thanx a lot, schlumsch