It looks like you need to create the object before showing the page. The page needs the object because it is going to manipulate it. Without the object the application will crash. You can do this by setting up an entity either persistent or nonpersistent depending on whether you need to store that object permanently or not.
thank you for your asnwer. I found an another solution. it is working now. i retrieved with the current session and it is working but I don't know how applable this method.