struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Mack <vasq...@mediales.net>
Subject Re: Request: Property vs Attribute
Date Sat, 16 Feb 2002 10:57:00 GMT
On Fri, 2002-02-15 at 14:04, Ted Husted wrote:
> You might want to start with an ActionForm bean that represents the OK
> dialog page. 
> 
> This should include properties for a base forward and for a paramId and
> param (like the html:link tag). 
> 
> The Action for the OK button would then look for the given forward, 
> 
> ActionForward baseForward = mapping.findForward(okForm.getForward());
> 
> and create a new forward, with the paramId and param properties,
> something like
[...]

Hi Ted,

thanks for the suggestion.
I've implemented it, but I faced the difficulty to get the info
into the form in the first place. I mean I am in an Action class and
want to direct to the okdialog. The ActionForm doesn't exist yet, right?

My solution is to set those infos (forward, message, paramId etc) as
request.attributes. In the validate method of the form I do sth like 
	if (forward == null) {
		forward = (String)request.getAttribute("forward");
	}
	if (message == null) {
		message = (String)request.getAttribute("message");
	}

Would that be ok or are there other ways ?

-- 
Andreas Mack <vasquez@mediales.de>
mediales. GmbH http://www.mediales.de



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


Mime
View raw message