File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Data not getting populated into the Actionform Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Data not getting populated into the Actionform" Watch "Data not getting populated into the Actionform" New topic

Data not getting populated into the Actionform

Dee Gee

Joined: May 10, 2006
Posts: 10

I am new to Java. My application is a calendar same as in Microsoft Outlook.
My initial JSP has a popup JSP similar to the popup we get when we select recurrence in Microsoft Outlook Calendar.
The data which I give in the POPUP JSP is not being populated into the properties defined in the Action Form.
How do you save this data into the server.
I guess I need to use request.setAttribute
But I am struggling to proceed any further.

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you have two separate processes (a main window and a popup window) that are both populating the same ActoinForm, you will need to specify the scope of the form as "session". If you've already defined the scope as session, then obviously the problem is something else. If it is something else, you would need to provide more details in order for us to help you solve the problem.

Consultant, Sima Solutions
Dee Gee

Joined: May 10, 2006
Posts: 10
Hi Merrill

Thanks for the reply.
Yes the Scope is "session".I have radio buttons in my Initial JSP
When you click on this radio another JSP pop's up.
The Action form has all the getter and setter methods for the properties of the tags in JSP.
And also a reset Method to reset all of them ones done i.e. I just assign them a null.
Its not Resetting in my opinion at least for the Pop up, because every time I reopen my JSP
I can see the previous values entered.
Now I have found that everytime I restart the server and then reopen the browser I have no problems,
all the values are populated perfectly, but the second time only the changes made in the initial window
is populated and the changes in the pop up is not. Why's that?

One more thing How can I post a JSP in this? Everytime I try I get Onclick error.
I agree. Here's the link:
subject: Data not getting populated into the Actionform