> > Yikes, what if getModel() is doing actual work, you're > calling it twice for no apparent reason. Wouldn't it be > significantly safer to: > > public String intercept(ActionInvocation invocation) throws > Exception { > Object action = invocation.getAction(); > if (action instanceof ModelDriven) { > ModelDriven modelDriven = (ModelDriven)action; > ValueStack stack = invocation.getStack(); > Object model = modelDriven.getModel(); > if (model != null) { > stack.push(model); > } > } > return invocation.invoke(); > } > > (*Chris*) >
Since this is Xwork, I went ahead and filed a JIRA with a patch much like you have here. http://jira.opensymphony.com/browse/XW-569 -Wes --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]