Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is meant to be a list of issues that users ave encountered while migrations existing Struts 1 application to Struts 2, or developing new Webwork-based applications. If you have a solution to the issue that will of course be most helpful, but even if you don't it is worth noting what you encountered none the less in the hopes that someone else can come along and answer it for you, and the rest of us.

  • How do we set checkboxes false (on uncheck)?
  • How can we set the focus on a form field?
  • What is the analogy to ForwardAction?
  • How do we extend an action mapping in struts.xml?
  • Can we use DynaBeans?
  • How do we set a token to track duplicate submits?

How do we set checkboxes false (on uncheck)?

In Struts 2, checkboxes are stateful, and we don't need to do that anymore.

...

By using an element, rather than an attribute, packages can inherit the default action name.

How do we extend an action mapping in struts.xml

...

?

Starting in Struts 1.3, we can use the "extends" attribute in our Struts configuration Action mapping to have it inherit properties from a base mapping. In Struts 2, that technique is no longer necessary because we have packages. We can create a package, then set for that package the default Result type, Interceptor chain, and global results. This leaves very little information to actually be included in an action element.

...

In fact, packages themselves can extend other packages, as the "chat" package extends "struts-default" in the above example.

Can we use DynaBeans

...

?

FirstSure, but first, ask "Do we want to use DynaBeans at all?"

...