--- /dev/null
+/*
+ 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 */
--- /dev/null
+<!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>
--- /dev/null
+// 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";
+}
-# $Id$
+# $Id: GNUmakefile 1 2004-08-20 10:08:27Z znek $
include $(GNUSTEP_MAKEFILES)/common.make
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)
<ul>
<li><#TwoFormsLink/></li>
+ <li><#FormDisplayLink/></li>
</ul>
</BODY>
</HTML>
-// $Id$
+// $Id: Main.wod 4 2004-08-20 17:04:31Z helge $
AppName: WOString {
value = application.name;
pageName = "TwoForms";
string = "two forms on one page";
}
+
+FormDisplayLink: WOHyperlink {
+ pageName = "FormDisplay";
+ string = "test form values";
+}
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include <NGObjWeb/WOComponent.h>
<!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>
-// $Id$
+// bind template to class
Form1: 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 {