1.1 --- a/samples/exceptions/src/org/apidesign/exceptions/trycatchredo/IOManager.java Sun Feb 01 13:38:08 2009 +0100
1.2 +++ b/samples/exceptions/src/org/apidesign/exceptions/trycatchredo/IOManager.java Sun Feb 01 16:03:37 2009 +0100
1.3 @@ -8,10 +8,22 @@
1.4 * @author Jaroslav Tulach <jtulach@netbeans.org>
1.5 */
1.6 public final class IOManager {
1.7 + static boolean old;
1.8 +
1.9 IOManager() {
1.10 }
1.11
1.12 + /** Action that can store a text to given URL.
1.13 + *
1.14 + * @param where the url to upload the text to
1.15 + * @param what the text to upload
1.16 + * @return action that can be invoked anytime to save the content
1.17 + */
1.18 public static Action createSaveAction(URL where, CharSequence what) {
1.19 - return new SaveActionWithQuery(where, what);
1.20 + if (old) {
1.21 + return new SaveAction(where, what);
1.22 + } else {
1.23 + return new SaveActionWithQuery(where, what);
1.24 + }
1.25 }
1.26 }