2015-01-17 5:11 GMT+01:00 Tenchi Masaki <koouy...@gmail.com>: > Hi Lukasz, > > Thank you very much for your attention, it's really nice to have detailed > examples in the docs. > But unfortunately it's still not working for me. I've followed the example > exactly as the docs, but all the properties from SomeAction are being > copied. In the /result.jsp page I have this: > > <s:textfield name="prop1" label="prop1" autocomplete="off"/> > <s:textfield name="prop2" label="prop2" autocomplete="off"/> > <s:textfield name="prop3" label="prop3" autocomplete="off"/> > <s:textfield name="prop4" label="prop4" autocomplete="off"/> > <s:textfield name="prop5" label="prop5" autocomplete="off"/> > <s:textfield name="prop6" label="prop6" autocomplete="off"/> > <s:textfield name="prop7" label="prop7" autocomplete="off"/> > > The "SomeAction" class has prop1 to prop5. > The "OtherAction" class has prop6 and prop7. > > And I have the test.jsp with this: > > <s:form action="someAction" > > <s:textfield name="prop1" /> > <s:textfield name="prop2" /> > <s:textfield name="prop3" /> > <s:textfield name="prop4" /> > <s:textfield name="prop5" /> > <s:submit /> > </s:form> > > So my testing example is very simple: test.jsp calls someAction and > populates prop1 to 5. Then it's chained into otherAction which populates > prop6 and prop7 and finally we get the result into result.jsp. > > Whenever I chain someAction to otherAction, I can see all the values from > prop1 to prop7 in the result.jsp page, even though I'm setting the > chain.includes to be only prop1. > In the other hand, whenever I redirectAction someAction to otherAction, I > can only see the values from prop6 and prop7 in the result page, just as > one expects (because whenever you redirect actions, the context from one > action is not copied to the other, right?). > > Lukasz, please, do you have a Struts 2 project with a working example of > the chaining includes/excludes? If anyone is interested, I think I can > share my failing test project somewhere too. > > Regards, > Masaki
Here you have a simple example https://github.com/lukaszlenart/struts2-chain-demo - clone it locally - mvn jetty:run - open http://localhost:8080/struts2-chain-demo/ Regards -- Ćukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org