]> err.no Git - sope/commitdiff
added a page for form value debugging
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 10 Oct 2004 13:35:17 +0000 (13:35 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 10 Oct 2004 13:35:17 +0000 (13:35 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@238 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/samples/TestPages/FormDisplay.m [new file with mode: 0644]
sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.html [new file with mode: 0644]
sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.wod [new file with mode: 0644]
sope-appserver/samples/TestPages/GNUmakefile
sope-appserver/samples/TestPages/Main.wo/Main.html
sope-appserver/samples/TestPages/Main.wo/Main.wod
sope-appserver/samples/TestPages/TwoForms.m
sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.html
sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.wod

diff --git a/sope-appserver/samples/TestPages/FormDisplay.m b/sope-appserver/samples/TestPages/FormDisplay.m
new file mode 100644 (file)
index 0000000..77c0da1
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+  Copyright (C) 2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#include <NGObjWeb/WOComponent.h>
+
+@interface FormDisplay : WOComponent
+{
+  NSString *text;
+}
+
+@end
+
+#include "common.h"
+
+@implementation FormDisplay
+
+/* accessors */
+
+- (void)setText:(NSString *)_text {
+  ASSIGNCOPY(self->text, _text);
+}
+- (NSString *)text {
+  return self->text;
+}
+
+/* actions */
+
+- (id)ok {
+  [self logWithFormat:@"TEXT: %@", [self text]];
+  return self;
+}
+
+@end /* FormDisplay */
diff --git a/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.html b/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.html
new file mode 100644 (file)
index 0000000..f31ea82
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <title>Display Submitted Form Values</title>
+  </head>
+
+  <body>
+    <h1>Submit Form Values</h1>
+    <p>
+      To check whether values are properly transmitted.
+    </p>
+    <i><#MainLink>Main</#MainLink></i>
+    <hr />
+
+    <#Form>
+      <#TextField />
+      <#Submit    />
+    </#Form>
+
+    Value: [<#DisplayText />]
+    <br />
+
+    <hr />
+    <address><a
+       href="mailto:helge.hess@opengroupware.org">Helge Hess</a></address>
+  </body>
+</html>
diff --git a/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.wod b/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.wod
new file mode 100644 (file)
index 0000000..fb9b06b
--- /dev/null
@@ -0,0 +1,23 @@
+// bind template to class
+
+Form: WOForm {
+}
+
+TextField: WOTextField {
+  name  = "text";
+  value = text;
+  size  = 40;
+}
+DisplayText: WOString {
+  value = text;
+}
+
+Submit: WOSubmitButton {
+  name   = "ok";
+  value  = "ok";
+  action = ok;
+}
+
+MainLink: WOHyperlink {
+  pageName = "Main";
+}
index b591be83b0b134a621e6968c615a776e1d8e2c49..6607c5c4b99f41c6185c52b4efb7f3764dfa68a3 100644 (file)
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: GNUmakefile 1 2004-08-20 10:08:27Z znek $
 
 include $(GNUSTEP_MAKEFILES)/common.make
 
@@ -7,11 +7,13 @@ WOAPP_NAME = TestPages
 TestPages_OBJC_FILES += \
        TestPages.m     \
        Main.m          \
-       TwoForms.m
+       TwoForms.m      \
+       FormDisplay.m   \
 
 TestPages_COMPONENTS += \
        Main.wo         \
        TwoForms.wo     \
+       FormDisplay.wo  \
 
 # for testing resources
 TestPages_RESOURCE_FILES  += $(TestPages_OBJC_FILES)
index 18300e0c425e42ab15f39191890c04bf71c7a48e..d5050d887b4d6824ba995e741db0544825d5d5d8 100644 (file)
@@ -15,6 +15,7 @@
 
     <ul>
       <li><#TwoFormsLink/></li>
+      <li><#FormDisplayLink/></li>
     </ul>
   </BODY>
 </HTML>
index 4d9e530f0431df8ec2dfe6317b7fcee17d72065b..c429e7421df93dcc5c8640119f87d3c807bd031e 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$
+// $Id: Main.wod 4 2004-08-20 17:04:31Z helge $
 
 AppName: WOString {
   value = application.name;
@@ -8,3 +8,8 @@ TwoFormsLink: WOHyperlink {
   pageName = "TwoForms";
   string   = "two forms on one page";
 }
+
+FormDisplayLink: WOHyperlink {
+  pageName = "FormDisplay";
+  string   = "test form values";
+}
index fd0b41c98fe91fa3222a02e39e153d7c841560be..904da7c331c45361b6d0c1b3c81082db4cddd301 100644 (file)
@@ -18,7 +18,6 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #include <NGObjWeb/WOComponent.h>
 
index c0e24ca0d7ae9166d5c04ed5b757d19bf481c2cc..4277aa775d80edf98cf5ba8aea3cc754d1f52d3d 100644 (file)
@@ -1,6 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
-  <!-- $Id$ -->
   <head>
     <title>Two Forms</title>
   </head>
     Note: you need to set "WOFormAlwaysPassDown" to make that work properly!
 
     <hr />
-    <address><a href="mailto:helge.hess@opengroupware.org">Helge Hess</a></address>
-<!-- Created: Tue Jun 15 12:15:36 CEST 2004 -->
-<!-- hhmts start -->
-Last modified: Tue Jun 15 12:40:49 CEST 2004
-<!-- hhmts end -->
+    <address><a
+       href="mailto:helge.hess@opengroupware.org">Helge Hess</a></address>
   </body>
 </html>
index 17286e3634d7694a4afd0560c0dc44af1ac3b2a3..5727e8c93c19000659169b2281f98f549f08b90a 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$
+// bind template to class
 
 Form1: WOForm {
 }
@@ -6,16 +6,14 @@ Form2: WOForm {
 }
 
 PopUp1: WOPopUpButton {
-  list            = ( a1, b1, c1, d1, e1 );
-  item            = item;
-  selection       = selection1;
-  singleSelection = YES;
+  list      = ( a1, b1, c1, d1, e1 );
+  item      = item;
+  selection = selection1;
 }
 PopUp2: WOPopUpButton {
-  list            = ( a2, b2, c2, d2, e2 );
-  item            = item;
-  selection       = selection2;
-  singleSelection = YES;
+  list      = ( a2, b2, c2, d2, e2 );
+  item      = item;
+  selection = selection2;
 }
 
 Submit1: WOSubmitButton {