o fix in takeValuesFromRequest:inContext:

when control was diasbled, previous value was lost.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18167 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mguesdon 2003-11-24 10:58:02 +00:00
parent 85945b8500
commit 238150c714

View file

@ -78,36 +78,10 @@ RCS_ID("$Id$")
-(void)takeValuesFromRequest:(GSWRequest*)request
inContext:(GSWContext*)context
{
if (_value && [_value isValueSettable])
{
GSWComponent* component=[context component];
id formValue=[request formValueForKey:[context elementID]];
NS_DURING
{
[_value setValue:formValue
inComponent:component];
}
NS_HANDLER
{
LOGException(@"GSWText _value=%@ resultValue=%@ exception=%@",
_value,resultValue,localException);
if (WOStrictFlag)
{
[localException raise];
}
else
{
[self handleValidationException:localException
inContext:context];
};
}
NS_ENDHANDLER;
};
[super takeValuesFromRequest:request
inContext:context];
};
//--------------------------------------------------------------------
-(void)appendToResponse:(GSWResponse*)response
inContext:(GSWContext*)context
@ -127,9 +101,13 @@ RCS_ID("$Id$")
};
//--------------------------------------------------------------------
// Replace \r\n by \n
-(NSString*)_filterSoftReturnsFromString:(NSString*)string
{
LOGObjectFnNotImplemented(); //TODOFN
NSRange range=[string rangeOfString:@"\r\n"];
if (range.length>0)
string=[string stringByReplacingString:@"\r\n"
withString:@"n"];
return string;
};