Setting Values for a Javabean from JSP
Posted on 2008-10-27
I have a table display that when the user clicked on a row a jsp function is called with the selected table row id. I would like to pass the selected rowid to my java class (bean) so that it can do some processing with the selected row (i.e. delete the row from the database). I am having trouble setting the values in my java bean from the jsp page; though, I have no trouble getting values from the bean to my jsp. Please help!
<jsp:useBean id="mybean" scope="request"
alert("selected row:"+num); //popup window shows the correct selected row number
mybean.setRowSelected(999); //these two lines produced the expected results
mybean.setRowSelected(num); //but with this...jboss throws exception about not knowing what num is?