can someone help me with this please. Everything seams to be right to me but
getting exception.
tried to change formbean to DynaActionform too
<form-bean name="NewEligibilityForm"
type="org.apache.struts.action.DynaActionForm" dynamic="true">
still getting same error. I am unable to figure out what the issue is?
Thanks.
From: "fea jabi" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: user@struts.apache.org
Subject: Re: NullPointerException when using DynaActionForm
Date: Tue, 09 May 2006 14:50:42 -0400
sorry about that. here it is. yes, I have the action mapping right I
guess.
<action
path="/PrepareEligibilityAction"
type="com.actions.PrepareEligibilityAction"
name="NewEligibilityDynaForm"
scope="session">
<forward name="success" path="/pages/Eligibility.jsp"
redirect="false"/>
</action>
<action
path="/DispatchEligibilityAction"
type="com.actions.DispatchEligibilityAction"
name="NewEligibilityDynaForm"
scope="session"
parameter="method">
<forward name="successPrev" path="/PrepareEligibilityAction.do"
redirect="false"/>
<forward name="successNext" path="/PrepareEligibilityAction.do"
redirect="false"/>
<forward name="successSave" path="/PrepareEligibilityAction.do"
redirect="false"/>
</action>
From: "Michael Jouravlev" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: "Struts Users Mailing List" <user@struts.apache.org>
Subject: Re: NullPointerException when using DynaActionForm
Date: Tue, 9 May 2006 11:36:56 -0700
On 5/9/06, fea jabi <[EMAIL PROTECTED]> wrote:
<form-bean name="NewEligibilityDynaForm"
type="com.formbeans.NewEligibilityForm" dynamic="true">
<form-property name="name" type="java.lang.String"/>
<form-property name="date" type="java.lang.String"/>
<form-property name="eligibleCust"
type="java.lang.ArrayList"/>
<form-property name="nonEligibleCust"
type="java.lang.ArrayList"/>
<form-property name="selectedNonEligibleCust"
type="java.lang.String[]"/>
<form-property name="method" type="java.lang.String"/>
</form-bean>
public class NewEligibilityForm extends DynaActionForm implements
Serializable {
public NewEligibilityForm() {
}
/**
* Resets the form bean attributes
*
* @param mapping - are the action mapings.
* @param request - is the Servlet Request
*/
public void reset(ActionMapping mapping,
javax.servlet.ServletRequest request) {
}
}
PrepareAction
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
DynaActionForm newEligibilityForm = (DynaActionForm) form;
newEligibilityForm.set("name", "Tom");
}
Getting NullPointerException at statement
newEligibilityForm.set("name", "Tom");
When I debug the code I see the newEligibilityForm is null.
I don't see any bug in the above created formbean.
What am I missing here? thanks.
You did not post your action mapping, therefore it is hard to say what
is wrong. Have you set name="NewEligibilityDynaForm" in the action
mapping for PrepareAction?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]