Hi,

   I am using myfaces and tomahawk for my application.
   I have  a page with <t:datatable> and a commandbutton.

   <t:dataTable id="ptable" value="#{myManager.profiles}" var="profile"
binding="#{myBean.uiTable}" >

   There is a selectBooleanCheckbox against each row. When a row is
selected and clicked on the edit button
   in the corresponding edit action method, the info is retrieved this way.

   InfoBean bean = (InfoBean) FacesContext.getCurrentInstance
().getExternalContext().getSessionMap().put
   ("item",FacesContext.getCurrentInstance
().getExternalContext().getRequestMap().get("profile"));

   I need to write a unit test case for the edit action method using shale.
I am using the shale-test.jar that mocks up
   the JSF environment. I am creating a uitable component and setting up
the value, var and binding. I am also creating a datamodel
   instance and populating it with arraylist of data.But I am getting a
NullPointerException. How do I exactly mock the way, the row is
   selected and when clicked on the edit button should give me the value of
the uitable in the request context, just as above?

   I would very much appreciate a response.

   Thanks,
   -Sreedevi

Reply via email to