From: helge Date: Sun, 10 Oct 2004 13:35:17 +0000 (+0000) Subject: added a page for form value debugging X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a328b2b42706d687a96b4c3cb8800f8df3f8392;p=sope added a page for form value debugging git-svn-id: http://svn.opengroupware.org/SOPE/trunk@238 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/samples/TestPages/FormDisplay.m b/sope-appserver/samples/TestPages/FormDisplay.m new file mode 100644 index 00000000..77c0da16 --- /dev/null +++ b/sope-appserver/samples/TestPages/FormDisplay.m @@ -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 + +@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 index 00000000..f31ea82f --- /dev/null +++ b/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.html @@ -0,0 +1,27 @@ + + + + Display Submitted Form Values + + + +

Submit Form Values

+

+ To check whether values are properly transmitted. +

+ <#MainLink>Main +
+ + <#Form> + <#TextField /> + <#Submit /> + + + Value: [<#DisplayText />] +
+ +
+
Helge Hess
+ + diff --git a/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.wod b/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.wod new file mode 100644 index 00000000..fb9b06be --- /dev/null +++ b/sope-appserver/samples/TestPages/FormDisplay.wo/FormDisplay.wod @@ -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"; +} diff --git a/sope-appserver/samples/TestPages/GNUmakefile b/sope-appserver/samples/TestPages/GNUmakefile index b591be83..6607c5c4 100644 --- a/sope-appserver/samples/TestPages/GNUmakefile +++ b/sope-appserver/samples/TestPages/GNUmakefile @@ -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) diff --git a/sope-appserver/samples/TestPages/Main.wo/Main.html b/sope-appserver/samples/TestPages/Main.wo/Main.html index 18300e0c..d5050d88 100644 --- a/sope-appserver/samples/TestPages/Main.wo/Main.html +++ b/sope-appserver/samples/TestPages/Main.wo/Main.html @@ -15,6 +15,7 @@ diff --git a/sope-appserver/samples/TestPages/Main.wo/Main.wod b/sope-appserver/samples/TestPages/Main.wo/Main.wod index 4d9e530f..c429e742 100644 --- a/sope-appserver/samples/TestPages/Main.wo/Main.wod +++ b/sope-appserver/samples/TestPages/Main.wo/Main.wod @@ -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"; +} diff --git a/sope-appserver/samples/TestPages/TwoForms.m b/sope-appserver/samples/TestPages/TwoForms.m index fd0b41c9..904da7c3 100644 --- a/sope-appserver/samples/TestPages/TwoForms.m +++ b/sope-appserver/samples/TestPages/TwoForms.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include diff --git a/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.html b/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.html index c0e24ca0..4277aa77 100644 --- a/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.html +++ b/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.html @@ -1,6 +1,5 @@ - Two Forms @@ -22,10 +21,7 @@ Note: you need to set "WOFormAlwaysPassDown" to make that work properly!
-
Helge Hess
- - -Last modified: Tue Jun 15 12:40:49 CEST 2004 - +
Helge Hess
diff --git a/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.wod b/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.wod index 17286e36..5727e8c9 100644 --- a/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.wod +++ b/sope-appserver/samples/TestPages/TwoForms.wo/TwoForms.wod @@ -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 {