From 8d00c1ef20094928b9388002ffa453ce59ef9367 Mon Sep 17 00:00:00 2001 From: Manuel Guesdon Date: Fri, 6 Dec 2002 14:28:27 +0000 Subject: [PATCH] 2002-12-06 Manuel Guesdon * GSWExtensions.framework/Makefile.preamble: o added -I/usr/include/libxml2 in ADDITIONAL_INCLUDE_DIRS * GSWExtensionsGSW.framework/Makefile.preamble: o added -I/usr/include/libxml2 in ADDITIONAL_INCLUDE_DIRS * GSWeb/GSWeb.h: o removed #include * GSWCheckBox.m: o logs o rewritten some part to match specifications o removed rcsId o documentation * GSWeb/GSWRadioButton.m: o logs o rewritten some part to match specifications o removed rcsId o documentation * GSWeb/GSWTemplateParser.m o added #include "GSWTemplateParserXML.h" o removed rcsId * GSWeb/GSWTemplateParserANTLR.m o added #include "GSWTemplateParserANTLR.h" o removed rcsId * GSWeb/GSWTemplateParserXML.m o added #include "GSWTemplateParserXML.h" o removed rcsId * GSWeb/GSWHTMLAttrParser.m o added #include "GSWHTMLAttrParser.h" o removed rcsId * GSWeb/GSWRepetition.m: o logs * Testing/DynamicElements/Makefile.preamble o removed -lFoundationExt * Examples/hello/Makefile.preamble o removed -lFoundationExt * GSWeb/GSWBundle.m: o logs * GSWeb/GSWInput.[hm]gswinput o added -valueInContext:context o removed rcsId * Testing/DynamicElements/CheckBox1Page.* o added *Testing/DynamicElements/CheckBox2Page.* o added * Testing/DynamicElements/RadioButton1Page.* o added * Testing/DynamicElements/RadioButton2Page.* o added * TODO: o updated git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15261 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 56 ++++++ Examples/hello/Makefile.preamble | 4 +- GSWeb.framework/GSWBundle.m | 7 +- GSWeb.framework/GSWCheckBox.m | 162 ++++++++++------ GSWeb.framework/GSWHTMLAttrParserExt.m | 4 +- GSWeb.framework/GSWInput.h | 4 + GSWeb.framework/GSWInput.m | 56 +++--- GSWeb.framework/GSWRadioButton.m | 177 +++++++++++------- GSWeb.framework/GSWRepetition.m | 1 + GSWeb.framework/GSWTemplateParser.m | 5 +- GSWeb.framework/GSWTemplateParserANTLR.m | 4 +- GSWeb.framework/GSWTemplateParserXML.h | 2 +- GSWeb.framework/GSWTemplateParserXML.m | 4 +- GSWeb.framework/GSWeb.h | 2 - TODO | 29 +-- Testing/DynamicElements/BasePage.m | 3 +- Testing/DynamicElements/Browser1Page.m | 5 +- Testing/DynamicElements/Browser2Page.m | 3 +- .../CheckBox1Page.gswc/CheckBox1Page.gswd | 18 ++ .../CheckBox1Page.gswc/CheckBox1Page.html | 18 ++ Testing/DynamicElements/CheckBox1Page.h | 42 +++++ Testing/DynamicElements/CheckBox1Page.m | 39 ++++ .../CheckBox2Page.gswc/CheckBox2Page.gswd | 17 ++ .../CheckBox2Page.gswc/CheckBox2Page.html | 18 ++ Testing/DynamicElements/CheckBox2Page.h | 42 +++++ Testing/DynamicElements/CheckBox2Page.m | 39 ++++ Testing/DynamicElements/CheckBoxList1Page.m | 3 +- Testing/DynamicElements/CheckBoxList2Page.m | 3 +- Testing/DynamicElements/GNUmakefile | 10 +- Testing/DynamicElements/Makefile.preamble | 4 +- Testing/DynamicElements/PopUpButton1Page.m | 3 +- Testing/DynamicElements/PopUpButton2Page.m | 3 +- .../RadioButton1Page.gswd | 46 +++++ .../RadioButton1Page.html | 22 +++ Testing/DynamicElements/RadioButton1Page.h | 44 +++++ Testing/DynamicElements/RadioButton1Page.m | 39 ++++ .../RadioButton2Page.gswd | 43 +++++ .../RadioButton2Page.html | 22 +++ Testing/DynamicElements/RadioButton2Page.h | 44 +++++ Testing/DynamicElements/RadioButton2Page.m | 39 ++++ .../DynamicElements/RadioButtonList1Page.m | 3 +- .../DynamicElements/RadioButtonList2Page.m | 3 +- .../Resources/Info-DynamicElements.plist | 20 ++ Testing/DynamicElements/TextField1Page.m | 3 +- 44 files changed, 914 insertions(+), 201 deletions(-) create mode 100644 Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.gswd create mode 100644 Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.html create mode 100644 Testing/DynamicElements/CheckBox1Page.h create mode 100644 Testing/DynamicElements/CheckBox1Page.m create mode 100644 Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.gswd create mode 100644 Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.html create mode 100644 Testing/DynamicElements/CheckBox2Page.h create mode 100644 Testing/DynamicElements/CheckBox2Page.m create mode 100644 Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.gswd create mode 100644 Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.html create mode 100644 Testing/DynamicElements/RadioButton1Page.h create mode 100644 Testing/DynamicElements/RadioButton1Page.m create mode 100644 Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.gswd create mode 100644 Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.html create mode 100644 Testing/DynamicElements/RadioButton2Page.h create mode 100644 Testing/DynamicElements/RadioButton2Page.m diff --git a/ChangeLog b/ChangeLog index 1fd91d7..e1e6610 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,59 @@ +2002-12-06 Manuel Guesdon + * GSWExtensions.framework/Makefile.preamble: + o added -I/usr/include/libxml2 in ADDITIONAL_INCLUDE_DIRS + * GSWExtensionsGSW.framework/Makefile.preamble: + o added -I/usr/include/libxml2 in ADDITIONAL_INCLUDE_DIRS + * GSWeb/GSWeb.h: + o removed #include + * GSWCheckBox.m: + o logs + o rewritten some part to match specifications + o removed rcsId + o documentation + + * GSWeb/GSWRadioButton.m: + o logs + o rewritten some part to match specifications + o removed rcsId + o documentation + + * GSWeb/GSWTemplateParser.m + o added #include "GSWTemplateParserXML.h" + o removed rcsId + + * GSWeb/GSWTemplateParserANTLR.m + o added #include "GSWTemplateParserANTLR.h" + o removed rcsId + + * GSWeb/GSWTemplateParserXML.m + o added #include "GSWTemplateParserXML.h" + o removed rcsId + + * GSWeb/GSWHTMLAttrParser.m + o added #include "GSWHTMLAttrParser.h" + o removed rcsId + * GSWeb/GSWRepetition.m: + o logs + * Testing/DynamicElements/Makefile.preamble + o removed -lFoundationExt + * Examples/hello/Makefile.preamble + o removed -lFoundationExt + * GSWeb/GSWBundle.m: + o logs + * GSWeb/GSWInput.[hm]gswinput + o added -valueInContext:context + o removed rcsId + * Testing/DynamicElements/CheckBox1Page.* + o added + *Testing/DynamicElements/CheckBox2Page.* + o added + * Testing/DynamicElements/RadioButton1Page.* + o added + * Testing/DynamicElements/RadioButton2Page.* + o added + * TODO: + o updated + 2002-12-02 Mirko Viviani * GSWeb.framework/GSWApplication.m (GSWApplicationDebugSetChange): read diff --git a/Examples/hello/Makefile.preamble b/Examples/hello/Makefile.preamble index e6b56fd..479454a 100644 --- a/Examples/hello/Makefile.preamble +++ b/Examples/hello/Makefile.preamble @@ -54,9 +54,9 @@ ADDITIONAL_INCLUDE_DIRS = -I$(GNUSTEP_SYSTEM_ROOT)/db -I../.. # Additional LDFLAGS to pass to the linker ifeq ($(debug), yes) - ADDITIONAL_LDFLAGS = -lFoundationExt_d -lGSWeb -lGSANTLR_d -lgnustep-db2_d -lgnustep-db2control_d + ADDITIONAL_LDFLAGS = -lGSWeb -lGSANTLR_d -lgnustep-db2_d -lgnustep-db2control_d else - ADDITIONAL_LDFLAGS = -lFoundationExt -lGSWeb -lGSANTLR -lgnustep-db2 -lgnustep-db2control + ADDITIONAL_LDFLAGS = -lGSWeb -lGSANTLR -lgnustep-db2 -lgnustep-db2control endif #-lgnustep-xraw diff --git a/GSWeb.framework/GSWBundle.m b/GSWeb.framework/GSWBundle.m index e8e627c..3f3c669 100644 --- a/GSWeb.framework/GSWBundle.m +++ b/GSWeb.framework/GSWBundle.m @@ -433,11 +433,14 @@ objectForReference:(NSString*)keyPath } NS_HANDLER { - NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]", + NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d] anObject=%p class=%@ superClass=%@ ", localException, [localException reason], __FILE__, - __LINE__); + __LINE__, + anObject, + [anObject class], + [anObject superclass]); //TODO [self unlock]; [localException raise]; diff --git a/GSWeb.framework/GSWCheckBox.m b/GSWeb.framework/GSWCheckBox.m index fd248ac..98bd6d8 100644 --- a/GSWeb.framework/GSWCheckBox.m +++ b/GSWeb.framework/GSWCheckBox.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,10 +28,24 @@ **/ -static char rcsId[] = "$Id$"; - #include +/** +Bindings + + value Value for "valing" tag of the element. If none, GNUstepWeb generate one + + selection During appendTo... if it's evaluation equal value evalutaion, the check box is checked. + During takeValue..., it takes value evaluated value (or contextID if no value) + + checked During appendTo... if it's evaluated to YES, the check box is checked. + During takeValue..., it takes YES if checkbox is checked, NO otherwise. + + name Name of the element in the form (should be unique). If not specified, GSWeb assign one. + + disabled If evaluated to yes, the check box appear inactivated. +**/ + //==================================================================== @implementation GSWCheckBox @@ -67,7 +82,8 @@ static char rcsId[] = "$Id$"; { if (!_value || !_selection) { - ExceptionRaise0(@"GSWCheckBox",@"If you don't specify 'checked' parameter, you have to specify 'value' and 'selection' parameter"); + ExceptionRaise0(@"GSWCheckBox", + @"If you don't specify 'checked' parameter, you have to specify 'value' and 'selection' parameter"); }; }; }; @@ -97,6 +113,22 @@ static char rcsId[] = "$Id$"; //==================================================================== @implementation GSWCheckBox (GSWCheckBoxA) +//-------------------------------------------------------------------- +/** return the value used in appendValueToResponse:inContext: **/ +-(id)valueInContext:(GSWContext*)context +{ + id value=nil; + LOGObjectFnStartC("GSWCheckBox"); + // use _value evaluation or contextID + if (_value) + value=[super valueInContext:context]; + else + value=[context elementID]; + NSDebugMLLog(@"gswdync",@"value=%@",value); + LOGObjectFnStopC("GSWCheckBox"); + return value; +}; + //-------------------------------------------------------------------- -(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response inContext:(GSWContext*)context @@ -109,24 +141,37 @@ static char rcsId[] = "$Id$"; disabledInContext=[self disabledInContext:context]; if (!disabledInContext) { - BOOL checkedValue=NO; + BOOL isChecked=NO; [self appendValueToResponse:response inContext:context]; [self appendNameToResponse:response inContext:context]; - if (_checked) - { - checkedValue=[self evaluateCondition:_checked - inContext:context]; - } - else if (_value) + NSDebugMLLog(@"gswdync",@"_value=%@",_value); + NSDebugMLLog(@"gswdync",@"_selection=%@",_selection); + NSDebugMLLog(@"gswdync",@"_checked=%@",_checked); + if (_value && _selection) { id valueValue=[_value valueInComponent:component]; - id selectionValue=[_selection valueInComponent:component]; - checkedValue=SBIsValueEqual(selectionValue,valueValue); - }; - if (checkedValue) + NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue); + if (valueValue) + { + id selectionValue=[_selection valueInComponent:component]; + NSDebugMLLog(@"gswdync",@"selectionValue=%@",selectionValue); + if (selectionValue) + { + NSString* valueValueString=[NSString stringWithFormat:@"%@",valueValue]; + NSString* selectionValueString=[NSString stringWithFormat:@"%@",selectionValue]; + isChecked=SBIsValueEqual(selectionValueString,valueValueString); + }; + }; + } + else if (_checked) + isChecked=[self evaluateCondition:_checked + inContext:context]; + NSDebugMLLog(@"gswdync",@"isChecked=%s",(isChecked ? "YES" : "NO")); + + if (isChecked) [response _appendContentAsciiString:@" checked"]; }; LOGObjectFnStopC("GSWCheckBox"); @@ -154,63 +199,72 @@ static char rcsId[] = "$Id$"; GSWComponent* component=[context component]; NSString* name=nil; NSArray* formValues=nil; - BOOL checkChecked=NO; + id valueValue=nil; + BOOL isChecked=NO; name=[self nameInContext:context]; - NSDebugMLLog(@"gswdync",@"name=%@",name); formValues=[request formValuesForKey:name]; - NSDebugMLLog(@"gswdync",@"formValues=%@",formValues); - if (formValues && [formValues count]) + NSDebugMLLog(@"gswdync",@"formValues for %@=%@",name,formValues); + + NSDebugMLLog(@"gswdync",@"_value=%@",_value); + if (_value) + valueValue=[_value valueInComponent:component]; + else + valueValue=[context elementID]; + NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue); + + if (formValues && [formValues count]>0 && valueValue) { - NSDebugMLLog(@"gswdync",@"[formValues objectAtIndex:0]=%@",[formValues objectAtIndex:0]); - checkChecked=YES; - if (_selection) + NSString* valueValueString=[NSString stringWithFormat:@"%@",valueValue]; + isChecked=[formValues containsObject:valueValueString]; + }; + NSDebugMLLog(@"gswdync",@"isChecked=%s",(isChecked ? "YES" : "NO")); + + if (_value && _selection) + { + NS_DURING { - //TODOV - id valueValue=[_value valueInComponent:component]; - if (!WOStrictFlag) + [_selection setValue:(isChecked ? valueValue : nil) + inComponent:component]; + }; + NS_HANDLER + { + LOGException(@"GSWCheckBox _selection=%@ valueValue=%@ exception=%@", + _selection,valueValue,localException); + if (WOStrictFlag) { - NS_DURING - { - [_selection setValue:valueValue - inComponent:component]; - }; - NS_HANDLER - { - [self handleValidationException:localException - inContext:context]; - } - NS_ENDHANDLER; + [localException raise]; } else { - [_selection setValue:valueValue - inComponent:component]; + [self handleValidationException:localException + inContext:context]; }; - }; - }; + } + NS_ENDHANDLER; + } + if (_checked) { - id checkedValue=[NSNumber numberWithBool:checkChecked]; - NSDebugMLLog(@"gswdync",@"checkedValue=%@",checkedValue); - if (!WOStrictFlag) + NS_DURING { - NS_DURING + [_checked setValue:[NSNumber numberWithBool:isChecked] + inComponent:component]; + }; + NS_HANDLER + { + LOGException(@"GSWCheckBox _checked=%@ exception=%@", + _checked,localException); + if (WOStrictFlag) { - [_checked setValue:checkedValue - inComponent:component]; - }; - NS_HANDLER + [localException raise]; + } + else { [self handleValidationException:localException inContext:context]; - } - NS_ENDHANDLER; + }; } - else - { - [_checked setValue:checkedValue - inComponent:component]; - }; + NS_ENDHANDLER; }; }; }; diff --git a/GSWeb.framework/GSWHTMLAttrParserExt.m b/GSWeb.framework/GSWHTMLAttrParserExt.m index 6cbb7e8..f384369 100644 --- a/GSWeb.framework/GSWHTMLAttrParserExt.m +++ b/GSWeb.framework/GSWHTMLAttrParserExt.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,9 +28,8 @@ **/ -static char rcsId[] = "$Id$"; - #include +#include "GSWHTMLAttrParser.h" //==================================================================== @implementation GSWHTMLAttrParser (GSWHTMLAttrParserExt) diff --git a/GSWeb.framework/GSWInput.h b/GSWeb.framework/GSWInput.h index ffb718d..815a8b5 100644 --- a/GSWeb.framework/GSWInput.h +++ b/GSWeb.framework/GSWInput.h @@ -65,6 +65,10 @@ If no name is binded, it return the context id **/ -(NSString*)nameInContext:(GSWContext*)context; +//-------------------------------------------------------------------- +/** return the value used in appendValueToResponse:inContext: **/ +-(id)valueInContext:(GSWContext*)context; + /** Return YES if element is disabled, NO otherwise, depending on disabled/enabled binding **/ diff --git a/GSWeb.framework/GSWInput.m b/GSWeb.framework/GSWInput.m index d60385e..0b13fb7 100644 --- a/GSWeb.framework/GSWInput.m +++ b/GSWeb.framework/GSWInput.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include //==================================================================== @@ -138,6 +137,23 @@ static char rcsId[] = "$Id$"; return nameValue; }; +//-------------------------------------------------------------------- +/** return the value used in appendValueToResponse:inContext: **/ +-(id)valueInContext:(GSWContext*)context +{ + id value=nil; + LOGObjectFnStartC("GSWInput"); + if (_value) + { + GSWComponent* component=nil; + component=[context component]; + value=[_value valueInComponent:component]; + NSDebugMLLog(@"gswdync",@"value=%@",value); + }; + LOGObjectFnStopC("GSWInput"); + return value; +}; + //-------------------------------------------------------------------- -(BOOL)disabledInContext:(GSWContext*)context { @@ -227,30 +243,26 @@ static char rcsId[] = "$Id$"; inContext:(GSWContext*)context { //OK - GSWComponent* component=nil; + id valueValue=nil; LOGObjectFnStartC("GSWInput"); - component=[context component]; - if (_value) + valueValue=[self valueInContext:(GSWContext*)context]; + NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue); + if (valueValue) { - id valueValue=[_value valueInComponent:component]; - NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue); - if (valueValue) + [response appendContentCharacter:' ']; + [response _appendContentAsciiString:@"value"]; + [response appendContentCharacter:'=']; + [response appendContentCharacter:'"']; + if (_tcEscapeHTML && [self evaluateCondition:_tcEscapeHTML + inContext:context] == NO) { - [response appendContentCharacter:' ']; - [response _appendContentAsciiString:@"value"]; - [response appendContentCharacter:'=']; - [response appendContentCharacter:'"']; - if (_tcEscapeHTML && [self evaluateCondition:_tcEscapeHTML - inContext:context] == NO) - { - [response appendContentString:valueValue]; - } - else - { - [response appendContentHTMLAttributeValue:valueValue]; - }; - [response appendContentCharacter:'"']; + [response appendContentString:valueValue]; + } + else + { + [response appendContentHTMLAttributeValue:valueValue]; }; + [response appendContentCharacter:'"']; }; LOGObjectFnStopC("GSWInput"); }; diff --git a/GSWeb.framework/GSWRadioButton.m b/GSWeb.framework/GSWRadioButton.m index 390eb9b..fb0938b 100644 --- a/GSWeb.framework/GSWRadioButton.m +++ b/GSWeb.framework/GSWRadioButton.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,10 +28,24 @@ **/ -static char rcsId[] = "$Id$"; - #include +/** +Bindings + + value Value for "value" tag of the element. If none, GNUstepWeb generate one + + selection During appendTo... if it's evaluation equal value evalutaion, the button is checked. + During takeValue..., it takes value evaluated value (or contextID if no value) + + checked During appendTo... if it's evaluated to YES, the button is checked. + During takeValue..., it takes YES if button is checked, NO otherwise. + + name Name of the element in the form (should be unique). If not specified, GSWeb assign one. + + disabled If evaluated to yes, the button appear inactivated. +**/ + //==================================================================== @implementation GSWRadioButton @@ -57,6 +72,7 @@ static char rcsId[] = "$Id$"; { ExceptionRaise0(@"GSWRadioButton",@"'selection' parameter must be settable"); }; + _checked=[[associations objectForKey:checked__Key withDefaultObject:[_checked autorelease]] retain]; if (_checked && ![_checked isValueSettable]) @@ -67,7 +83,8 @@ static char rcsId[] = "$Id$"; { if (!_value || !_selection) { - ExceptionRaise0(@"GSWRadioButton",@"if you don't specify 'checked' parameter, you have to specify 'value' and 'selection' parameter"); + ExceptionRaise0(@"GSWRadioButton", + @"if you don't specify 'checked' parameter, you have to specify 'value' and 'selection' parameter"); }; }; }; @@ -95,6 +112,21 @@ static char rcsId[] = "$Id$"; //==================================================================== @implementation GSWRadioButton (GSWRadioButtonA) +/** return the value used in appendValueToResponse:inContext: **/ +-(id)valueInContext:(GSWContext*)context +{ + id value=nil; + LOGObjectFnStartC("GSWCheckBox"); + // use _value evaluation or contextID + if (_value) + value=[super valueInContext:context]; + else + value=[context elementID]; + NSDebugMLLog(@"gswdync",@"value=%@",value); + LOGObjectFnStopC("GSWCheckBox"); + return value; +}; + //-------------------------------------------------------------------- -(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response inContext:(GSWContext*)context @@ -109,17 +141,31 @@ static char rcsId[] = "$Id$"; inContext:context]; [self appendNameToResponse:response inContext:context]; - if (_checked) - { - isChecked=[self evaluateCondition:_checked - inContext:context]; - } - else if (_value) + + NSDebugMLLog(@"gswdync",@"_value=%@",_value); + NSDebugMLLog(@"gswdync",@"_selection=%@",_selection); + NSDebugMLLog(@"gswdync",@"_checked=%@",_checked); + if (_value && _selection) { id valueValue=[_value valueInComponent:component]; - id selectionValue=[_selection valueInComponent:component]; - isChecked=SBIsValueEqual(selectionValue,valueValue); - }; + NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue); + if (valueValue) + { + id selectionValue=[_selection valueInComponent:component]; + NSDebugMLLog(@"gswdync",@"selectionValue=%@",selectionValue); + if (selectionValue) + { + NSString* valueValueString=[NSString stringWithFormat:@"%@",valueValue]; + NSString* selectionValueString=[NSString stringWithFormat:@"%@",selectionValue]; + isChecked=SBIsValueEqual(selectionValueString,valueValueString); + }; + }; + } + else if (_checked) + isChecked=[self evaluateCondition:_checked + inContext:context]; + NSDebugMLLog(@"gswdync",@"isChecked=%s",(isChecked ? "YES" : "NO")); + if (isChecked) [response _appendContentAsciiString:@" checked"]; }; @@ -143,74 +189,77 @@ static char rcsId[] = "$Id$"; { if ([context _wasFormSubmitted]) { - BOOL isEqual=NO; GSWComponent* component=[context component]; NSString* name=nil; id formValue=nil; id valueValue=nil; - BOOL checkChecked=NO; + BOOL isChecked=NO; name=[self nameInContext:context]; NSDebugMLLog(@"gswdync",@"name=%@",name); formValue=[request formValueForKey:name]; - NSDebugMLLog(@"gswdync",@"formValue=%@",formValue); - valueValue=[_value valueInComponent:component]; - NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue); - //TODO if checked ! - isEqual=SBIsValueEqual(formValue,valueValue); - NSDebugMLLog(@"gswdync",@"isEqual=%s",(isEqual ? "YES" : "NO")); - if (isEqual) + NSDebugMLLog(@"gswdync",@"formValue for %@=%@",name,formValue); + + if (_value) + valueValue=[_value valueInComponent:component]; + else + valueValue=[context elementID]; + + if (formValue && valueValue) { - checkChecked=YES; - NSDebugMLLog(@"gswdync",@"_selection=%@",_selection); - if (_selection) + NSString* valueValueString=[NSString stringWithFormat:@"%@",valueValue]; + isChecked=SBIsValueEqual(formValue,valueValueString); + }; + NSDebugMLLog(@"gswdync",@"isChecked=%s",(isChecked ? "YES" : "NO")); + + // as RadioButtons are usually grouped, don't set nil to selection when + // this radio button is not checked because we may erase previous + // checked radio button selection + if (_value && _selection && isChecked) + { + NS_DURING { - if (!WOStrictFlag) + [_selection setValue:(isChecked ? valueValue : nil) + inComponent:component]; + }; + NS_HANDLER + { + LOGException(@"GSWRadioButton _selection=%@ valueValue=%@ exception=%@", + _selection,valueValue,localException); + if (WOStrictFlag) { - NS_DURING - { - [_selection setValue:valueValue - inComponent:component]; - }; - NS_HANDLER - { - [self handleValidationException:localException - inContext:context]; - } - NS_ENDHANDLER; + [localException raise]; } else - [_selection setValue:valueValue - inComponent:component]; - }; - } - else if (_checked) - { - if ([formValue caseInsensitiveCompare:@"on"]==NSOrderedSame - || [formValue caseInsensitiveCompare:@"yes"]==NSOrderedSame) - checkChecked=YES; - }; - if (_checked) - { - id checkedValue=[NSNumber numberWithBool:checkChecked]; - NSDebugMLLog(@"gswdync",@"checkedValue=%@",checkedValue); - NSDebugMLLog(@"gswdync",@"_checked=%@",_checked); - if (!WOStrictFlag) - { - NS_DURING - { - [_checked setValue:checkedValue - inComponent:component]; - }; - NS_HANDLER { [self handleValidationException:localException inContext:context]; - } - NS_ENDHANDLER; + }; } - else - [_checked setValue:checkedValue - inComponent:component]; + NS_ENDHANDLER; + } + + if (_checked) + { + NS_DURING + { + [_checked setValue:[NSNumber numberWithBool:isChecked] + inComponent:component]; + }; + NS_HANDLER + { + LOGException(@"GSWRadioButton _checked=%@ exception=%@", + _checked,localException); + if (WOStrictFlag) + { + [localException raise]; + } + else + { + [self handleValidationException:localException + inContext:context]; + }; + } + NS_ENDHANDLER; }; }; }; diff --git a/GSWeb.framework/GSWRepetition.m b/GSWeb.framework/GSWRepetition.m index a6678b1..1ca588b 100644 --- a/GSWeb.framework/GSWRepetition.m +++ b/GSWeb.framework/GSWRepetition.m @@ -153,6 +153,7 @@ static char rcsId[] = "$Id$"; _list, [(*listValuePtr) class]); *countValuePtr=[(*listValuePtr) count]; + NSDebugMLLog(@"gswdync",@"list count=%d",*countValuePtr); }; NSDebugMLLog(@"gswdync",@"_count=%@",_count); if (_count) diff --git a/GSWeb.framework/GSWTemplateParser.m b/GSWeb.framework/GSWTemplateParser.m index 0de43c4..facf9ec 100644 --- a/GSWeb.framework/GSWTemplateParser.m +++ b/GSWeb.framework/GSWTemplateParser.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ @@ -29,11 +30,11 @@ **/ -static char rcsId[] = "$Id$"; - #include #include #include +#include "GSWTemplateParserXML.h" +#include "GSWTemplateParserANTLR.h" #include "GSWPageDefLexer.h" #include "GSWPageDefParser.h" #include "GSWPageDefParserExt.h" diff --git a/GSWeb.framework/GSWTemplateParserANTLR.m b/GSWeb.framework/GSWTemplateParserANTLR.m index 186113d..89e499b 100644 --- a/GSWeb.framework/GSWTemplateParserANTLR.m +++ b/GSWeb.framework/GSWTemplateParserANTLR.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,9 +28,8 @@ **/ -static char rcsId[] = "$Id$"; - #include +#include "GSWTemplateParserANTLR.h" //==================================================================== @implementation GSWTemplateParserANTLR diff --git a/GSWeb.framework/GSWTemplateParserXML.h b/GSWeb.framework/GSWTemplateParserXML.h index 34982c6..4b9a963 100644 --- a/GSWeb.framework/GSWTemplateParserXML.h +++ b/GSWeb.framework/GSWTemplateParserXML.h @@ -33,11 +33,11 @@ #define _GSWTemplateParserXML_h__ #include "GSWTemplateParser.h" -#include #include #include #include #include +#include @class GSWTemplateParser; diff --git a/GSWeb.framework/GSWTemplateParserXML.m b/GSWeb.framework/GSWTemplateParserXML.m index 9cd9c0f..2f50f2a 100644 --- a/GSWeb.framework/GSWTemplateParserXML.m +++ b/GSWeb.framework/GSWTemplateParserXML.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ @@ -29,9 +30,8 @@ **/ -static char rcsId[] = "$Id$"; - #include +#include "GSWTemplateParserXML.h" #include extern xmlParserInputPtr xmlNewStringInputStream(xmlParserCtxtPtr ctxt, diff --git a/GSWeb.framework/GSWeb.h b/GSWeb.framework/GSWeb.h index e4e9a30..2adba28 100644 --- a/GSWeb.framework/GSWeb.h +++ b/GSWeb.framework/GSWeb.h @@ -266,8 +266,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/TODO b/TODO index 9dc64a1..b8ab4f6 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,7 @@ Todo We're Looking for Volunteers ! =============================== -Please contact me at if you want to help. +Please contact me at if you want to help. Comments =============================== @@ -31,9 +31,6 @@ information, not that there is nothing to do ! * GSWeb.m -* NSObject+IVarAccess+PerformSel.m - #OK - * NSString+HTML.m # @@ -60,19 +57,13 @@ information, not that there is nothing to do ! OK. Finished * GSWBrowser.m - TODO: - takeValuesFromRequest - invokeActionForRequest - appendToResponse + OK. Finished * GSWCheckBox.m - OK + OK. Finished * GSWCheckBoxList.m - TODO: - takeValuesFromRequest - invokeActionForRequest - appendToResponse + OK. Finished * GSWClientSideScript.m OK. Verify @@ -176,19 +167,13 @@ information, not that there is nothing to do ! OK. Finished * GSWPopUpButton.m - TODO: - takeValuesFromRequest - invokeActionForRequest - appendToResponse + OK. Finished * GSWRadioButton.m - Verify [Tested: Seems to work] + OK. Finished * GSWRadioButtonList.m - TODO: - takeValuesFromRequest - invokeActionForRequest - appendToResponse + OK. Finished * GSWRepetition.m OK. Finished diff --git a/Testing/DynamicElements/BasePage.m b/Testing/DynamicElements/BasePage.m index 398cedb..bd307df 100644 --- a/Testing/DynamicElements/BasePage.m +++ b/Testing/DynamicElements/BasePage.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" diff --git a/Testing/DynamicElements/Browser1Page.m b/Testing/DynamicElements/Browser1Page.m index c795bbe..77bb0e6 100644 --- a/Testing/DynamicElements/Browser1Page.m +++ b/Testing/DynamicElements/Browser1Page.m @@ -7,7 +7,8 @@ $Revision$ $Date$ - + $Id$ + This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "Browser1Page.h" diff --git a/Testing/DynamicElements/Browser2Page.m b/Testing/DynamicElements/Browser2Page.m index 58e9c1b..9076171 100644 --- a/Testing/DynamicElements/Browser2Page.m +++ b/Testing/DynamicElements/Browser2Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "Browser2Page.h" diff --git a/Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.gswd b/Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.gswd new file mode 100644 index 0000000..3edb775 --- /dev/null +++ b/Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.gswd @@ -0,0 +1,18 @@ +#include "Base" + +ACheckBox: GSWCheckBox +{ + value = "MyValue"; + selection = checkBoxValue; + checked = isChecked; +}; + +CheckValue: GSWString +{ + value = checkBoxValue; +}; + +IsCheckedValue: GSWString +{ + value = isChecked; +}; \ No newline at end of file diff --git a/Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.html b/Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.html new file mode 100644 index 0000000..104587c --- /dev/null +++ b/Testing/DynamicElements/CheckBox1Page.gswc/CheckBox1Page.html @@ -0,0 +1,18 @@ + + +GSWCheckBox Test 1 + + +

GSWCheckBox Test 1

+
+Value :
+Is Checked :
+
+ +Check Me ! + + +
+ + + \ No newline at end of file diff --git a/Testing/DynamicElements/CheckBox1Page.h b/Testing/DynamicElements/CheckBox1Page.h new file mode 100644 index 0000000..82c31a3 --- /dev/null +++ b/Testing/DynamicElements/CheckBox1Page.h @@ -0,0 +1,42 @@ +/** CheckBox1Page.h - GSWeb Testing: Class CheckBox1Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + + +#ifndef _CheckBox1Page_h__ + #define _CheckBox1Page_h__ + +@interface CheckBox1Page: BasePage +{ + id _checkBoxValue; + id _isChecked; +} +@end + +#endif //_CheckBox1Page_h__ diff --git a/Testing/DynamicElements/CheckBox1Page.m b/Testing/DynamicElements/CheckBox1Page.m new file mode 100644 index 0000000..1fc0b41 --- /dev/null +++ b/Testing/DynamicElements/CheckBox1Page.m @@ -0,0 +1,39 @@ +/** CheckBox1Page.m - GSWeb Testing: Class CheckBox1Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + +#include +#include "BasePage.h" +#include "CheckBox1Page.h" + + +@implementation CheckBox1Page + +@end + diff --git a/Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.gswd b/Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.gswd new file mode 100644 index 0000000..a63bfc3 --- /dev/null +++ b/Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.gswd @@ -0,0 +1,17 @@ +#include "Base" + +ACheckBox: GSWCheckBox +{ + selection = checkBoxValue; + checked = isChecked; +}; + +CheckValue: GSWString +{ + value = checkBoxValue; +}; + +IsCheckedValue: GSWString +{ + value = isChecked; +}; \ No newline at end of file diff --git a/Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.html b/Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.html new file mode 100644 index 0000000..413bbd9 --- /dev/null +++ b/Testing/DynamicElements/CheckBox2Page.gswc/CheckBox2Page.html @@ -0,0 +1,18 @@ + + +GSWCheckBox Test 2 + + +

GSWCheckBox Test 2

+
+Value :
+Is Checked :
+
+ +Check Me ! + + +
+ + + \ No newline at end of file diff --git a/Testing/DynamicElements/CheckBox2Page.h b/Testing/DynamicElements/CheckBox2Page.h new file mode 100644 index 0000000..c456398 --- /dev/null +++ b/Testing/DynamicElements/CheckBox2Page.h @@ -0,0 +1,42 @@ +/** CheckBox2Page.h - GSWeb Testing: Class CheckBox2Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + + +#ifndef _CheckBox2Page_h__ + #define _CheckBox2Page_h__ + +@interface CheckBox2Page: BasePage +{ + id _checkBoxValue; + id _isChecked; +} +@end + +#endif //_CheckBox2Page_h__ diff --git a/Testing/DynamicElements/CheckBox2Page.m b/Testing/DynamicElements/CheckBox2Page.m new file mode 100644 index 0000000..6c07ef6 --- /dev/null +++ b/Testing/DynamicElements/CheckBox2Page.m @@ -0,0 +1,39 @@ +/** CheckBox2Page.m - GSWeb Testing: Class CheckBox2Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + +#include +#include "BasePage.h" +#include "CheckBox2Page.h" + + +@implementation CheckBox2Page + +@end + diff --git a/Testing/DynamicElements/CheckBoxList1Page.m b/Testing/DynamicElements/CheckBoxList1Page.m index 6b5f35f..a174309 100644 --- a/Testing/DynamicElements/CheckBoxList1Page.m +++ b/Testing/DynamicElements/CheckBoxList1Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "CheckBoxList1Page.h" diff --git a/Testing/DynamicElements/CheckBoxList2Page.m b/Testing/DynamicElements/CheckBoxList2Page.m index 3dea062..34e6ab0 100644 --- a/Testing/DynamicElements/CheckBoxList2Page.m +++ b/Testing/DynamicElements/CheckBoxList2Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "CheckBoxList2Page.h" diff --git a/Testing/DynamicElements/GNUmakefile b/Testing/DynamicElements/GNUmakefile index e737975..846730c 100644 --- a/Testing/DynamicElements/GNUmakefile +++ b/Testing/DynamicElements/GNUmakefile @@ -56,7 +56,10 @@ Browser2Page.m \ PopUpButton1Page.m \ PopUpButton2Page.m \ TextField1Page.m \ - +CheckBox1Page.m \ +CheckBox2Page.m \ +RadioButton1Page.m \ +RadioButton2Page.m \ DynamicElements_COMPONENTS = \ Main.gswc \ @@ -69,6 +72,11 @@ Browser2Page.gswc \ PopUpButton1Page.gswc \ PopUpButton2Page.gswc \ TextField1Page.gswc \ +CheckBox1Page.gswc \ +CheckBox2Page.gswc \ +RadioButton1Page.gswc \ +RadioButton2Page.gswc \ + SRCS = $(GSWAPP_NAME:=.m) diff --git a/Testing/DynamicElements/Makefile.preamble b/Testing/DynamicElements/Makefile.preamble index 7a4e988..02ef4b3 100644 --- a/Testing/DynamicElements/Makefile.preamble +++ b/Testing/DynamicElements/Makefile.preamble @@ -54,9 +54,9 @@ ADDITIONAL_INCLUDE_DIRS = -I$(GNUSTEP_SYSTEM_ROOT)/db -I../.. # Additional LDFLAGS to pass to the linker ifeq ($(debug), yes) - ADDITIONAL_LDFLAGS = -lFoundationExt_d -lGSWeb -lGSANTLR_d -lgnustep-db2_d -lgnustep-db2control_d + ADDITIONAL_LDFLAGS = -lGSWeb -lGSANTLR_d -lgnustep-db2_d -lgnustep-db2control_d else - ADDITIONAL_LDFLAGS = -lFoundationExt -lGSWeb -lGSANTLR -lgnustep-db2 -lgnustep-db2control + ADDITIONAL_LDFLAGS = -lGSWeb -lGSANTLR -lgnustep-db2 -lgnustep-db2control endif ifeq ($(LIBWRAP), yes) diff --git a/Testing/DynamicElements/PopUpButton1Page.m b/Testing/DynamicElements/PopUpButton1Page.m index 1b03bc3..19ab1da 100644 --- a/Testing/DynamicElements/PopUpButton1Page.m +++ b/Testing/DynamicElements/PopUpButton1Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "PopUpButton1Page.h" diff --git a/Testing/DynamicElements/PopUpButton2Page.m b/Testing/DynamicElements/PopUpButton2Page.m index 6489d03..a5db6b6 100644 --- a/Testing/DynamicElements/PopUpButton2Page.m +++ b/Testing/DynamicElements/PopUpButton2Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "PopUpButton2Page.h" diff --git a/Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.gswd b/Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.gswd new file mode 100644 index 0000000..83d0e0c --- /dev/null +++ b/Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.gswd @@ -0,0 +1,46 @@ +#include "Base" + + +RadioButton1: GSWRadioButton +{ + value = "MyValue1"; + selection = value; + checked = isChecked1; + name = "RadioButton"; +}; + +RadioButton2: GSWRadioButton +{ + value = "MyValue2"; + selection = value; + checked = isChecked2; + name = "RadioButton"; +}; + +RadioButton3: GSWRadioButton +{ + value = "MyValue3"; + selection = value; + checked = isChecked3; + name = "RadioButton"; +}; + +CheckValue: GSWString +{ + value = value; +}; + +IsCheckedValue1: GSWString +{ + value = isChecked1; +}; + +IsCheckedValue2: GSWString +{ + value = isChecked2; +}; + +IsCheckedValue3: GSWString +{ + value = isChecked3; +}; \ No newline at end of file diff --git a/Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.html b/Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.html new file mode 100644 index 0000000..51af014 --- /dev/null +++ b/Testing/DynamicElements/RadioButton1Page.gswc/RadioButton1Page.html @@ -0,0 +1,22 @@ + + +GSWRadioButton Test 1 + + +

GSWRadioButton Test 1

+
+Value :
+Is Checked 1 :
+Is Checked 2 :
+Is Checked 3 :
+
+ +Check Me 1 ! +Check Me 2 ! +Check Me 3 ! + + +
+ + + \ No newline at end of file diff --git a/Testing/DynamicElements/RadioButton1Page.h b/Testing/DynamicElements/RadioButton1Page.h new file mode 100644 index 0000000..73b45ef --- /dev/null +++ b/Testing/DynamicElements/RadioButton1Page.h @@ -0,0 +1,44 @@ +/** RadioButton1Page.h - GSWeb Testing: Class RadioButton1Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + + +#ifndef _RadioButton1Page_h__ + #define _RadioButton1Page_h__ + +@interface RadioButton1Page: BasePage +{ + id _value; + id _isChecked1; + id _isChecked2; + id _isChecked3; +} +@end + +#endif //_RadioButton1Page_h__ diff --git a/Testing/DynamicElements/RadioButton1Page.m b/Testing/DynamicElements/RadioButton1Page.m new file mode 100644 index 0000000..ee827a2 --- /dev/null +++ b/Testing/DynamicElements/RadioButton1Page.m @@ -0,0 +1,39 @@ +/** RadioButton1Page.m - GSWeb Testing: Class RadioButton1Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + +#include +#include "BasePage.h" +#include "RadioButton1Page.h" + + +@implementation RadioButton1Page + +@end + diff --git a/Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.gswd b/Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.gswd new file mode 100644 index 0000000..777ceea --- /dev/null +++ b/Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.gswd @@ -0,0 +1,43 @@ +#include "Base" + + +RadioButton1: GSWRadioButton +{ + selection = value; + checked = isChecked1; + name = "RadioButton"; +}; + +RadioButton2: GSWRadioButton +{ + selection = value; + checked = isChecked2; + name = "RadioButton"; +}; + +RadioButton3: GSWRadioButton +{ + selection = value; + checked = isChecked3; + name = "RadioButton"; +}; + +CheckValue: GSWString +{ + value = value; +}; + +IsCheckedValue1: GSWString +{ + value = isChecked1; +}; + +IsCheckedValue2: GSWString +{ + value = isChecked2; +}; + +IsCheckedValue3: GSWString +{ + value = isChecked3; +}; \ No newline at end of file diff --git a/Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.html b/Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.html new file mode 100644 index 0000000..58d69da --- /dev/null +++ b/Testing/DynamicElements/RadioButton2Page.gswc/RadioButton2Page.html @@ -0,0 +1,22 @@ + + +GSWRadioButton Test 2 + + +

GSWRadioButton Test 2

+
+Value :
+Is Checked 1 :
+Is Checked 2 :
+Is Checked 3 :
+
+ +Check Me 1 ! +Check Me 2 ! +Check Me 3 ! + + +
+ + + \ No newline at end of file diff --git a/Testing/DynamicElements/RadioButton2Page.h b/Testing/DynamicElements/RadioButton2Page.h new file mode 100644 index 0000000..27019fc --- /dev/null +++ b/Testing/DynamicElements/RadioButton2Page.h @@ -0,0 +1,44 @@ +/** RadioButton2Page.h - GSWeb Testing: Class RadioButton2Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + + +#ifndef _RadioButton2Page_h__ + #define _RadioButton2Page_h__ + +@interface RadioButton2Page: BasePage +{ + id _value; + id _isChecked1; + id _isChecked2; + id _isChecked3; +} +@end + +#endif //_RadioButton2Page_h__ diff --git a/Testing/DynamicElements/RadioButton2Page.m b/Testing/DynamicElements/RadioButton2Page.m new file mode 100644 index 0000000..b11f2bf --- /dev/null +++ b/Testing/DynamicElements/RadioButton2Page.m @@ -0,0 +1,39 @@ +/** RadioButton2Page.m - GSWeb Testing: Class RadioButton2Page + + Copyright (C) 2002 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Dec 2002 + + $Revision$ + $Date$ + $Id$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + +#include +#include "BasePage.h" +#include "RadioButton2Page.h" + + +@implementation RadioButton2Page + +@end + diff --git a/Testing/DynamicElements/RadioButtonList1Page.m b/Testing/DynamicElements/RadioButtonList1Page.m index 9680c0d..543b526 100644 --- a/Testing/DynamicElements/RadioButtonList1Page.m +++ b/Testing/DynamicElements/RadioButtonList1Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "RadioButtonList1Page.h" diff --git a/Testing/DynamicElements/RadioButtonList2Page.m b/Testing/DynamicElements/RadioButtonList2Page.m index d6dfadb..b543562 100644 --- a/Testing/DynamicElements/RadioButtonList2Page.m +++ b/Testing/DynamicElements/RadioButtonList2Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "RadioButtonList2Page.h" diff --git a/Testing/DynamicElements/Resources/Info-DynamicElements.plist b/Testing/DynamicElements/Resources/Info-DynamicElements.plist index 5e10099..a633578 100644 --- a/Testing/DynamicElements/Resources/Info-DynamicElements.plist +++ b/Testing/DynamicElements/Resources/Info-DynamicElements.plist @@ -58,6 +58,26 @@ pageName = "TextField1Page"; label = "TextField 1"; comment = "GSWTextField Test 1"; + }, + { + pageName = "CheckBox1Page"; + label = "CheckBox 1"; + comment = "GSWCheckBox Test 1"; + }, + { + pageName = "CheckBox2Page"; + label = "CheckBox 2"; + comment = "GSWCheckBox Test 2"; + }, + { + pageName = "RadioButton1Page"; + label = "RadioButton 1"; + comment = "GSWRadioButton Test 1"; + }, + { + pageName = "RadioButton2Page"; + label = "RadioButton 2"; + comment = "GSWRadioButton Test 2"; } ); RadioButtonList = { diff --git a/Testing/DynamicElements/TextField1Page.m b/Testing/DynamicElements/TextField1Page.m index 75f0093..8e05852 100644 --- a/Testing/DynamicElements/TextField1Page.m +++ b/Testing/DynamicElements/TextField1Page.m @@ -7,6 +7,7 @@ $Revision$ $Date$ + $Id$ This file is part of the GNUstep Web Library. @@ -27,8 +28,6 @@ **/ -static char rcsId[] = "$Id$"; - #include #include "BasePage.h" #include "TextField1Page.h"