关于struts中多个Action 链的问题

03-09-26 lyojbuilder

文章上说“second Action. This often upsets developers, since they usually want to set a property

on the form bean and pass that value along to the next Action in the chain.

The best solution here is to add a switch to your bean to make its properties

immutable:

private boolean mutable = true;

public void setMutable(boolean mutable) {

this.mutable = mutable;

}

// ...

public setProperty(String property) {

if (isMutable()) this.property = property;

}”

意思是不是说如果成功的设置了第一个ActionForm Bean的一个属性,mutable就为true,此时就设置第二个ActionForm bean的属性

我没用过struts的Action chaining,请指教!