[Opensource] ControllerResponse.setAttribute(String, String)
Malcolm Wise
malcolm.wise at sde.eu.sony.com
Thu Nov 21 02:01:56 PST 2002
Hi,
I am trying to use ControllerResponse.setAttribute() to set a value that I
can pick up in a jsp using <bean:define>. I am doing this in a state that I
have transitioned to from another state.
Problem 1: When returning from my second state, I get back into the
Transition, which proceeds to copy all my Inputs, Outputs etc. from my
ControllerResponse into the original ControllerResponse (the one passed in
to the Transition from my first state). The myRequest.attributes HashMap
isn't copied into this original ControllerResponse. Unless there are any
objections I will amend the Transition.transition(ControllerRequest,
ControllerResponse, boolean) method to copy the attributes. I will also
include the clearing of these attributes if the boolean is set.
Problem 2: While working around problem 1 by setting the attribute in my
first state, I hit a bug in ControllerRequest.clone(). The line:
if (this.attributes != null) {
cr.attributes = new HashMap(cr.attributes);
}
should I think be:
if (this.attributes != null) {
cr.attributes = new HashMap(this.attributes);
}
I will also correct this.
Cheers,
Malcolm Wise
Technology Manager
Sony Semiconductor & Electronic Solutions
Tel. +44(0)1256 388864
http://www.semiconductor.sony-europe.com
*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************
More information about the Opensource
mailing list