Re: Pre setAttribute for a form

2009-06-26 Thread Sam Wun
yah, this is old school answers. :D I have resolved the problem already by applying old school technique. :D On Fri, Jun 26, 2009 at 6:21 PM, Nils-Helge Garli Hegvik wrote: > Don't have any more ideas, but generally, the message "cannot find > bean in any scope" means exactly what it says: The be

Re: Pre setAttribute for a form

2009-06-26 Thread Nils-Helge Garli Hegvik
Don't have any more ideas, but generally, the message "cannot find bean in any scope" means exactly what it says: The bean is not in a scope where it can be found. Which means that either it is set in request scope, and attempted to be used in a different request (typically what happens when you do

Re: Pre setAttribute for a form

2009-06-25 Thread Sam Wun
Like I have said before, if I "manually" navigated to the RedirectHellpForm page , then reload the first page (RedirectForm), and press the Submit button from the RedirectForm, it can find the "name" of RedirectHelpForm. My questions is how can I setAttribute("RedirectHelpForm" ...) before navigate

Re: Pre setAttribute for a form

2009-06-25 Thread Sam Wun
I just tried your suggestion, it doesn't work. The page flow is: RedirectAction -> RedirectHelpAction -> RedirectStep3Action Here is the RedirectAction.java file: import org.apache.commons.logging.LogFactory; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.p

Re: Pre setAttribute for a form

2009-06-24 Thread Nils-Helge Garli Hegvik
Did you try request.getSession().setAttribute("RedirectHelpForm", redirectHelpForm)? Nils-H On Thu, Jun 25, 2009 at 7:14 AM, Sam Wun wrote: > How to do that with session? > I am currently setting it in the execute() and render method with the > following code: > req.setAttribute("RedirectHelpForm

Re: Pre setAttribute for a form

2009-06-24 Thread Sam Wun
How to do that with session? I am currently setting it in the execute() and render method with the following code: req.setAttribute("RedirectHelpForm", redirectHelpForm); but this is for request rather than session? Thanks for the suggesion. sam On Thu, Jun 25, 2009 at 3:09 PM, Nils-Helge Garli

Re: Pre setAttribute for a form

2009-06-24 Thread Nils-Helge Garli Hegvik
Haven't looked very deeply into it, but could it be that you're setting the attribute in the action phase, and trying to access it in the render phase? That won't work. In that case, you have to set it as a session attribute, or set some kind of id as a render parameter and re-fetch the object in t

Pre setAttribute for a form

2009-06-24 Thread Sam Wun
Hi, I noticed the setAttribute() method is called too late in one of my Action class: import javax.portlet.PortletConfig; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org