mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-23 19:51:13 +00:00
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:
parent
85945b8500
commit
238150c714
1 changed files with 5 additions and 27 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue