From f3e430354e892f4df77932935a8e488c6dbae274 Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 3 Mar 2005 16:01:35 +0000 Subject: [PATCH] added 'seconds' binding to WOMetaRefresh git-svn-id: http://svn.opengroupware.org/SOPE/trunk@611 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 5 +++++ .../NGObjWeb/DynamicElements/WOMetaRefresh.m | 20 ++++++++++++++----- sope-appserver/NGObjWeb/Version | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 56bb7fa8..df21ebba 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2005-03-03 Helge Hess + + * DynamicElements/WOMetaRefresh.m: added support for 'seconds' binding + as available in WO (v4.5.123) + 2005-03-01 Helge Hess * SoObjects/SoProductResourceManager.m: fixed to use the changed lookup diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m b/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m index cfca038c..abf8ed79 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m @@ -35,7 +35,7 @@ href | pageName | action | (directActionName & actionClass) fragmentIdentifier disabled - timeout + timeout/seconds */ @interface WOMetaRefresh : WOHTMLDynamicElement @@ -82,6 +82,13 @@ ? [sidInUrlAssoc boolValueInComponent:nil] : YES; + if (self->timeout == nil) + self->timeout = OWGetProperty(_config, @"seconds"); + else if ([OWGetProperty(_config, @"seconds") autorelease] != nil) { + [self logWithFormat: + @"WARNING: got both, 'timeout' and 'seconds' bindings!"]; + } + self->queryDictionary = OWGetProperty(_config, @"queryDictionary"); self->queryParameters = OWExtractQueryParameters(_config); } @@ -102,7 +109,7 @@ [super dealloc]; } -/* ******************** responder ******************** */ +/* handling requests */ - (id)invokeActionForRequest:(WORequest *)_request inContext:(WOContext *)_ctx @@ -135,8 +142,10 @@ return nil; } +/* generating response */ + - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx { - WOComponent *sComponent = [_ctx component]; + WOComponent *sComponent; int to; NSString *url; NSString *queryString = nil; @@ -145,6 +154,7 @@ if ([[_ctx request] isFromClientComponent]) return; + sComponent = [_ctx component]; to = [self->timeout intValueInComponent:sComponent]; WOResponse_AddCString(_response, ""); } -// description +/* description */ - (NSString *)associationDescription { NSMutableString *str = [NSMutableString stringWithCapacity:256]; - + if (self->action) [str appendFormat:@" action=%@", self->action]; if (self->href) [str appendFormat:@" href=%@", self->href]; if (self->pageName) [str appendFormat:@" pageName=%@", self->pageName]; diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 0a0b337c..cd961881 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=121 +SUBMINOR_VERSION:=123 # v4.5.122 requires libNGExtensions v4.5.153 # v4.5.91 requires libNGExtensions v4.5.134 -- 2.39.5