You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nicolas Seinlet <ni...@pioneer-software.be> on 2003/07/07 10:03:57 UTC

null form pointer

I have a simple struts application. I've begin with a login page, and a list, where you can add, edit or delete items in this list. The list is composed of 2 datas (a number and a string). The add function run OK, the delete function too. But the edit function is a bit harder to run... I've the GetCgAction, that runs OK, which use a CgForm class, and a EditCg.jsp. When the EditCg.jsp is displayed, datas are in the apropriate fields. When the Validate button is pressed, it call the EditCg.do link, but it passes a null form pointer to the function. In debugger, the function doesn't call the validate function of the CgForm class.

What does I have to verify why he passes a null pointer?
I think the form-beans and actions are correctly inserted in the struts-config.xml...

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: null form pointer

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
First make sure you have specified the form bean in the action mapping 
correctly.

What do you mean by "the validate button"? Is that your submit button 
which submits the form to your edit action mapping?

Adam

Nicolas Seinlet wrote:
> I have a simple struts application. I've begin with a login page, and a list, where you can add, edit or delete items in this list. 
 >The list is composed of 2 datas (a number and a string). The add 
function run OK, the delete function too. But the edit function is a bit 
harder to run...
 >I've the GetCgAction, that runs OK, which use a CgForm class, and a 
EditCg.jsp. When the EditCg.jsp is displayed, datas are in the 
apropriate fields.
 >When the Validate button is pressed, it call the EditCg.do link, but 
it passes a null form pointer to the function. In debugger, the function 
doesn't call the validate function of the CgForm class.
> 
> What does I have to verify why he passes a null pointer?
> I think the form-beans and actions are correctly inserted in the struts-config.xml...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org