2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "ODRDynamicXHTMLTag.h"
28 <form [enctype="multipart/form-data"]>
35 @interface ODR_XHTML_form : ODRDynamicXHTMLTag
40 @implementation ODR_XHTML_form
42 - (BOOL)requiresFormForNode:(id)_domNode inContext:(WOContext *)_ctx {
46 - (void)takeValuesForNode:(id)_node
47 fromRequest:(WORequest *)_request
48 inContext:(WOContext *)_ctx {
49 if ([_node hasChildNodes]) {
52 [self takeValuesForChildNodes:[_node childNodes]
61 - (id)invokeActionForNode:(id)_node
62 fromRequest:(WORequest *)_request
63 inContext:(WOContext *)_ctx
67 if ([_node hasChildNodes]) {
70 result = [self invokeActionForChildNodes:[_node childNodes]
81 - (void)appendNode:(id)_node
82 toResponse:(WOResponse *)_response
83 inContext:(WOContext *)_ctx
85 NSString *enctype = nil;
87 enctype = [self stringFor:@"enctype" node:_node ctx:_ctx];
89 if ([_node hasChildNodes]) {
91 [_response appendContentString:@"<form method=\"post\" action=\""];
92 [_response appendContentString:[_ctx componentActionURL]];
93 [_response appendContentCharacter:'"'];
95 [_response appendContentString:@" enctype=\""];
96 [_response appendContentString:enctype];
97 [_response appendContentCharacter:'"'];
99 [_response appendContentCharacter:'>'];
100 [super appendChildNodes:[_node childNodes]
104 [_response appendContentString:@"</form>"];
108 @end /* ODR_XHTML_form */