hi all,
 
I'm trying to use OptionsTag in one of my pages and keep having problems.
I have 2 actions involved, PrepareSubscriptionAction and SaveSubscriptionAction and an ActionForm called SubscriptionForm.
The first action (PrepareSubscriptionAction) get some data of the options list from ejb and put it in the form in 'serviceOptionValues' and 'serviceOptionLabels', then the request is sent to a jsp page.
The jsp page is shown correctly with all the options inside.
The problem is when I press 'submit', I get NullPointerException from inside OptionsTag. When I added some logging I saw these lines:
 
This is the end of logging BEFORE passing request to jsp:
...
[PrepareSubscriptionAction -> perform]  subform.getServiceOptionLabels() [Bandwidth: 64K ; Cost: 1.0 per unit, Band
[PrepareSubscriptionAction -> perform]  Setting transactional control token
[PrepareSubscriptionAction -> perform]  form in request = sis.web.action.SubscriptionForm@530fe7, serviceId=1, serv
Time=null, quantity=null, selectedServiceOption=null, serviceOptionValues=[1, 2], serviceOptionLabels=[Bandwidth: 6
[PrepareSubscriptionAction -> perform]  Forwarding to 'success' page
[SubscriptionForm -> getServiceOptionValues]  going to return: [1, 2]
[SubscriptionForm -> getServiceOptionLabels]  going to return: [Bandwidth: 64K ; Cost: 1.0 per unit, Bandwidth: 12M
 
At this point request is sent to jsp, jsp is shown correctly. Now I press submit (the action that should start to run is SaveSubscription) and I get this:

[SubscriptionForm -> reset]  Doing reset, serviceOptionValues=null
[SubscriptionForm -> validate]  Doing validate, serviceOptionValues=null
 
 
It seems that between the time that the jsp was created and sent to the user and the pressing of submit, the serviceOptionValues turned to null.
 
Obviously there is something I missed in understanding of the life cycle of the ActionForm but I just can't find what it is.
Any help would be appreciated.
The classes (PrepareSubscription and SubscriptionForm) are attached.
 
Thanks
anat
 
Anat Rozenzon
Telrad Networks
[EMAIL PROTECTED]
 

Attachment: PrepareSubscriptionAction.java
Description: Binary data

Attachment: SubscriptionForm.java
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to