]> err.no Git - sope/commitdiff
added 'seconds' binding to WOMetaRefresh
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 3 Mar 2005 16:01:35 +0000 (16:01 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 3 Mar 2005 16:01:35 +0000 (16:01 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@611 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m
sope-appserver/NGObjWeb/Version

index 56bb7fa80c5ce1f40492ff9c9a0c370264073083..df21ebba23519c82a789be06492bd43b352ce057 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * DynamicElements/WOMetaRefresh.m: added support for 'seconds' binding
+         as available in WO (v4.5.123)
+
 2005-03-01  Helge Hess  <helge.hess@opengroupware.org>
 
        * SoObjects/SoProductResourceManager.m: fixed to use the changed lookup
index cfca038c01fc0a318d685fda9376aefbf2158ced..abf8ed7923ccaeda5c093d2ff652bf9715ecd35c 100644 (file)
@@ -35,7 +35,7 @@
     href | pageName | action | (directActionName & actionClass)
     fragmentIdentifier
     disabled
-    timeout
+    timeout/seconds
 */
 
 @interface WOMetaRefresh : WOHTMLDynamicElement
       ? [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);
   }
   [super dealloc];
 }
 
-/* ******************** responder ******************** */
+/* handling requests */
 
 - (id)invokeActionForRequest:(WORequest *)_request
   inContext:(WOContext *)_ctx
   return nil;
 }
 
+/* generating response */
+
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  WOComponent *sComponent = [_ctx component];
+  WOComponent *sComponent;
   int         to;
   NSString    *url;
   NSString    *queryString = nil;
   if ([[_ctx request] isFromClientComponent])
     return;
   
+  sComponent = [_ctx component];
   to = [self->timeout intValueInComponent:sComponent];
   WOResponse_AddCString(_response, "<meta http-equiv=\"refresh\" content=\"");
   WOResponse_AddInt(_response, to);
   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];
index 0a0b337c1ec1f22a3ab3a241a73bd220e218ebd0..cd961881daa264ee58b9491aab8aca60101399ab 100644 (file)
@@ -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