1 Reply Latest reply on Dec 23, 2011 1:49 AM by Vitaliy Pavlov

    a4j:param is null?

    x x Newbie

      In my managed bean ,i create a commandLink with param, as follows:

       

      private HtmlCommandLink createDeleteLink(){

             HtmlCommandLink deleteLink = new HtmlCommandLink();

             FacesContext fc  = FacesContext.getCurrentInstance();

             Application app  = fc.getApplication();

             MethodExpression delMethod = app.getExpressionFactory().createMethodExpression(fc.getELContext(),"#{udevStaffWagesBean.deleteStaff}",null ,new Class<?>[0]);

       

           deleteLink.setActionExpression(delMethod);

       

       

           HtmlGraphicImage delImage = new HtmlGraphicImage();

       

       

           delImage.setUrl("/resources/images/icons/edit_remove.png");

             delImage.setStyle("border:0");

       

       

       

           UIParameter parameter = new UIParameter();

           parameter.setValue("hello")  ;

            ValueExpression ves = app.getExpressionFactory().createValueExpression(fc.getELContext(), "#{udevStaffWagesBean.keys}", String.class);

       

           parameter.setAssignToExpression(ves); 

       

       

           deleteLink.getChildren().add(delImage);  

       

           deleteLink.addActionListener(parameter);

       

           deleteLink.getChildren().add(parameter);

       

         return deleteLink;

      }

       

      but in method deleteStaff() ,the value of keys is null,why?