]> err.no Git - sope/commitdiff
Ported "fragmentID" stuff from JOPE to SOPE.
authorznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sat, 17 Mar 2007 16:55:15 +0000 (16:55 +0000)
committerznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sat, 17 Mar 2007 16:55:15 +0000 (16:55 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1458 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

108 files changed:
sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/DynamicElements/WOActionURL.m
sope-appserver/NGObjWeb/DynamicElements/WOBody.m
sope-appserver/NGObjWeb/DynamicElements/WOCheckBox.m
sope-appserver/NGObjWeb/DynamicElements/WOCheckBoxList.m
sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m
sope-appserver/NGObjWeb/DynamicElements/WOEmbeddedObject.m
sope-appserver/NGObjWeb/DynamicElements/WOEntity.m
sope-appserver/NGObjWeb/DynamicElements/WOFileUpload.m
sope-appserver/NGObjWeb/DynamicElements/WOForm.m
sope-appserver/NGObjWeb/DynamicElements/WOFragment.api [new file with mode: 0644]
sope-appserver/NGObjWeb/DynamicElements/WOFragment.m [new file with mode: 0644]
sope-appserver/NGObjWeb/DynamicElements/WOFrame.m
sope-appserver/NGObjWeb/DynamicElements/WOGenericContainer.m
sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m
sope-appserver/NGObjWeb/DynamicElements/WOHiddenField.m
sope-appserver/NGObjWeb/DynamicElements/WOHtml.m
sope-appserver/NGObjWeb/DynamicElements/WOIFrame.m
sope-appserver/NGObjWeb/DynamicElements/WOImage.m
sope-appserver/NGObjWeb/DynamicElements/WOImageButton.m
sope-appserver/NGObjWeb/DynamicElements/WOJavaScript.m
sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m
sope-appserver/NGObjWeb/DynamicElements/WONestedList.m
sope-appserver/NGObjWeb/DynamicElements/WONoContentElement.m
sope-appserver/NGObjWeb/DynamicElements/WOPasswordField.m
sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m
sope-appserver/NGObjWeb/DynamicElements/WORadioButton.m
sope-appserver/NGObjWeb/DynamicElements/WORadioButtonList.m
sope-appserver/NGObjWeb/DynamicElements/WORepetition.m
sope-appserver/NGObjWeb/DynamicElements/WOResetButton.m
sope-appserver/NGObjWeb/DynamicElements/WOResourceURL.m
sope-appserver/NGObjWeb/DynamicElements/WOString.m
sope-appserver/NGObjWeb/DynamicElements/WOSubmitButton.m
sope-appserver/NGObjWeb/DynamicElements/WOText.m
sope-appserver/NGObjWeb/DynamicElements/WOTextField.m
sope-appserver/NGObjWeb/DynamicElements/WOVBScript.m
sope-appserver/NGObjWeb/DynamicElements/WOxControlElemBuilder.m
sope-appserver/NGObjWeb/DynamicElements/_WOCommonStaticDAHyperlink.m
sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m
sope-appserver/NGObjWeb/DynamicElements/_WOStaticHTMLElement.m
sope-appserver/NGObjWeb/NGObjWeb.xcodeproj/project.pbxproj
sope-appserver/NGObjWeb/NGObjWeb/WOContext.h
sope-appserver/NGObjWeb/NGObjWeb/WORequest.h
sope-appserver/NGObjWeb/Version
sope-appserver/NGObjWeb/WEClientCapabilities.m
sope-appserver/NGObjWeb/WOChildComponentReference.m
sope-appserver/NGObjWeb/WOContext.m
sope-appserver/NGObjWeb/WORequest.m
sope-appserver/NGObjWeb/WOResponse+private.h
sope-appserver/WEExtensions/ChangeLog
sope-appserver/WEExtensions/JSClipboard.m
sope-appserver/WEExtensions/JSMenu.m
sope-appserver/WEExtensions/JSMenuItem.m
sope-appserver/WEExtensions/JSShiftClick.m
sope-appserver/WEExtensions/JSStringTable.m
sope-appserver/WEExtensions/Version
sope-appserver/WEExtensions/WEBrowser.m
sope-appserver/WEExtensions/WECalendarField.m
sope-appserver/WEExtensions/WECollapsibleComponentContent.m
sope-appserver/WEExtensions/WEDateField.m
sope-appserver/WEExtensions/WEDragContainer.m
sope-appserver/WEExtensions/WEDropContainer.m
sope-appserver/WEExtensions/WEEpozEditor.m
sope-appserver/WEExtensions/WEExtensions-Info.plist
sope-appserver/WEExtensions/WEExtensions.xcodeproj/project.pbxproj
sope-appserver/WEExtensions/WEMonthOverview.m
sope-appserver/WEExtensions/WEPageLink.m
sope-appserver/WEExtensions/WEPageView.m
sope-appserver/WEExtensions/WEQualifierConditional.m
sope-appserver/WEExtensions/WERichString.m
sope-appserver/WEExtensions/WESwitch.m
sope-appserver/WEExtensions/WETabItem.m
sope-appserver/WEExtensions/WETabView.m
sope-appserver/WEExtensions/WETableMatrix.m
sope-appserver/WEExtensions/WETableMatrixContent.m
sope-appserver/WEExtensions/WETableMatrixLabel.m
sope-appserver/WEExtensions/WETableView/WETableData.m
sope-appserver/WEExtensions/WETableView/WETableHeader.m
sope-appserver/WEExtensions/WETableView/WETableView.m
sope-appserver/WEExtensions/WETimeField.m
sope-appserver/WEExtensions/WETreeData.m
sope-appserver/WEExtensions/WETreeHeader.m
sope-appserver/WEExtensions/WETreeView.m
sope-appserver/WEExtensions/WEWeekColumnView.m
sope-appserver/WEExtensions/WEWeekOverview.m
sope-appserver/WEPrototype/ChangeLog
sope-appserver/WEPrototype/Version
sope-appserver/WEPrototype/WELiveLink.m
sope-appserver/WEPrototype/WEPrototype.xcodeproj/project.pbxproj
sope-appserver/WEPrototype/WEPrototypeScript.m
sope-appserver/WOExtensions/ChangeLog
sope-appserver/WOExtensions/JSAlertPanel.m
sope-appserver/WOExtensions/JSConfirmPanel.m
sope-appserver/WOExtensions/JSImageFlyover.m
sope-appserver/WOExtensions/JSModalWindow.m
sope-appserver/WOExtensions/JSTextFlyover.m
sope-appserver/WOExtensions/JSValidatedField.m
sope-appserver/WOExtensions/Version
sope-appserver/WOExtensions/WOCheckBoxMatrix.m
sope-appserver/WOExtensions/WOCollapsibleComponentContent.m
sope-appserver/WOExtensions/WODictionaryRepetition.m
sope-appserver/WOExtensions/WOExtensions-Info.plist
sope-appserver/WOExtensions/WOExtensions.xcodeproj/project.pbxproj
sope-appserver/WOExtensions/WORadioButtonMatrix.m
sope-appserver/WOExtensions/WORedirect.m
sope-appserver/WOExtensions/WOTabPanel.m
sope-appserver/WOExtensions/WOTable.m
sope-appserver/WOExtensions/WOThresholdColoredNumber.m

index fd215036a5d2f53db8bcb4769e6385bc14b44a16..1faa09bd9b6fec9e9f9d3eb781dad8730b61af22 100644 (file)
@@ -1,3 +1,23 @@
+2007-03-16  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v4.7.5
+       
+       * WOContext.[hm]: added fragmentID API from JOPE. This API provides a
+         means for conditionally suppressing the rendering of WOElements -
+         this is triggered by a 'wofid' URL parameter; comes in very
+         handy when dealing with AJAX.
+       
+       * WORequest.[hm]: added -fragmentID API.
+       
+       * WOResponse+private.h: added new convenience macros
+       
+       * DynamicElements/WOFragment.[m,api]: new dynamic element for
+         triggering render state
+
+       * WOChildComponentReference.m, WEClientCapabilities.m,
+         DynamicElements/*.m: all elements obey WOContext's new
+         -isRenderingDisabled flag now
+
 2007-03-13  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * WORepetition.m: Reverted 'list' binding extensions as this had side
index bc766ad492136583dbfff3d6387bf33279184f61..b0139641c0083b61fcee92aca939bf11c751f871 100644 (file)
   WOComponent *sComponent;
   NSString *queryString = nil;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
+    [self->template appendToResponse:_response inContext:_ctx];
     return;
+  }
 
   sComponent = [_ctx component];
   
index 4fe6a3be08e39fd396952e6de87288c7f7fa7360..0e2a9a9e9d6eb2e581e7bfbff47372fcfeba1d04 100644 (file)
@@ -91,7 +91,7 @@
   NSString *uUri;
   NSString *uFi;
   
-  if ([[_ctx request] isFromClientComponent]) {
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
     [self->template appendToResponse:_response inContext:_ctx];
     return;
   }
index 0fffe99eb58fa64bc55b3adbe8a11e5dea714b0c..2030517b0285c142e376fc77896ea68771455b78 100644 (file)
@@ -83,7 +83,7 @@
   NSString *v;
   BOOL     isChecked;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
 
   v         = [self->value   stringValueInComponent:[_ctx component]];
index 1e8c64fea4fddaa1b394142010b2e1cd7f25c201..86d9863dcdf59a60d3dc7933febed6e881b625dd 100644 (file)
   unsigned    cnt;
   BOOL        canSetIndex, canSetItem;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
 
   sComponent = [_ctx component];
index cdac56a7323850d81c76e9f1f36cdbe669bf72f0..5b9b239e5fffd8ac6a7b286e2ada4a63e7e6f062 100644 (file)
@@ -190,9 +190,11 @@ _updateComponent(WOComponentReference *self, WOContext *_ctx)
   else if (debugOn) {
     [self debugWithFormat:@"missing component for reference: %@",
            self->activeComponent];
-    [_response appendContentHTMLString:@"[missing component for reference: "];
-    [_response appendContentHTMLString:[self->activeComponent description]];
-    [_response appendContentHTMLString:@"]"];
+    if (![_ctx isRenderingDisabled]) {
+      [_response appendContentHTMLString:@"[missing component for reference: "];
+      [_response appendContentHTMLString:[self->activeComponent description]];
+      [_response appendContentHTMLString:@"]"];
+    }
   }
 }
 
index 7edefac1bca10ba48fea86515b439c7ecf759157..e7ad01292faad6cd4ede17717db59f3d0a190f2e 100644 (file)
 #define StrVal(__x__) [self->__x__ stringValueInComponent:sComponent]
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  if (![[_ctx request] isFromClientComponent]) {
+  if (!([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])) {
     WOComponent *sComponent = [_ctx component];
     NSString *uUri = [self->src      stringValueInComponent:sComponent];
     NSString *uFi  = [self->filename stringValueInComponent:sComponent];
index 4d699a01d12abc5f8d9f2c6f9d919fec4517a697..8960f86d1bbc4ecd13e89db4150f6602b3c5bd0c 100644 (file)
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString *s;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
 
   s = [self->name stringValueInComponent:[_ctx component]];
index 9e763c9d35b3d62cb4985e3838af736a2ba190ce..03a37377da2ea1c9eb5745ff5d0b0a82d98ca5fd 100644 (file)
@@ -158,7 +158,7 @@ static NGMimeType *multipartFormData = nil;
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString *v;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
   
   v = [self->value stringValueInComponent:[_ctx component]];
index 32f7fbfc69a6f003e7e4ba37de1bf0fcdabb09f4..dbe4ddfbe15b0f1d1e6ee84b3ce139487a11d5cb 100644 (file)
@@ -346,7 +346,7 @@ static int debugTakeValues = -1;
   WOComponent *sComponent;
   NSString    *queryString = nil;
   
-  if ([[_ctx request] isFromClientComponent]) {
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
     [self->template appendToResponse:_response inContext:_ctx];
     return;
   }
diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOFragment.api b/sope-appserver/NGObjWeb/DynamicElements/WOFragment.api
new file mode 100644 (file)
index 0000000..6562ab7
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?> 
+
+<wo class="WOFragment">
+  <binding name="name"  />
+  <binding name="onlyOnMatch" defaults="YES/NO" />
+  <binding name="id"  />
+  <binding name="elementName" />
+</wo>
diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOFragment.m b/sope-appserver/NGObjWeb/DynamicElements/WOFragment.m
new file mode 100644 (file)
index 0000000..2b88def
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+  Copyright (C) 2007 OpenGroupware.org.
+
+  This file is part of SOPE.
+
+  SOPE is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  SOPE 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 Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with SOPE; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+/*
+ * WOFragment
+ * 
+ * This element is used to mark rendering fragments. If SOPE receives a URL
+ * which contains the 'wofid' request parameter, it will disable rendering in
+ * the WOContext. This element can be used to reenable rendering for a certain
+ * template subsection.
+ * 
+ * Note that request handling is NOT affected by fragments! This is necessary
+ * to ensure a proper component state setup. If you wish, you can further
+ * reduce processing overhead using WOConditionals in appropriate places (if
+                                                                          * you know that those sections do not matter for processing)
+ * 
+ * Fragments can be nested. WOFragment sections _never_ disable rendering or
+ * change template control flow, they only enable rendering when fragment ids
+ * match. This way it is ensured that "sub fragments" will get properly
+ * accessed.
+ * This can be overridden by setting the "onlyOnMatch" binding. If this is set
+ * the content will only get accessed in case the fragment matches OR not
+ * fragment id is set. 
+ * 
+ * Sample:
+ *   <#WOFragment name="tableview" />
+ * 
+ * Renders:
+ *   This element can render a container tag if the elementName is specified.
+ *   
+ * Bindings:
+ *   name        [in] - string       name of fragment
+ *   onlyOnMatch [in] - boolean      enable/disable processing for other frags
+ *   elementName [in] - string       optional name of container element
+ *   <all other bindings are extra-attrs for elementName>
+ */
+#include "decommon.h"
+#include <NGObjWeb/WODynamicElement.h>
+#include "WOElement+private.h"
+
+@interface WOFragment : WODynamicElement
+{
+  WOElement     *template;
+  WOAssociation *name;
+  WOAssociation *eid;
+  WOAssociation *onlyOnMatch;
+  WOAssociation *elementName;
+}
+
+- (BOOL)isFragmentActiveInContext:(WOContext *)_ctx;
+
+@end /* WOFragment */
+
+@implementation WOFragment
+
+- (id)initWithName:(NSString *)_name
+  associations:(NSDictionary *)_assocs
+  template:(WOElement *)_c
+{
+  if ((self = [super initWithName:_name associations:_assocs template:_c])) {
+    self->template    = RETAIN(_c);
+    self->name        = OWGetProperty(_assocs, @"name");
+    self->eid         = OWGetProperty(_assocs, @"id");
+    self->onlyOnMatch = OWGetProperty(_assocs, @"onlyOnMatch");
+    self->elementName = OWGetProperty(_assocs, @"elementName");
+  }
+  return self;
+}
+- (void)dealloc {
+  [self->template    release];
+  [self->name        release];
+  [self->eid         release];
+  [self->onlyOnMatch release];
+  [self->elementName release];
+  [super dealloc];
+}
+
+/* support */
+
+- (BOOL)isFragmentActiveInContext:(WOContext *)_ctx {
+  NSString *fragName;
+  NSString *fragID = [_ctx fragmentID];
+
+  if (fragID == nil) /* yes, active, no fragment is set */
+    return YES;
+  
+   fragName = self->name == nil
+     ? [_ctx elementID]
+     : [self->name stringValueInComponent:[_ctx cursor]];
+  if (fragName == nil) /* we have no fragid in the current state */
+    return YES;
+  
+  return [fragID isEqualToString:fragName];
+}
+
+/* request handling */
+
+- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
+  if (self->template == nil) return;
+
+  if (self->onlyOnMatch == nil)
+    [self->template takeValuesFromRequest:_rq inContext:_ctx];
+  else if (![self->onlyOnMatch boolValueInComponent:[_ctx cursor]])
+    [self->template takeValuesFromRequest:_rq inContext:_ctx];
+  else if ([self isFragmentActiveInContext:_ctx])
+    [self->template takeValuesFromRequest:_rq inContext:_ctx];
+}
+
+- (id)invokeActionForRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
+  NSString *fragID;
+
+  if (self->template == nil)
+    return nil;
+  
+  fragID = [_ctx fragmentID];
+  
+  if (self->onlyOnMatch == nil || fragID == nil)
+    return [self->template invokeActionForRequest:_rq inContext:_ctx];
+  
+  if (![self->onlyOnMatch boolValueInComponent:[_ctx cursor]])
+    return [self->template invokeActionForRequest:_rq inContext:_ctx];
+  
+  if ([self isFragmentActiveInContext:_ctx])
+    return [self->template invokeActionForRequest:_rq inContext:_ctx];
+  
+  /* onlyOnMatch is on and fragment is not active, do not call template */
+  return nil;
+}
+
+/* rendering */
+
+- (void)appendToResponse:(WOResponse *)_r inContext:(WOContext *)_ctx {
+  id       cursor       = [_ctx cursor];
+  BOOL     wasDisabled  = [_ctx isRenderingDisabled];
+  BOOL     isFragActive = [self isFragmentActiveInContext:_ctx];
+  BOOL     doRender     = YES;     
+  NSString *en          = nil;
+
+  if (!isFragActive) {
+    /* we are not active (no match) */
+    if (self->onlyOnMatch != nil)
+      doRender = ![self->onlyOnMatch boolValueInComponent:cursor];
+  }
+  
+  /* enable rendering if we are active */
+  
+  if (isFragActive)
+    [_ctx enableRendering];
+  
+  /* start container element if we have no frag */
+  
+  if (!wasDisabled && self->elementName != nil)
+    en = [self->elementName stringValueInComponent:cursor];
+  
+  if (en != nil) {
+    NSString *leid;
+    
+    WOResponse_AppendBeginTag(_r, en);
+    
+    /* add id of fragment element */
+    
+    if (self->eid != nil)
+      leid = [self->eid stringValueInComponent:cursor];
+    else if (self->name != nil)
+      leid = [self->name stringValueInComponent:cursor];
+    else
+      leid = [_ctx elementID];
+    if (leid != nil)
+      WOResponse_AppendAttribute(_r, @"id", leid);
+
+    /* additional bindings not specifically tracked by the element*/
+    [self appendExtraAttributesToResponse:_r inContext:_ctx];
+    
+    WOResponse_AppendBeginTagEnd(_r);
+  }
+  
+  /* do content */
+  
+  if (doRender && self->template != nil)
+    [self->template appendToResponse:_r inContext:_ctx];
+  
+  /* close tag if we have one */
+  
+  if (en != nil)
+    WOResponse_AppendEndTag(_r, en);
+  
+  /* reestablish old rendering state */
+  
+  if (isFragActive && wasDisabled)
+    [_ctx disableRendering];
+}
+
+@end /* WOFragment */
index 1aae347eefaf02f17ed64d3952291764f3ed520d..da82f8e2815502cd0c27010b317a3bc84efaf7a6 100644 (file)
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  WOComponent *sComponent = [_ctx component];
-  NSString *queryString = nil;
-  if ([[_ctx request] isFromClientComponent])
+  WOComponent *sComponent;
+  NSString    *queryString;
+
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
 
+  sComponent  = [_ctx component];
+  queryString = nil;
+
   WOResponse_AddCString(_response, "<frame src=\"");
     
   if ([self _appendHrefToResponse:_response inContext:_ctx]) {
     WOResponse_AddChar(_response, ' ');
     WOResponse_AddString(_response,
                          [self->otherTagString stringValueInComponent:
-                              [_ctx component]]);
+                              sComponent]);
   }
   WOResponse_AddEmptyCloseParens(_response, _ctx);
 }
index 45c5c4be3351a004965bbdb55d65a0bba2628e8e..f673bbc6870f2ba8d7ca88bcdd35cb7078851dc9 100644 (file)
   WOComponent *sComponent;
   NSString    *tag;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
+    [self->template appendToResponse:_response inContext:_ctx];
     return;
-  
+  }
+
   sComponent = [_ctx component];
   switch (self->tagNameType) {
     case TagNameType_Assoc:
index 9c756760680532fb07fac331c4ca94c1725977f3..f97fe28d91d1a635dbb8a1d5981302f20a3cfc1a 100644 (file)
@@ -209,7 +209,7 @@ typedef struct {
   WOComponent *sComponent;
   NSString    *tag;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
   
   sComponent = [_ctx component];
index e5be4c2c7a69af64cecb597cb78c20f46bb6e942..356a746b9ed3afc76577c99940a4a136e784b69c 100644 (file)
@@ -42,7 +42,7 @@
   NSString *v;
   BOOL isDisabled;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
 
   isDisabled = [self->disabled boolValueInComponent:[_ctx component]];
index 27925b0b948169e0518c5f365fdbee63df703f55..6bf32c945037e8f6ab8e7170a7ec70b8b00fe7c7 100644 (file)
 /* generating response */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  if ([[_ctx request] isFromClientComponent]) {
-    [self->template appendToResponse:_response inContext:_ctx];
-    return;
-  }
+  BOOL doRender = !([_ctx isRenderingDisabled] ||
+                    [[_ctx request] isFromClientComponent]);
   
-  WOResponse_AddCString(_response, "<html>");
+  if (doRender)
+    WOResponse_AddCString(_response, "<html>");
   [self->template appendToResponse:_response inContext:_ctx];
-  WOResponse_AddCString(_response, "</html>");
+  if (doRender)
+    WOResponse_AddCString(_response, "</html>");
 }
 
 /* description */
index 98632ba6f49425dd68aa3187e0aa8277e14988fa..81f8333e440d92fa4a8055b911c363c75ad1dcd0 100644 (file)
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  if (![[_ctx request] isFromClientComponent]) {
-    WOComponent *sComponent = [_ctx component];
-    NSString *queryString = nil;
+  WOComponent *sComponent;
+  NSString    *queryString;
 
-    WOResponse_AddCString(_response, "<iframe src=\"");
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
 
-    if ([self _appendHrefToResponse:_response inContext:_ctx]) {
-      queryString = [self queryStringForQueryDictionary:
-                            [self->queryDictionary valueInComponent:sComponent]
-                          andQueryParameters:self->queryParameters
-                          inContext:_ctx];
-    }
+  sComponent  = [_ctx component];
+  queryString = nil;
 
-    if (queryString) {
-      [_response appendContentCharacter:'?'];
-      WOResponse_AddString(_response, queryString);
-    }
-    WOResponse_AddChar(_response, '"');
-    
-    [self appendExtraAttributesToResponse:_response inContext:_ctx];
-    
-    if (self->otherTagString) {
-      WOResponse_AddChar(_response, ' ');
-      WOResponse_AddString(_response,
-                           [self->otherTagString stringValueInComponent:
-                                                   [_ctx component]]);
-    }
-    WOResponse_AddChar(_response, '>');
+  WOResponse_AddCString(_response, "<iframe src=\"");
 
-    [self->template appendToResponse:_response inContext:_ctx];
-    
-    WOResponse_AddCString(_response, "</iframe>");
+  if ([self _appendHrefToResponse:_response inContext:_ctx]) {
+    queryString = [self queryStringForQueryDictionary:
+                          [self->queryDictionary valueInComponent:sComponent]
+                        andQueryParameters:self->queryParameters
+                        inContext:_ctx];
   }
+
+  if (queryString) {
+    WOResponse_AddChar(_response, '?');
+    WOResponse_AddString(_response, queryString);
+  }
+  WOResponse_AddChar(_response, '"');
+  
+  [self appendExtraAttributesToResponse:_response inContext:_ctx];
+  
+  if (self->otherTagString) {
+    WOResponse_AddChar(_response, ' ');
+    WOResponse_AddString(_response,
+                         [self->otherTagString stringValueInComponent:
+                                                 [_ctx component]]);
+  }
+  WOResponse_AddChar(_response, '>');
+
+  [self->template appendToResponse:_response inContext:_ctx];
+  
+  WOResponse_AddCString(_response, "</iframe>");
+
 }
 
 // description
index e51a99a69ec534c477e7fbd379740119d3fa33a9..a4b03fba490b0d23df5238355e797778bc5d50d0 100644 (file)
@@ -89,7 +89,7 @@
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
 
   WOResponse_AddCString(_response, "<img src=\"");
index d9a9061945f2c63f04a5319d0228ad6d56c0b2ed..e66d981bb2a8030847a5fb18bb100d1cb6ac2c3f 100644 (file)
 /* generating response */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  WOComponent *sComponent = [_ctx component];
+  WOComponent *sComponent;
   NSString *uUri = nil;
   NSString *uFi  = nil;
   BOOL isDisabled;
 
-  uUri = [self->src stringValueInComponent:sComponent];
-  
+  if ([_ctx isRenderingDisabled]) return;
+
+  sComponent = [_ctx component];
+  uUri       = [self->src stringValueInComponent:sComponent];
+
   if ((isDisabled = [self->disabled boolValueInComponent:sComponent])) {
     uFi =  [self->disabledFilename stringValueInComponent:sComponent];
     if (uFi == nil)
index 6951041862cfea0ded64432c8559d765e845adb8..cb62d29dbd38b3d655eff6cb39b4a8a9a081778b 100644 (file)
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   WOComponent *sComponent;
-  NSString *st;
-  BOOL hide;
-  
-  if ([[_ctx request] isFromClientComponent])
+  NSString    *st;
+  BOOL        hide;
+
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
-  
+
   sComponent = [_ctx component];
-  hide = [self->hideInComment boolValueInComponent:sComponent];
-  
+  hide       = [self->hideInComment boolValueInComponent:sComponent];
+
   WOResponse_AddCString(_response, "<script");
-  
+
   if ((st = [self->type stringValueInComponent:sComponent]) != nil) {
     WOResponse_AddCString(_response, " type=\"");
     [_response appendContentHTMLAttributeValue:st];
   else {
     WOResponse_AddCString(_response, " type=\"text/javascript\"");
   }
-  
+
   /* add URL to script */
   if (self->scriptSource != nil) {
     st = [self->scriptSource stringValueInComponent:sComponent];
index 8c64ed981a627addc50156b31eecd15a9fcca784..8f68a6440535de6f871b52129ae5c45ad721700d 100644 (file)
   WOComponent *sComponent;
   int         to;
   NSString    *url;
-  NSString    *queryString = nil;
-  BOOL addSID;
+  NSString    *queryString;
+  BOOL        addSID;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
     return;
   
-  sComponent = [_ctx component];
+  sComponent  = [_ctx component];
+  queryString = nil;
   to = [self->timeout intValueInComponent:sComponent];
   WOResponse_AddCString(_response, "<meta http-equiv=\"refresh\" content=\"");
   WOResponse_AddInt(_response, to);
index b50a7a954af2df448f209a446f68818c8d6f6ae5..ec9b931db59f23c71ec54fd7462b3c8f916c2e2f 100644 (file)
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSArray *top;
   
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
+    return;
+
   top = [self->list valueInComponent:[_ctx component]];
   if ([top count] > 0) {
     [self appendList:top
index fa95763b711a2c1bbe49722b5a0f77db4463204a..f6ae7a6148007d87d738417641d79738fd04e789 100644 (file)
@@ -22,6 +22,7 @@
 #include "WONoContentElement.h"
 #include <NGObjWeb/WOComponentDefinition.h>
 #include <NGObjWeb/WOResponse.h>
+#include <NGObjWeb/WOContext.h>
 #include "common.h"
 
 @implementation WONoContentElement
@@ -43,6 +44,7 @@
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) return;
   [_response appendContentHTMLString:@"<<missing element '"];
   [_response appendContentHTMLString:self->element];
   [_response appendContentHTMLString:@"' in component '"];
index ef37ab4e90415c3fd5e1655d4dbded632b4726f4..9f99f63c2425ad73f57efb1e1d96d60dbc98eb06 100644 (file)
@@ -58,6 +58,8 @@
   NSString     *v;
   unsigned int s;
   
+  if ([_ctx isRenderingDisabled]) return;
+
   v = [self->value stringValueInComponent:[_ctx component]];
   s = [self->size  unsignedIntValueInComponent:[_ctx component]];
   
index 9e013d02e834c1f1ce3a762d48f293d3ac560e33..65d59552c05598523b38722295a96bbde1d11c2f 100644 (file)
@@ -455,29 +455,33 @@ static BOOL debugPopUp = NO;
     st = [[NSDateClass date] timeIntervalSince1970];
 #endif
   
-  WOResponse_AddCString(_response, "<select name=\"");
-  [_response appendContentHTMLAttributeValue:OWFormElementName(self, _ctx)];
-  WOResponse_AddChar(_response, '"');
-  
-  [self appendExtraAttributesToResponse:_response inContext:_ctx];
-  
-  if (self->otherTagString != nil) {
-    WOResponse_AddChar(_response, ' ');
-    WOResponse_AddString(_response,
-                         [self->otherTagString stringValueInComponent:
-                              [_ctx component]]);
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
   }
-  
-  if ([self->disabled boolValueInComponent:[_ctx component]])
-    WOResponse_AddCString(_response, " disabled=\"disabled\"");
+  else {
+    WOResponse_AddCString(_response, "<select name=\"");
+    [_response appendContentHTMLAttributeValue:OWFormElementName(self, _ctx)];
+    WOResponse_AddChar(_response, '"');
+    
+    [self appendExtraAttributesToResponse:_response inContext:_ctx];
+    
+    if (self->otherTagString != nil) {
+      WOResponse_AddChar(_response, ' ');
+      WOResponse_AddString(_response,
+                           [self->otherTagString stringValueInComponent:
+                                [_ctx component]]);
+    }
+    
+    if ([self->disabled boolValueInComponent:[_ctx component]])
+      WOResponse_AddCString(_response, " disabled=\"disabled\"");
 
-  WOResponse_AddChar(_response, '>');
-  
-  [self appendOptionsToResponse:_response inContext:_ctx];
-  [self->template appendToResponse:_response inContext:_ctx];
+    WOResponse_AddChar(_response, '>');
+    
+    [self appendOptionsToResponse:_response inContext:_ctx];
+    [self->template appendToResponse:_response inContext:_ctx];
 
-  WOResponse_AddCString(_response, "</select>");
-  
+    WOResponse_AddCString(_response, "</select>");
+  }
 #if DEBUG
   if (profElements) {
     NSTimeInterval diff;
index 57d7c06e98ce8011fe6804e010d990c9d31cf413..6e61045d9ba5b99b369a45ef024394c48274aa35 100644 (file)
   WOComponent *sComponent;
   NSString *lvalue;
   
+  if ([_ctx isRenderingDisabled]) return;
+
   sComponent = [_ctx component];
   lvalue = self->checked
     ? [_ctx elementID]
index 63f7821648362a7d00e1f4ed849dfed01c7360f4..d79044cd601fdf4e60ad762379fd3f49c0233dfa 100644 (file)
   id          sel;
   BOOL        canSetIndex, canSetItem;
   
+  if ([_ctx isRenderingDisabled]) return;
+
   sComponent = [_ctx component];
   array      = [self->list valueInComponent:sComponent];
   goCount    = [array count];
index 83e369f4fbedf70a62af35dcb3386c357cf719d3..36013322beb5f52d07979875f008f6807e23c755 100644 (file)
@@ -467,6 +467,7 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx)
   WOComponent *sComponent;
   NSArray     *array;
   unsigned    aCount, goCount, startIdx;
+  BOOL        doRender;
 
 #if DEBUG
   if (descriptiveIDs)
@@ -475,6 +476,8 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx)
   
   pool       = [[NSAutoreleasePool alloc] init];
   
+
+  doRender   = ![_ctx isRenderingDisabled];
   sComponent = [_ctx component];
   array      = [self->list valueInContext:_ctx];
   aCount     = [array count];
@@ -489,10 +492,11 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx)
 
 #if HTML_DEBUG
     // append debugging info
-    WOResponse_AddString(_response,
-                         [NSString stringWithFormat:
-                                     @"<!-- WORep. count=%d arraySize=%d -->\n",
-                                     goCount, [array count]]);
+    if (doRender)
+      WOResponse_AddString(_response,
+                          [NSString stringWithFormat:
+                                    @"<!-- WORep. count=%d arraySize=%d -->\n",
+                                    goCount, [array count]]);
 #endif
 
     if (self->identifier == nil) {
@@ -514,7 +518,7 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx)
       id ident = nil;
       id lItem;
       
-      if ((cnt != startIdx) && (self->separator != nil)) {
+      if ((cnt != startIdx) && (self->separator != nil) && doRender) {
         WOResponse_AddString(_response,
                              [self->separator stringValueInComponent:
                                                 sComponent]);
@@ -545,8 +549,9 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx)
 
 #if HTML_DEBUG
       /* append debugging info */
-      WOResponse_AddString(_response, [NSString stringWithFormat:
-                                         @"  <!-- iteration=%d -->\n", cnt]);
+      if (doRender)
+        WOResponse_AddString(_response, [NSString stringWithFormat:
+                                        @"  <!-- iteration=%d -->\n", cnt]);
 #endif
 
       /* append child elements */
@@ -572,7 +577,8 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx)
   }
 #if HTML_DEBUG
   else {
-    WOResponse_AddCString(_response, "<!-- repetition with no contents -->");
+    if (doRender)
+      WOResponse_AddCString(_response, "<!-- repetition with no contents -->");
   }
 #endif
   
index bb6522a930d3529c773e5138ac64032de230a6cd..745f9034ed6cc4d565453dbb1f90c0998f23b291 100644 (file)
 // ******************** responder ********************
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  NSString *v = [self->value stringValueInComponent:[_ctx component]];
+  NSString *v;
+
+  if ([_ctx isRenderingDisabled]) return;
+
+  v = [self->value stringValueInComponent:[_ctx component]];
 
   if ((self->name != nil) || (self->disabled != nil)) {
-    NSLog(@"WARNING: 'name' and 'disabled' properties are "
-          @"not supported in WOResetButton !");
+    [self warnWithFormat:@"'name' and 'disabled' properties are "
+                         @"not supported in WOResetButton !"];
   }
 
   WOResponse_AddCString(_response, "<input type=\"reset\" value=\"");
index a5ec17b0edccf53ea2cbc072e97444ed86aba44b..b954b7e8fcaaee947613924d69f1d28628e1aeb2 100644 (file)
   WOComponent *sComponent;
   NSString    *uFi;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
+    [self->template appendToResponse:_response inContext:_ctx];
     return;
-  
+  }
+
   sComponent = [_ctx component];
-    
-  uFi = [self->filename stringValueInComponent:sComponent];
+  uFi        = [self->filename stringValueInComponent:sComponent];
   
   if (uFi) {
     WOResourceManager *rm;
index 8df7a2ed6fe74a674fe6a6cc5dc01e5e70d9850b..2d3d1e8fba3c698dbb3bc71e4447787343115d3b 100644 (file)
 
 /* generating response */
 
-- (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  [_response appendContentHTMLString:[self->value stringValueInContext:_ctx]];
+- (void)appendToResponse:(WOResponse *)_resp inContext:(WOContext *)_ctx {
+  if (![_ctx isRenderingDisabled])
+    [_resp appendContentHTMLString:[self->value stringValueInContext:_ctx]];
 }
 
 /* description */
 /* generating response */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  WOResponse_AddString(_response, self->value);
+  if (![_ctx isRenderingDisabled])
+    WOResponse_AddString(_response, self->value);
 }
 
 /* description */
 /* generating response */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  if (self->value) WOResponse_AddCString(_response, self->value);
+  if (![_ctx isRenderingDisabled] && self->value)
+    if (self->value) WOResponse_AddCString(_response, self->value);
 }
 
 /* description */
@@ -540,16 +543,21 @@ static WOAssociation *yesAssoc = nil;
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  WOComponent *sComponent = [_ctx component];
+  WOComponent *sComponent;
   NSFormatter *fmt;
   id          obj    = nil;
   SEL         addSel = NULL;
   NSString    *styleName;
 
-  fmt = [self _formatterInContext:_ctx];
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
+    return;
+
+  sComponent = [_ctx component];
+  fmt        = [self _formatterInContext:_ctx];
+
 #if DEBUG
   if (fmt!=nil && ![fmt respondsToSelector:@selector(stringForObjectValue:)]) {
-    [sComponent logWithFormat:
+    [sComponent errorWithFormat:
                   @"invalid formatter determined by keypath %@: %@",
                   self->formatter, fmt];
   }
@@ -566,8 +574,8 @@ static WOAssociation *yesAssoc = nil;
     formattedObj = [fmt stringForObjectValue:obj];
 #if 0
     if (formattedObj == nil) {
-      NSLog(@"WARNING: formatter %@ returned nil string for object %@",
-            fmt, obj);
+      [self warnWithFormat:@"formatter %@ returned nil string for object %@",
+                           fmt, obj];
     }
 #endif
     
index 94481f9ea07f686b41690efbaa638ea67d937723..2dcac290c31c5fa5163a39cca1f7f782d9b66285 100644 (file)
@@ -163,6 +163,8 @@ static BOOL WOSubmitButtonEnableValueSync = NO;
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString *v;
   
+  if ([_ctx isRenderingDisabled]) return;
+
   v = [self->value stringValueInComponent:[_ctx component]];
   WOResponse_AddCString(_response, "<input type=\"submit\" name=\"");
   [_response appendContentHTMLAttributeValue:OWFormElementName(self, _ctx)];
index 3b7506f3080392d9f088efb7b010eca362da1738..a5f93c641506e00ea42a273b6a493e9819c1bba6 100644 (file)
@@ -166,6 +166,8 @@ static inline NSFormatter *_getFormatter(WOText *self, WOContext *_ctx) {
   unsigned    r;
   unsigned    c;
   
+  if ([_ctx isRenderingDisabled]) return;
+
   sComponent = [_ctx component];
   v  = [self->value valueInComponent:sComponent];
   r  = [self->rows  unsignedIntValueInComponent:sComponent];
index 9b56f44250e3e2dc8ff80e195a36c554f24a6c0c..7144b4a6243c55bf20784d68cfdb78364be7f024 100644 (file)
@@ -173,6 +173,8 @@ static inline NSFormatter *_getFormatter(WOTextField *self, WOContext *_ctx) {
   id       obj;
   unsigned s;
 
+  if ([_ctx isRenderingDisabled]) return;
+
   obj = [self->value valueInComponent:[_ctx component]];
   s   = [self->size  unsignedIntValueInComponent:[_ctx component]];
 
index 88a57c87f7aa15083eea54ac8f2608eecb0b6614..faee727462efeced4a52aaaff161dd7cef73f9f8 100644 (file)
 #define StrVal(__x__) [self->__x__ stringValueInComponent:sComponent]
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  if (![[_ctx request] isFromClientComponent]) {
-    WOComponent *sComponent = [_ctx component];
-    BOOL hide = [self->hideInComment boolValueInComponent:sComponent];
-    
-    WOResponse_AddCString(_response, "<script language=\"VBScript\" ");
-
-    /* add URL to script */
-    if (self->scriptSource) {
-      WOResponse_AddCString(_response, " src=\"");
-      [_response appendContentHTMLAttributeValue:
-                   [self->scriptSource stringValueInComponent:sComponent]];
-      WOResponse_AddCString(_response, "\"");
-    }
-    
-    if (self->otherTagString) {
-      WOResponse_AddChar(_response, ' ');
-      WOResponse_AddString(_response,
-                           [self->otherTagString stringValueInComponent:
-                                                   [_ctx component]]);
-    }
-    WOResponse_AddChar(_response, '>');
-    if (hide) WOResponse_AddCString(_response, "<!--hide from older browsers");
-
-    /* add a script string */
-    if (self->scriptString) {
-      NSString *s = [self->scriptString stringValueInComponent:sComponent];
-
-      if (s) WOResponse_AddString(_response, s);
-    }
-
-    /* add a script file */
-    if (self->scriptFile) {
-      NSString *s;
-
-      s = [NSString stringWithContentsOfFile:
-                      [self->scriptFile stringValueInComponent:sComponent]];
-      if (s) WOResponse_AddString(_response, s);
-    }
+  WOComponent *sComponent;
+  BOOL        hide;
+
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent])
+    return;
+
+  sComponent = [_ctx component];
+  hide       = [self->hideInComment boolValueInComponent:sComponent];
     
-    if (hide) WOResponse_AddCString(_response, "//hide from older browsers-->");
-    WOResponse_AddCString(_response, "</script>");
+  WOResponse_AddCString(_response, "<script language=\"VBScript\" ");
+
+  /* add URL to script */
+  if (self->scriptSource) {
+    WOResponse_AddCString(_response, " src=\"");
+    [_response appendContentHTMLAttributeValue:
+                 [self->scriptSource stringValueInComponent:sComponent]];
+    WOResponse_AddCString(_response, "\"");
   }
+  
+  if (self->otherTagString) {
+    WOResponse_AddChar(_response, ' ');
+    WOResponse_AddString(_response,
+                         [self->otherTagString stringValueInComponent:
+                                                 [_ctx component]]);
+  }
+  WOResponse_AddChar(_response, '>');
+  if (hide) WOResponse_AddCString(_response, "<!--hide from older browsers");
+
+  /* add a script string */
+  if (self->scriptString) {
+    NSString *s = [self->scriptString stringValueInComponent:sComponent];
+
+    if (s) WOResponse_AddString(_response, s);
+  }
+
+  /* add a script file */
+  if (self->scriptFile) {
+    NSString *s;
+
+    s = [NSString stringWithContentsOfFile:
+                    [self->scriptFile stringValueInComponent:sComponent]];
+    if (s) WOResponse_AddString(_response, s);
+  }
+  
+  if (hide) WOResponse_AddCString(_response, "//hide from older browsers-->");
+  WOResponse_AddCString(_response, "</script>");
 }
 
 // description
index 6424b7c2279911ea311cb9a4d4675283a178da61..8e3e52ad9287765133f52482ca868f5ecfbf65af 100644 (file)
@@ -1,5 +1,6 @@
 /*
   Copyright (C) 2000-2005 SKYRIX Software AG
+  Copyright (C) 2007 OpenGroupware.org.
 
   This file is part of SOPE.
 
@@ -31,6 +32,7 @@
     <var:foreach .../>   maps to WORepetition
     <var:with .../>      maps to WOSetCursor
     <var:copy-value ../> maps to WOCopyValue
+    <var:fragment ../>   maps to WOFragment
 */
 
 @interface WOxControlElemBuilder : WOxTagClassElemBuilder
       clazz = NSClassFromString(@"WORepetition");
     return clazz;
   }
-  
+
+  if (c0 == 'f' && len == 8 && [tag isEqualToString:@"fragment"]) {
+    static Class clazz = Nil;
+    if (clazz == Nil)
+      clazz = NSClassFromString(@"WOFragment");
+    return clazz;
+  }
+
   if (c0 == 'w' && len == 4 && [tag isEqualToString:@"with"]) {
     static Class clazz = Nil;
     if (clazz == Nil)
   return Nil;
 }
 
-@end /* SxControlElemBuilder */
+@end /* WOxControlElemBuilder */
index 56b99c57f697a9baf96fd329a9feeac10e59ca01..e6545f6563e267100f6dee6b43b2183c9f9a03ed 100644 (file)
   WOComponent *sComponent;
   NSMutableDictionary *qd;
   
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
+    [self->template appendToResponse:_response inContext:_ctx];
     return;
+  }
 
   sComponent = [_ctx component];
   WOResponse_AddCString(_response, "<a href=\"");
index 4fac7949fffa13fa30ac6130a7f8e1bda08bca3b..ac5880bb1201782aa82ad40af9ad34fce591a43b 100644 (file)
@@ -256,8 +256,10 @@ static Class NSURLClass = Nil;
   NSString    *content;
   BOOL        doNotDisplay;
 
-  if ([[_ctx request] isFromClientComponent])
+  if ([_ctx isRenderingDisabled] || [[_ctx request] isFromClientComponent]) {
+    [self->template appendToResponse:_response inContext:_ctx];
     return;
+  }
   
   content      = [self->string valueInContext:_ctx];
   doNotDisplay = [self->disabled boolValueInComponent:sComponent];
index e4a6e2ddc39837004055de6bee7ae1c094ac0c01..d6463ae68026c9d9b2c2e8c7af5aec967f10c030 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "_WOStaticHTMLElement.h"
 #include <NGObjWeb/WOResponse.h>
+#include <NGObjWeb/WOContext.h>
 #include "common.h"
 
 @implementation _WOStaticHTMLElement
@@ -52,8 +53,8 @@ static Class StrClass = Nil;
 /* generate response */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  if (self->text != nil)
-    [_response appendContentString:self->text];
+  if ([_ctx isRenderingDisabled] || self->text == nil) return;
+  [_response appendContentString:self->text];
 }
 
 @end /* _WOStaticHTMLElement */
index 78bac319b1a85a850a298956002b586f2e90eaed..6436348fd027bc9b424438b9ce803fb59551d7cc 100644 (file)
                AD4D5F9909C83A7D009BFDAF /* SoCookieAuthenticator.m in Sources */ = {isa = PBXBuildFile; fileRef = AD4D5F9509C83A7D009BFDAF /* SoCookieAuthenticator.m */; };
                AD4D5F9A09C83A7D009BFDAF /* SoProductLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = AD4D5F9609C83A7D009BFDAF /* SoProductLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
                AD4D5F9B09C83A7D009BFDAF /* SoProductLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = AD4D5F9709C83A7D009BFDAF /* SoProductLoader.m */; };
+               AD4F34B30BAAF5BA00323EB9 /* WOFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = AD4F34B20BAAF5BA00323EB9 /* WOFragment.m */; };
+               AD4F35320BAAF99E00323EB9 /* WOFragment.api in Resources */ = {isa = PBXBuildFile; fileRef = AD4F35310BAAF99E00323EB9 /* WOFragment.api */; };
                AD51811406FF7ED0006397CD /* NGImap4.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD51811206FF7ED0006397CD /* NGImap4.framework */; };
                AD51811506FF7ED0006397CD /* NGMail.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD51811306FF7ED0006397CD /* NGMail.framework */; };
                AD8BF0AA07018CC600EC239A /* WOServerDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = AD8BF0A907018CC600EC239A /* WOServerDefaults.m */; };
                AD4D5F9509C83A7D009BFDAF /* SoCookieAuthenticator.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = SoCookieAuthenticator.m; sourceTree = "<group>"; };
                AD4D5F9609C83A7D009BFDAF /* SoProductLoader.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = SoProductLoader.h; sourceTree = "<group>"; };
                AD4D5F9709C83A7D009BFDAF /* SoProductLoader.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = SoProductLoader.m; sourceTree = "<group>"; };
+               AD4F34B20BAAF5BA00323EB9 /* WOFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WOFragment.m; sourceTree = "<group>"; };
+               AD4F35310BAAF99E00323EB9 /* WOFragment.api */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; path = WOFragment.api; sourceTree = "<group>"; };
                AD51811206FF7ED0006397CD /* NGImap4.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NGImap4.framework; path = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks/Wrapper/NGImap4.framework"; sourceTree = "<absolute>"; };
                AD51811306FF7ED0006397CD /* NGMail.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NGMail.framework; path = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks/Wrapper/NGMail.framework"; sourceTree = "<absolute>"; };
                AD8BF0A907018CC600EC239A /* WOServerDefaults.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = WOServerDefaults.m; sourceTree = "<group>"; };
                ADFE54BD06E2493D006628C4 /* WEClientCapabilities.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = WEClientCapabilities.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
                ADFE54BE06E2493D006628C4 /* WOAdaptor.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = WOAdaptor.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
                ADFE54BF06E2493D006628C4 /* woapp-gs.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 5; indentWidth = 8; path = "woapp-gs.make"; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
-               ADFE54C006E2493D006628C4 /* woapp.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 5; indentWidth = 8; path = woapp.make; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
                ADFE54C106E2493D006628C4 /* WOApplication.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = WOApplication.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
                ADFE54C206E2493D006628C4 /* WOApplication+defaults.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = "WOApplication+defaults.m"; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
                ADFE54C306E2493D006628C4 /* WOApplication+private.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = "WOApplication+private.h"; sourceTree = "<group>"; };
                ADFE54C406E2493D006628C4 /* WOApplicationMain.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = WOApplicationMain.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
                ADFE54C506E2493D006628C4 /* wobundle-gs.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 5; indentWidth = 8; path = "wobundle-gs.make"; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
-               ADFE54C606E2493D006628C4 /* wobundle.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 5; indentWidth = 8; path = wobundle.make; sourceTree = "<group>"; tabWidth = 8; usesTabs = 1; };
                ADFE54C706E2493D006628C4 /* WOChildComponentReference.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = WOChildComponentReference.h; sourceTree = "<group>"; };
                ADFE54C806E2493D006628C4 /* WOChildComponentReference.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = WOChildComponentReference.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
                ADFE54C906E2493D006628C4 /* WOComponent.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = WOComponent.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
                                AD084B3E07392CB700D0679C /* WOEntity.api */,
                                AD084C3D0739380E00D0679C /* WOFileUpload.api */,
                                AD084C3F0739381C00D0679C /* WOForm.api */,
+                               AD4F35310BAAF99E00323EB9 /* WOFragment.api */,
                                AD084B4007392CD900D0679C /* WOFrame.api */,
                                AD084B4207392CEF00D0679C /* WOGenericContainer.api */,
                                AD084B4407392CFB00D0679C /* WOGenericElement.api */,
                                ADECED40078A4A8300B7221D /* fhs.make */,
                                ADFE543106E2493C006628C4 /* ngobjweb.make */,
                                ADFE54BF06E2493D006628C4 /* woapp-gs.make */,
-                               ADFE54C006E2493D006628C4 /* woapp.make */,
                                ADFE54C506E2493D006628C4 /* wobundle-gs.make */,
-                               ADFE54C606E2493D006628C4 /* wobundle.make */,
                        );
                        name = Makefiles;
                        sourceTree = "<group>";
                                ADFE53BE06E2493C006628C4 /* WOConditional.m */,
                                ADFE53DE06E2493C006628C4 /* WORepetition.m */,
                                ADFE53E106E2493C006628C4 /* WOSetCursor.m */,
+                               AD4F34B20BAAF5BA00323EB9 /* WOFragment.m */,
                        );
                        name = "Control Elements";
                        sourceTree = "<group>";
                                AD084C5A073938AB00D0679C /* WOImage.api in Resources */,
                                ADE763A008BB3BE900F63757 /* WOCopyValue.api in Resources */,
                                ADE766D908BE836200F63757 /* WOSetHeader.api in Resources */,
+                               AD4F35320BAAF99E00323EB9 /* WOFragment.api in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                AD2EC19E08E2E506006B7836 /* WOxTalElemBuilder.m in Sources */,
                                AD4D5F9909C83A7D009BFDAF /* SoCookieAuthenticator.m in Sources */,
                                AD4D5F9B09C83A7D009BFDAF /* SoProductLoader.m in Sources */,
+                               AD4F34B30BAAF5BA00323EB9 /* WOFragment.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        buildSettings = {
                                COPY_PHASE_STRIP = NO;
                                DYLIB_COMPATIBILITY_VERSION = 4.7.0;
-                               DYLIB_CURRENT_VERSION = 4.7.4;
+                               DYLIB_CURRENT_VERSION = 4.7.5;
                                FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
                                FRAMEWORK_VERSION = A;
                                GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index b272562658518f3ef206d5c9e2d29c2505a29d85..ca6319cc65ddd9e985ce0f72e0b788b9db84a3f5 100644 (file)
     int xmlStyleEmptyElements:1;
     int allowEmptyAttributes:1;
     int hasNewSession:1;    /* session was created during the run */
-    int reserved:27;
+    int isRenderingDisabled:1;
+    int reserved:26;
   } wcFlags;
   
 @protected
   /* SOPE */
+  NSString      *fragmentID;
+
+  /* SoObjects */
   id             clientObject;
   NSMutableArray *traversalStack;
   NSString       *soRequestType; // WebDAV, XML-RPC, METHOD
 
 - (NSArray *)resourceLookupLanguages;
 
+/* fragments */
+
+- (void)setFragmentID:(NSString *)_fragmentID;
+- (NSString *)fragmentID;
+
+- (void)enableRendering;
+- (void)disableRendering;
+- (BOOL)isRenderingDisabled;
+  
 @end
 
 #endif /* __NGObjWeb_WOContext_H__ */
index 874d7a8afc0a9484ffd109c1076978b637cb7518..17e033af9cc08aa83df54d84cf84e5a1112f7087 100644 (file)
@@ -36,6 +36,7 @@ NGObjWeb_EXPORT NSString *WORequestValuePageName;
 NGObjWeb_EXPORT NSString *WORequestValueContextID;
 NGObjWeb_EXPORT NSString *WORequestValueSenderID;
 NGObjWeb_EXPORT NSString *WORequestValueSessionID;
+NGObjWeb_EXPORT NSString *WORequestValueFragmentID;
 NGObjWeb_EXPORT NSString *WONoSelectionString;
 
 @interface WORequest : WOMessage
@@ -108,6 +109,11 @@ NGObjWeb_EXPORT NSString *WONoSelectionString;
 - (NSString *)cookieValueForKey:(NSString *)_key;
 - (NSDictionary *)cookieValues;
 
+/* SOPE extensions */
+
+- (NSString *)fragmentID;
+- (BOOL)isFragmentIDInRequest;
+
 @end
 
 #if COMPILING_NGOBJWEB
index b415afdf89b8e2b713000cd25cfd1c9230aa8e50..3e15b7beac7d83ae8c2aeed618443aca5665632d 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=4
+SUBMINOR_VERSION:=5
 
 # v4.5.234 requires libDOM          v4.5.21
 # v4.5.214 requires libNGExtensions v4.5.179
index cdb6950bafd7bac5cab0b77709018b676ad8a2f3..136590336d675b75998541c0e6f22e2e933e06b9 100644 (file)
@@ -889,11 +889,13 @@ static NSString *WEClientDetectorFormName = @"WEClientDetect";
              NSStringFromClass([self class])];
     return;
   }
-  
+
+  if ([_ctx isRenderingDisabled]) return;
+
   if (![[[_ctx request] clientCapabilities] isJavaScriptBrowser])
     /* only works on JavaScript browsers ... */
     return;
-  
+
   [_response appendContentString:@"<input type='hidden' name='"];
   [_response appendContentString:WEClientDetectorFormName];
   [_response appendContentString:@"' value='browserConfig' />"];
index ef20f81fb12895d0493acd2983b39d0a1a92b44b..e381fd9eee1d3c95fa212e87fc5d368543c2c68e 100644 (file)
@@ -174,6 +174,7 @@ static Class NSDateClass = Nil;
     [self warnWithFormat:
             @"did not find child component %@ of parent %@",
             self->childName, [parent name]];
+    if ([_ctx isRenderingDisabled]) return;
     [_response appendContentString:@"<pre>[missing component: "];
     [_response appendContentHTMLString:self->childName];
     [_response appendContentString:@"]</pre>"];
index 1b08905714c11bcb38125af53de59abf160276f1..1aa18d618cd8ef0c9e5b396b0e53fd6fd1b35e3c 100644 (file)
@@ -50,7 +50,7 @@ static Class WOAppClass = Nil;
 @implementation WOContext
 
 + (int)version {
-  return 8;
+  return 9;
 }
 
 static Class    WOContextClass       = Nil;
@@ -115,6 +115,11 @@ static NSString *WOApplicationSuffix = nil;
     
     self->request  = [_request retain];
     self->response = [[WOResponse responseWithRequest:_request] retain];
+
+    if (_request && [_request isFragmentIDInRequest]) {
+      [self setFragmentID:[_request fragmentID]];
+      [self disableRendering];
+    }
   }
   return self;
 }
@@ -277,6 +282,7 @@ static NSString *WOApplicationSuffix = nil;
   [self->urlPrefix         release];
   [self->elementID         release];
   [self->reqElementID      release];
+  [self->fragmentID        release];
   [self->activeFormElement release];
   [self->page              release];
   [self->awakeComponents   release];
@@ -1043,6 +1049,24 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) {
     : [[self request] browserLanguages];
 }
 
+/* fragments */
+
+- (void)setFragmentID:(NSString *)_fragmentID {
+  ASSIGNCOPY(self->fragmentID, _fragmentID);
+}
+- (NSString *)fragmentID {
+  return self->fragmentID;
+}
+
+- (void)enableRendering {
+  self->wcFlags.isRenderingDisabled = NO;
+}
+- (void)disableRendering {
+  self->wcFlags.isRenderingDisabled = YES;
+}
+- (BOOL)isRenderingDisabled {
+  return self->wcFlags.isRenderingDisabled; 
+}
 
 /* DeprecatedMethodsInWO4 */
 
index afd8a8ebb030981e503d0c765df7ffc58cf16b32..a8c6f4651b79fe6b6d78171d623a13c01be6a3d6 100644 (file)
 @end
 #endif
 
-NGObjWeb_DECLARE NSString *WORequestValueData       = @"wodata";
-NGObjWeb_DECLARE NSString *WORequestValueInstance   = @"woinst";
-NGObjWeb_DECLARE NSString *WORequestValuePageName   = @"wopage";
-NGObjWeb_DECLARE NSString *WORequestValueContextID  = @"_c";
-NGObjWeb_DECLARE NSString *WORequestValueSenderID   = @"_i";
-NGObjWeb_DECLARE NSString *WORequestValueSessionID  = @"wosid";
-NGObjWeb_DECLARE NSString *WONoSelectionString      = @"WONoSelectionString";
+NGObjWeb_DECLARE NSString *WORequestValueData        = @"wodata";
+NGObjWeb_DECLARE NSString *WORequestValueInstance    = @"woinst";
+NGObjWeb_DECLARE NSString *WORequestValuePageName    = @"wopage";
+NGObjWeb_DECLARE NSString *WORequestValueContextID   = @"_c";
+NGObjWeb_DECLARE NSString *WORequestValueSenderID    = @"_i";
+NGObjWeb_DECLARE NSString *WORequestValueSessionID   = @"wosid";
+NGObjWeb_DECLARE NSString *WORequestValueFragmentID  = @"wofid";
+NGObjWeb_DECLARE NSString *WONoSelectionString       = @"WONoSelectionString";
 
 @interface WOCoreApplication(Resources)
 + (NSString *)findNGObjWebResource:(NSString *)_name ofType:(NSString *)_ext;
@@ -675,6 +676,21 @@ static BOOL debugOn = NO;
   return values;
 }
 
+/* SOPE extensions */
+
+- (NSString *)fragmentID {
+  NSString *v;
+  
+  v = [self formValueForKey:WORequestValueFragmentID];
+  if (v == nil) return nil;
+  v = [v stringByTrimmingWhiteSpaces];
+  return [v isNotEmpty] ? v : nil;
+}
+
+- (BOOL)isFragmentIDInRequest {
+  return [self fragmentID] != nil ? YES : NO;
+}
+
 /* logging */
 
 - (BOOL)isDebuggingEnabled {
index 789e3bf95ce28457dd668880ddae218d981ef768..a9ed103bd778a169d5ed8df54fa9f527e9909943 100644 (file)
   if (__R__) {__R__->addHStr(__R__, @selector(appendContentHTMLString:), \
                             __C__);}
 
+#define WOResponse_AppendBeginTag(__R__,__C__) \
+if (__R__) { \
+  __R__->addChar(__R__, @selector(appendContentCharacter:), '<'); \
+  __R__->addStr(__R__, @selector(appendContentString:), __C__); \
+}
+#define WOResponse_AppendBeginTagEnd(__R__) \
+if (__R__) {__R__->addChar(__R__, @selector(appendContentCharacter:), '>');}
+
+#define WOResponse_AppendEndTag(__R__,__C__) \
+if (__R__) { \
+  __R__->addCStr(__R__, @selector(appendContentCString:), \
+                 (const unsigned char *)"</"); \
+  __R__->addStr(__R__, @selector(appendContentString:), __C__); \
+  __R__->addChar(__R__, @selector(appendContentCharacter:), '>'); \
+}
+
+#define WOResponse_AppendAttribute(__R__,__K__,__V__) \
+if (__R__) { \
+  __R__->addChar(__R__, @selector(appendContentCharacter:), ' '); \
+  __R__->addStr(__R__, @selector(appendContentString:), __K__); \
+  __R__->addCStr(__R__, @selector(appendContentCString:), \
+                 (const unsigned char *)"=\""); \
+  __R__->addHStr(__R__, @selector(appendContentHTMLString:), __V__); \
+  __R__->addChar(__R__, @selector(appendContentCharacter:), '\"'); \
+}
+
 // TODO: performance ! - use static buffer and appendContentCString !
 
 #define WOResponse_AddUInt(__R__,__C__) \
index ba7377b3722a9add1033e3da7457f8799d8ebb93..56763d45176537094ba69b0f9039df9873652667 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-17  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * *.m: ported all elements to honour the new
+         -[WOContext isRenderingDisabled] flag. (v4.7.93)
+
 2006-11-08  Helge Hess  <helge.hess@opengroupware.org>
 
        * WETableView/WETableCell.m: fixed a MacOS compilation warning
index 06d2f939823a77485898316a3904d981e21e8a34..ebab28f02846da08e7d9b125adb36df3c40e71cc 100644 (file)
 }
 
 - (void)appendToResponse:(WOResponse *)_response
-               inContext:(WOContext *)_ctx
+  inContext:(WOContext *)_ctx
 {
   WOComponent          *comp;
   NSString             *tmp;
   NSString             *tt;    // toolTip
   WEClientCapabilities *ccaps;
 
+  if ([_ctx isRenderingDisabled]) return;
+
   comp    = [_ctx component];
   ccaps   = [[_ctx request] clientCapabilities];
   tt      = [self->toolTip stringValueInComponent:comp];
index 2aebd423dd02929adfa97f090c3cb0e7e79efda9..f3f4581dbb5536c4522f5b0c9ba3a2eb26b05034 100644 (file)
   WEClientCapabilities *ccaps;
   BOOL                 ie, ns;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+
   eid   = [[[_ctx elementID] componentsSeparatedByString:@"."]
                   componentsJoinedByString:@"_"];
   comp  = [_ctx component];
index bc2e690b403e81e827e07b35a6893c8d4cb3b8fe..2233de939db5010d75323e0857555aabea524cc7 100644 (file)
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   WOComponent          *comp;
   NSString             *tmp;
-  NSString             *url = nil;
+  NSString             *url;
   WEClientCapabilities *ccaps;
   BOOL                 ie, ns;
   NSString             *eid;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   comp  = [_ctx component];
   ccaps = [[_ctx request] clientCapabilities];
   ie    = [ccaps isJavaScriptBrowser] && [ccaps isInternetExplorer];
@@ -82,7 +87,9 @@
     url = [_ctx componentActionURL];
   else if (self->href != nil)
     url = [self->href stringValueInComponent:comp];
-  
+  else
+    url = nil;
+
   if (ie) {
     tmp  = [[NSString alloc] initWithFormat:
                      @"<div align=\"left\" class=\"menuItem\" url=\"%@\">"
index 1813fc060a29e6d734ba0ce91dd07de9b56569df..c216d0711097a92dbb90790a3305f5cfa7f73340 100644 (file)
@@ -135,6 +135,8 @@ static NSString *JSShiftClick_Script =
   NSString *eid  = nil;
   NSString *prfx = nil;
 
+  if ([_ctx isRenderingDisabled]) return;
+
   ccaps = [[_ctx request] clientCapabilities];
 
   eid = [self->identifier stringValueInComponent:[_ctx component]];
index 053f6211492a700757b66d82d08e153c20040a8a..0b8be037567d51a013e9ba2343497338be00eb92 100644 (file)
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   WOResourceManager *rm;
-  WOComponent *sComponent = [_ctx component];
-  NSString    *lidentifier, *lname, *lfw;
-  NSArray     *langs;
-  
-  lname = [self->name stringValueInComponent:sComponent];
+  WOComponent       *sComponent;
+  NSString          *lidentifier, *lname, *lfw;
+  NSArray           *langs;
+
+  if ([_ctx isRenderingDisabled]) return;
+
+  sComponent = [_ctx component];
+  lname      = [self->name stringValueInComponent:sComponent];
   if (![lname isNotEmpty]) lname = @"Localizable";
 
   lfw = [self->framework stringValueInComponent:sComponent];
index be1c92983ff4cb5f9258d1e9440131e9c7fecf2d..2e14700be427ec48bacfb621187a04d639319fb4 100644 (file)
@@ -1,7 +1,8 @@
 # version file
 
-SUBMINOR_VERSION:=92
+SUBMINOR_VERSION:=93
 
+# v4.7.93 requires libNGObjWeb v4.7.5
 # v4.5.76 requires libNGObjWeb v4.5.176
 # v4.5.75 requires libNGObjWeb v4.5.174
 # v4.5.65 requires libNGObjWeb v4.5.106
index cee8103ddfe89382904ee65ea31a49d1f9430546..a91343e2191cd75285ac657744a29aad7699b24f 100644 (file)
@@ -413,6 +413,11 @@ _applyPathAppenedByItem(WEBrowser *self, NSArray *path, id obj, id cmp) {
 }
 
 - (void)appendToResponse:(WOResponse *)_resp inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_resp inContext:_ctx];
+    return;
+  }
+  
 #if 1
   [self appendWithScrolling:_resp inContext:_ctx];
 #else
index c08ed8136d84b443c275890aa89828f00a39048f..c6b120fb6b25d7ae02b72dea16bdcf66903c3074 100644 (file)
@@ -127,6 +127,11 @@ static NSString *retStr02ForInt(int i) {
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   [_response appendContentString:
              @"<table border='0' cellpadding='0' cellspacing='0'>"
              @"<tr>"
@@ -870,6 +875,9 @@ static NSString *retStr02ForInt(int i) {
   inContext: (WOContext *)_ctx
 {
   WOComponent *comp;
+  
+  if ([_ctx isRenderingDisabled]) return;
+
   comp = [_ctx component];
   
   [[self class] appendWEDateFieldScriptToResponse: _response inContext:_ctx
index 995cffc4a23f67fc30ccc9573de0cdfcb2e82974..f4ac452a37f437a73e45dcf781e1c691ffb366ea 100644 (file)
@@ -146,6 +146,11 @@ static NSString *No                        = @"NO";
   BOOL        doScript;
   NSString    *scriptId;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_resp inContext:_ctx];
+    return;
+  }
+  
   comp     = [_ctx component];
   doScript = [self->allowScript boolValueInComponent:comp];
   scriptId = [[[_ctx elementID] componentsSeparatedByString:@"."]
@@ -399,6 +404,11 @@ static NSString *No                        = @"NO";
   NSString    *fragId   = nil;
   NSString    *scriptId = nil;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_resp inContext:_ctx];
+    return;
+  }
+  
   comp   = [_ctx component];
   fragId = [self->fragmentIdentifier stringValueInComponent:comp];
 
index 146fcb60eac32697b075dd330ba0ba952c992b2b..81e93c9792950b52af0a40c3dfa3a7338358de59 100644 (file)
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
   [self _appendDateFieldToResponse:_response inContext:_ctx];
 }
 
index 6572791fca6acb2f32f8a6fabae4e3f5946480f5..191a10f377a98463808ca1d720dfb7e8ed6c4b74 100644 (file)
@@ -137,6 +137,11 @@ static BOOL debugTakeValues = NO;
   NSString *ttag;
   BOOL     doDnD;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   doDnD = [[[_ctx request] clientCapabilities] doesSupportDHTMLDragAndDrop];
     
   if (doDnD) {
index 5ea76213d00ef7a79cee04ca88c1eab19cbb3612..1bd742ca4a77713b9290f6f317f5bb7d3798399c 100644 (file)
   NSString *containerID = nil;
   BOOL     doDnD, doSwap, doAttach;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   doDnD = [[[_ctx request] clientCapabilities] doesSupportDHTMLDragAndDrop];
 
   //doDnD = YES;
index c783045b0fc6246986befc14693e7a1198df1266..f5cc7843d1d073c841c8ae2928eb9ead23d1ca4b 100644 (file)
@@ -414,6 +414,8 @@ static NSString *OWFormElementName(WEEpozEditor *self, WOContext *_ctx) {
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) return;
+
   if ([self isEpozBrowserInContext:_ctx])
     [self appendEpozToResponse:_response inContext:_ctx];
   else
index 694134b0b21819f34f5d1893abe9d248f0fef828..4b3d2ac4b03cec39b66f199538cdb76e6e22dff2 100644 (file)
@@ -19,6 +19,6 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>4.5</string>
+       <string>4.7</string>
 </dict>
 </plist>
index 8a92970ed4a7b4d493cc4efd29b916009bde5eea..82ed28f2bb43b6676912a35e7da116626b893d54 100644 (file)
                ADFE77BA06E2986F006628C4 /* EOControl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ADD6610D06DA3D1F007161CA /* EOControl.framework */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-               ADD65B6806DA32D6007161CA /* Development */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = NO;
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                               GCC_OPTIMIZATION_LEVEL = 0;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "APPLE_RUNTIME=1",
-                                       "NeXT_Foundation_LIBRARY=1",
-                                       "COCOA_Foundation_LIBRARY=1",
-                                       "NeXT_RUNTIME=1",
-                                       "COMPILE_AS_FRAMEWORK=1",
-                                       "DEBUG=1",
-                               );
-                       };
-                       name = Development;
-               };
-               ADD65B6906DA32D6007161CA /* Wrapper */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = YES;
-                               DEPLOYMENT_LOCATION = NO;
-                               DEPLOYMENT_POSTPROCESSING = YES;
-                               DSTROOT = /;
-                               DYLIB_INSTALL_NAME_BASE = "@executable_path/../Frameworks/";
-                               FRAMEWORK_SEARCH_PATHS = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks";
-                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-                               GCC_OPTIMIZATION_LEVEL = 3;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "APPLE_RUNTIME=1",
-                                       "NeXT_Foundation_LIBRARY=1",
-                                       "COCOA_Foundation_LIBRARY=1",
-                                       "NeXT_RUNTIME=1",
-                                       "COMPILE_AS_FRAMEWORK=1",
-                               );
-                               SKIP_INSTALL = YES;
-                               SYMROOT = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks";
-                               TEMP_DIR = "$(SYMROOT)/$(PROJECT_NAME).build";
-                               UNSTRIPPED_PRODUCT = NO;
-                               ZERO_LINK = NO;
-                       };
-                       name = Wrapper;
-               };
-/* End PBXBuildStyle section */
-
 /* Begin PBXContainerItemProxy section */
                ADFE77B606E297B2006628C4 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        );
                        buildRules = (
                        );
-                       buildSettings = {
-                               DYLIB_COMPATIBILITY_VERSION = 1;
-                               DYLIB_CURRENT_VERSION = 4.7.92;
-                               FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-                               FRAMEWORK_VERSION = A;
-                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
-                               GCC_PREFIX_HEADER = common.h;
-                               GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
-                               GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
-                               GCC_WARN_UNKNOWN_PRAGMAS = NO;
-                               INFOPLIST_FILE = "WEExtensions-Info.plist";
-                               INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-                               OTHER_CFLAGS = "";
-                               OTHER_LDFLAGS = (
-                                       "-seg1addr",
-                                       0xC4000000,
-                                       "-headerpad_max_install_names",
-                               );
-                               OTHER_REZFLAGS = "";
-                               PRODUCT_NAME = WEExtensions;
-                               SECTORDER_FLAGS = "";
-                               WARNING_CFLAGS = "-Wmost";
-                       };
                        dependencies = (
                        );
                        name = WEExtensions;
                        productName = WEExtensions;
                        productReference = ADD65D5806DA372D007161CA /* WEExtensions.framework */;
-                       productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>English</string>
-       <key>CFBundleExecutable</key>
-       <string>WEExtensions</string>
-       <key>CFBundleIdentifier</key>
-       <string>org.OpenGroupware.SOPE.WEExtensions</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundlePackageType</key>
-       <string>FMWK</string>
-       <key>CFBundleSignature</key>
-       <string>????</string>
-       <key>CFBundleVersion</key>
-       <string>1.0</string>
-</dict>
-</plist>
-";
                        productType = "com.apple.product-type.framework";
                };
 /* End PBXNativeTarget section */
                ADD65B6A06DA32D6007161CA /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = ADA07980085738E600993825 /* Build configuration list for PBXProject "WEExtensions" */;
-                       buildSettings = {
-                       };
-                       buildStyles = (
-                               ADD65B6806DA32D6007161CA /* Development */,
-                               ADD65B6906DA32D6007161CA /* Wrapper */,
-                       );
                        hasScannedForEncodings = 0;
                        mainGroup = ADD65B6606DA32D6007161CA;
                        productRefGroup = ADD65D5906DA372D007161CA /* Products */;
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                COPY_PHASE_STRIP = NO;
-                               DYLIB_COMPATIBILITY_VERSION = 1;
+                               DYLIB_COMPATIBILITY_VERSION = 4.7.0;
                                DYLIB_CURRENT_VERSION = 4.7.92;
                                FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
                                FRAMEWORK_VERSION = A;
                                DEPLOYMENT_LOCATION = NO;
                                DEPLOYMENT_POSTPROCESSING = YES;
                                DSTROOT = /;
-                               DYLIB_COMPATIBILITY_VERSION = 1;
-                               DYLIB_CURRENT_VERSION = 4.7.92;
+                               DYLIB_COMPATIBILITY_VERSION = 4.7.0;
+                               DYLIB_CURRENT_VERSION = 4.7.93;
                                DYLIB_INSTALL_NAME_BASE = "@executable_path/../Frameworks/";
                                FRAMEWORK_SEARCH_PATHS = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks";
                                FRAMEWORK_VERSION = A;
index 3e0c4f5fd8493fd039869d4049c4463ae8c1fe3a..df5159f993a3241183bb546025a9ead4b2174ae5 100644 (file)
@@ -552,6 +552,11 @@ _takeValuesInCell(WEMonthOverview *self, WORequest *request,
   BOOL           hasRightBottom = NO;
   BOOL           hasCell        = NO;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   [self _calcMatrixInContext:_ctx];
       
   comp = [_ctx component];
@@ -1122,6 +1127,11 @@ _takeValuesInCell(WEMonthOverview *self, WORequest *request,
   BOOL     isEdge;
   int      cols;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   orient = [self->orientation stringValueInComponent:[_ctx component]];
   isEdge = ([orient rangeOfString:@"/"].length > 0);
   
@@ -1233,6 +1243,11 @@ _takeValuesInCell(WEMonthOverview *self, WORequest *request,
   NSDictionary *monthViewContextDict;
   id tmp;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   if ((tmp = [_ctx monthOverviewQueryObjects]) != nil) {
     [(NSMutableArray *)tmp addObject:@"title"];
     return;
index 184f85810a0c43e269ccc479721546d1a84b919e..4b25f13568fa90b423cc7f6c48519dca0ec34170 100644 (file)
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString *href;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   href = [_ctx componentActionURL];
   [_response appendContentCString:(unsigned char *)"<a href=\""];
   [_response appendContentString:href];
index 65feefcefbdb77794585fb484dfa4529038d8e22..85cd0701c12fb8eed87ed41c49bd4cc41e03d662 100644 (file)
@@ -452,6 +452,11 @@ static inline NSString *WEPageLabelForKey(NSString *_key, WOContext *_ctx) {
   NSArray        *keys;
   unsigned       i, count;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   [self updateConfigInContext:_ctx];
   
   doForm        = NO;  /* generate form controls ? */
@@ -796,6 +801,11 @@ static inline NSString *WEPageLabelForKey(NSString *_key, WOContext *_ctx) {
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString *tmp;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   if ((tmp = [_ctx objectForKey:WEPageView_HEAD]))
     [self appendHead:tmp toResponse:_response inContext:_ctx];
   else if ((tmp = [_ctx objectForKey:WEPageView_BODY]))
index 767e7a6f0802b73c0579a3995e645f46d7e57f05..9877ddb855efdef69c27aac9bc0c8ca51dd976fe 100644 (file)
   /* evaluate */
   
   if (![qualifier respondsToSelector:@selector(evaluateWithObject:)]) {
-    [self logWithFormat:
-            @"ERROR: got a qualifier which does not respond to "
-            @"evaluateWithObject: %@", qualifier];
+    [self errorWithFormat:@"got a qualifier which does not respond to "
+                          @"evaluateWithObject: %@", qualifier];
     doShow = NO;
   }
   else
index f061a995ca62eea39c45ee47e59790ddf5f842b9..85abab02a0b8eba5366581dbde3cf50f28c6e579 100644 (file)
@@ -150,7 +150,16 @@ static inline BOOL _doShow(WERichString *self, WOContext *_ctx) {
   NSFormatter *fmt       = nil;
   id       v             = nil;
 
-
+  
+  if ([_ctx isRenderingDisabled]) {
+    if (_doShow(self, _ctx)) {
+      [_ctx appendElementIDComponent:@"1"];
+      [self->template appendToResponse:_response inContext:_ctx];
+      [_ctx deleteLastElementIDComponent];
+    }
+    return;
+  }
+  
   if (!_doShow(self, _ctx)) return;
   
   comp = [_ctx component];
index 9a98f56f42e8c25c9346dd92a611e6573b3c8333..3b2ce0cb50753744a805eedc364195f22e3fd497 100644 (file)
@@ -323,7 +323,6 @@ static NSString *WESwitchDict              = @"WESwitchDict";
   NSString    *k          = nil;
   NSArray     *ks         = nil;
 
-
   k   = [self->key  stringValueInComponent:[_ctx component]];
   ks  = [self->keys valueInComponent:[_ctx component]];
 
@@ -338,15 +337,15 @@ static NSString *WESwitchDict              = @"WESwitchDict";
 
   if ((k == nil) && (ks == nil)) {
 #if DEBUG
-    [[_ctx component] logWithFormat:
-                      @"Warning! WECase: Neither 'key' nor 'keys' set!!!"];
+    [[_ctx component] warnWithFormat:
+                      @"WECase: Neither 'key' nor 'keys' set!!!"];
 #endif
     return;
   }
   if ((k != nil) && (ks != nil)) {
 #if DEBUG
-    [[_ctx component] logWithFormat:
-                      @"Warning! WECase: Both, 'key' and 'keys' are set!!!"];
+    [[_ctx component] warnWithFormat:
+                      @"WECase: Both, 'key' and 'keys' are set!!!"];
 #endif
     return;
   }
index 41b26ef248534220364b6cd3ce5e218410ef04fb..4ed6160151e37e6f88c6a791e94fa9545585dbec 100644 (file)
@@ -397,10 +397,15 @@ static NSString *retStrForInt(int i) {
   NSString *k;
   BOOL     doForm;
   id       tmp;
-  
+
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+
   doForm = [_ctx isInForm];
-  k = [self->key stringValueInComponent:[_ctx component]];
-  
+  k      = [self->key stringValueInComponent:[_ctx component]];
+
   if ((tmp = [_ctx objectForKey:WETabView_HEAD])) {
     if ([tmp isEqual:WETabView_COLLECT]) {
       [self _collectInContext:_ctx key:k];
@@ -415,7 +420,8 @@ static NSString *retStrForInt(int i) {
           activeKey:tmp key:k];
   }
   else {
-    NSLog(@"WARNING(%s): invalid WETabItem state !!!", __PRETTY_FUNCTION__);
+    [self errorWithFormat:@"(%s): invalid WETabItem state !!!",
+                          __PRETTY_FUNCTION__];
     [_response appendContentString:@"[invalid state]"];
   }
 }
index d7546e3fb640b6041119f8f9759af0293c9bbfd8..1d46628d3b5863d2e5184027ceb09adb3780019e 100644 (file)
@@ -819,6 +819,11 @@ static NSNumber *YesNumber;
   NSArray      *keys;
   int          tabViewCount; /* used for image id's and writing script once */
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   doScript      = NO;  /* perform tab-clicks on browser (use javascript) */
   tabViewCount  = [[_ctx valueForKey:@"WETabViewScriptDone"] intValue];
   cmp           = [_ctx component];
index 744565b6f2dbc8bc05ce4f1fcd9520aecdef02d9..473c6fb1cbb3f991bbb84f40b2bc774f52c78dd0 100644 (file)
@@ -219,6 +219,11 @@ static NSNumber *numForUInt(unsigned int i) {
   NSArray            *allSpans;
   unsigned           rowCount, colCount, count;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   self->component = [_ctx component];
   self->objs      = 
     [[[self->list    valueInComponent:self->component] copy] autorelease];
@@ -245,7 +250,7 @@ static NSNumber *numForUInt(unsigned int i) {
   
   if ([self->subElems count] == 0) {
     /* no content */
-    NSLog(@"WARNING: no sub-elements !");
+    [self warnWithFormat:@"no sub-elements !"];
     return;
   }
 
index 95add03f944ffed3c7856eb36cb290bfbc4553df..8f58f3f6014f4baf2bb76251ec598e26151ea134 100644 (file)
   NSString *tag;
   int      cspan, rspan;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   if ((tmp = [_ctx valueForKey:@"WETableMatrix_Query"])) {
     [tmp addObject:[self modeKey]];
     return;
index 3e4f3052d8404dfe57727560af71f09f8ec2d3fc..c4376fbd23c2924428f7e9894d2ff96534b7e0f2 100644 (file)
@@ -99,6 +99,11 @@ static NSString *retStrForInt(int i) {
   NSString *tag;
   int      ispan;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   pos = [self->position stringValueInComponent:[_ctx component]];
   
   if ((tmp = [_ctx valueForKey:@"WETableMatrix_Query"]) != nil) {
index 530f7eeee02ca4449d9e025aab471b4f2e09803d..71e684cd09bc402d4426a6a88ddb050e188863e6 100644 (file)
 /* responder */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
   if ([_ctx objectForKey:WETableView_CollectMode]) {
     [self _collectDataInContext:_ctx];
     return;
index 1a1aa710b5e8c7275b250972e69357a6e939f6c7..50d3dd0b721b9e098d93e4d95610126698cd239c 100644 (file)
 /* responder */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
   if ([[_ctx objectForKey:WETableView_HeaderMode] boolValue]) {
     WOComponent *cmp = nil;
     NSString    *bg  = nil;
index e62b5908cb8d1582eed1430c6351a219e7de0430..0f52a73435fe581714e251ba2d69893cbedc6d9e 100644 (file)
@@ -1621,6 +1621,11 @@ static inline void _applyState_(WETableView *self, WOComponent *cmp) {
   */
   WOComponent *cmp;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   [self updateStateInContext:_ctx];
   [self updateScriptIdInContext:_ctx];
   [self updateConfigInContext:_ctx];
index a41a44376f603acaa1592b55638e1dd0f0d42881..c744e01f18d1b6ff4ac75dec937f92a85ff7e38f 100644 (file)
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
-  [self _appendTimeFieldToResponse:_response inContext:_ctx];
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+  }
+  else {
+    [self _appendTimeFieldToResponse:_response inContext:_ctx];
+  }
 }
 
 @end /* WETimeField */
index f03c42e9806fc888af216b189900160276ff31ae..4244b2d6839b30611edfc8acf6ecb6e7ec6c37e9 100644 (file)
@@ -415,6 +415,11 @@ static Class StrClass = Nil;
 /* generate response */
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   self->doTable = ([_ctx objectForKey:WETreeView_RenderNoTable] == nil)?YES:NO;
   
   if ([_ctx objectForKey:WETreeView_HEADER_MODE])
index 8ad14ca2ecc04b5f18111c7f9b1806ef03c5fc5e..936251534455fcb1f5a406242eaa0939e8c9a698 100644 (file)
   BOOL isTree;
   BOOL doTable;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   if (![_ctx objectForKey:WETreeView_HEADER_MODE])
     return;
     
index 505d00d3a94a44b89c74c3e004a3ae6264f570fc..c893dfeacf702e94d8a9f6db419b27ae3ced60a4 100644 (file)
@@ -684,6 +684,11 @@ NSString *WETreeView_Space          = @"WETreeView_Space";
   BOOL        doTable;
   int         i, cnt, depth;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   [self updateConfigInContext:_ctx];
 
   comp = [_ctx component];
index f60593a2a621fe018468bdb1e54c74765cf821ae..e23e59242d6fed54c3e09ff202dbf04e5055508d 100644 (file)
@@ -770,6 +770,11 @@ _applyIndex(WEWeekColumnView *self, WOComponent *comp, unsigned _idx)
 }
 
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   [self _calcMatrixInContext:_ctx];
   
   [_response appendContentString:@"<table "];
index 32e7dbcdd82bef19767735927f351f9ff32f3a6a..5bde66c45f89028e63cee96f2b1dc040a1a37eb1 100644 (file)
@@ -1167,6 +1167,11 @@ _applyIndex(WEWeekOverview *self, WOComponent *comp, unsigned _idx)
   int         i;
   BOOL        showWeekend;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   [self _calcMatrixInContext:_ctx];
   
   comp = [_ctx component];
index 16bb4480edafd3e4bbe71fd2d6021fd4a666fd32..8fac2c4a3d87585ba0b39a51bf9f18714f55be36 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-17  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * WEPrototypeScript.m, WELiveLink.m: obey WOContext's new
+         -isRenderingDisabled flag (v4.7.9)
+
 2006-08-28  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * WEPrototypeElemBuilder.m: added "prototype-script" reference to
index 81aa86606364cc22d3c630612bc75859ce425915..34e4bfb1e9d61740149829b6cb9277bf2f948201 100644 (file)
@@ -1,5 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=8
+SUBMINOR_VERSION:=9
 
+# v4.7.9 requires libNGObjWeb v4.7.5
 # v4.5.1 requires libNGObjWeb v4.5.170
index dae0eae05415a9f7ffdcd1091134892b3d64de6b..a1db500ff160d80a705207b41d001431ea78a4e4 100644 (file)
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString *s;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   /* first ensure that prototype is loaded */
   [WEPrototypeScript appendToResponse:_response inContext:_ctx];
   
index 56fa4a85a7f85a602be15c45dc1c92cb35946f34..37d0b0f7443653d46504ec3535b5a95098437a4a 100644 (file)
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                COPY_PHASE_STRIP = NO;
-                               DYLIB_COMPATIBILITY_VERSION = 4.5.1;
-                               DYLIB_CURRENT_VERSION = 4.7.8;
+                               DYLIB_COMPATIBILITY_VERSION = 4.7.0;
+                               DYLIB_CURRENT_VERSION = 4.7.9;
                                FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
                                FRAMEWORK_VERSION = A;
                                GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index 57d908190f991e50a20aecf2c9632971a378c1da..0b7d5110240d152096721e1b1f6217abc7b21590 100644 (file)
@@ -39,8 +39,8 @@ static NSString *WEPrototypeScriptKey = @"WEPrototypeScriptKey";
 + (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString *url;
 
-  if ([self wasDeliveredInContext:_ctx])
-    return;
+  if ([_ctx isRenderingDisabled]) return;
+  if ([self wasDeliveredInContext:_ctx]) return;
   
   url = [_ctx directActionURLForActionNamed:
                @"WEPrototypeScriptAction/default.js"
index 89e017f9240b2a1c8f52faeb5bcc9aedb1cc35f8..ec192ec102b54510ec61acf6542eff96a849cc9c 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-17  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * *.m: ported all elements to honour the new
+         -[WOContext isRenderingDisabled] flag. (v4.7.31)
+
 2006-07-03  Helge Hess  <helge.hess@opengroupware.org>
 
        * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.30)
index a4d553a4cbab851a4b8573baeb9f063f334ceb43..493a22b6df92760dd238b56aa4fc84b1a56a64df 100644 (file)
 - (void)appendToResponse:(WOResponse *)_response
   inContext:(WOContext *)_ctx
 {
-  WOComponent     *comp;
-  NSString        *tmp;
-  NSArray         *languages;
+  WOComponent *comp;
+  NSString    *tmp;
+  NSArray     *languages;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+
   comp = [_ctx component];
   
   // link
index f187ae4a4dee5e8fd66a2265e734a6faad11992f..fc1cd09837790128e7ab65c9f66082dd852ef243 100644 (file)
 - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
   NSString    *msg;
   WOComponent *comp;
+
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
   
   comp = [_ctx component];
   msg  = (self->confirmMessage)
index ac0e7af377f0a854029f6e3b702e7bc33b910a04..6dd887cb7d9f6a303a81f259e6ffdf9da9cddbdf 100644 (file)
   NSArray     *ta;
   NSString    *s;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   comp = [_ctx component];
   tunselected = [self->unselectedImage stringValueInComponent:comp];
   tselected   = [self->selectedImage   stringValueInComponent:comp];
index 0e70eb1ac3360051f84936b38ce99d72590a8105..2b2e5b37b272dd23c6463784cd327057ac64c6e0 100644 (file)
   NSString    *tmp;
   NSArray     *languages;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_resp inContext:_ctx];
+    return;
+  }
+  
   comp = [_ctx component];
   
   // link
index e0b972123b6355c5c36005e324b2a25176047210..28984d42fd49d1dc2305cfae7b700615c6a2c613 100644 (file)
   NSString    *obj;
   NSRange     r;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   comp        = [_ctx component];
   userAgent   = [[_ctx request] headerForKey:@"user-agent"];
   normalColor = [self->unselectedColor stringValueInComponent:comp];
index afb5ab5798d34c57c5be0adbb6fc459f0ebdc16f..4b5940778979ed8fab7799570cdefb3da2c14d13 100644 (file)
   NSString    *terrMesg, *tformName, *tinput, *ttext;
   NSString    *s;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   comp = [_ctx component];
   elID = [self buildJSSaveID:[_ctx elementID]];
 
index f41b16bd5201a80e42d6dbe43ecd41ac3a56393b..98b8853c860cf0d55f5f410f9b105c95b8e43c27 100644 (file)
@@ -1,6 +1,7 @@
 # Version file
 
-SUBMINOR_VERSION:=30
+SUBMINOR_VERSION:=31
 
+# v4.7.31 requires libNGObjWeb v4.7.5
 # v4.5.23 requires libNGObjWeb v4.5.145
 # v4.5.22 requires libNGObjWeb v4.5.106
index b3a7dbb67e7511bad04d61bea87db48181c244cc..bfb20c8da3896dc53b1708027db7d2981f2ff5e7 100644 (file)
@@ -237,6 +237,11 @@ void _applyIndex(WOCheckBoxMatrix *self, WOComponent *cmp, unsigned _idx)
   unsigned    r, rowCount; // row    index
   unsigned    cnt;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+  
   cmp      = [_ctx component];
   colCount = [self->maxColumns unsignedIntValueInComponent:cmp];
   array    = [self->list valueInComponent:cmp];
index 437441df955377edafd2d3d8aae51684103dd2a8..dbf72ab585a39f13bda70ff9da15696f9a085cf8 100644 (file)
   else
     isCollapsed = ![self->visibility boolValueInComponent:comp];
 
+  if ([_ctx isRenderingDisabled] && !isCollapsed) {
+    [_ctx appendZeroElementIDComponent];
+    [self->template appendToResponse:_resp inContext:_ctx];
+    [_ctx deleteLastElementIDComponent];
+    return;
+  }
+  
   img = (isCollapsed)
     ? [self->closedImageFileName stringValueInComponent:comp]
     : [self->openedImageFileName stringValueInComponent:comp];
index 413519a632cf400e94573ed662aed2fd6a6b59a0..0c267f4d7b3f9e99d6ad75b428dd24b2f9db183e 100644 (file)
   NSEnumerator *keyEnum;
   NSString     *k;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_resp inContext:_ctx];
+    return;
+  }
+  
   comp = [_ctx component];
   dict = [self->dictionary valueInComponent:comp];
   
index f9bf6d56810844e794c37f6b6703d81e0ff3bfb0..4b7d02ac4066fba4cccd0c35c874fa5c398e7d3d 100644 (file)
@@ -19,6 +19,6 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>4.5</string>
+       <string>4.7</string>
 </dict>
 </plist>
index 18074e79186185d5e3f7251f6506eead3613066d..41dce8c39287e07eb751c959f795e7695355598e 100644 (file)
                ADFE73BF06E28EA1006628C4 /* WOxExtElemBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = ADFE73AA06E28EA1006628C4 /* WOxExtElemBuilder.m */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-               ADD65B6806DA32D6007161CA /* Development */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = NO;
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                               GCC_OPTIMIZATION_LEVEL = 0;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "APPLE_RUNTIME=1",
-                                       "NeXT_Foundation_LIBRARY=1",
-                                       "COCOA_Foundation_LIBRARY=1",
-                                       "NeXT_RUNTIME=1",
-                                       "COMPILE_AS_FRAMEWORK=1",
-                                       "DEBUG=1",
-                               );
-                       };
-                       name = Development;
-               };
-               ADD65B6906DA32D6007161CA /* Wrapper */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = YES;
-                               DEPLOYMENT_LOCATION = NO;
-                               DEPLOYMENT_POSTPROCESSING = YES;
-                               DSTROOT = /;
-                               DYLIB_INSTALL_NAME_BASE = "@executable_path/../Frameworks/";
-                               FRAMEWORK_SEARCH_PATHS = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks";
-                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-                               GCC_OPTIMIZATION_LEVEL = 3;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "APPLE_RUNTIME=1",
-                                       "NeXT_Foundation_LIBRARY=1",
-                                       "COCOA_Foundation_LIBRARY=1",
-                                       "NeXT_RUNTIME=1",
-                                       "COMPILE_AS_FRAMEWORK=1",
-                               );
-                               SKIP_INSTALL = YES;
-                               SYMROOT = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks";
-                               TEMP_DIR = "$(SYMROOT)/$(PROJECT_NAME).build";
-                               UNSTRIPPED_PRODUCT = NO;
-                               ZERO_LINK = NO;
-                       };
-                       name = Wrapper;
-               };
-/* End PBXBuildStyle section */
-
 /* Begin PBXContainerItemProxy section */
                ADFE75EF06E28FE9006628C4 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        remoteGlobalIDString = ADFE6FFE06E2765E006628C4;
                        remoteInfo = "SoCore (SXP)";
                };
-               ADFE75F806E2905F006628C4 /* PBXContainerItemProxy */ = {
-                       isa = PBXContainerItemProxy;
-                       containerPortal = ADFE73EA06E28FBB006628C4 /* NGObjWeb.xcodeproj */;
-                       proxyType = 1;
-                       remoteGlobalIDString = ADD65D5706DA372D007161CA;
-                       remoteInfo = NGObjWeb;
-               };
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
                        );
                        buildRules = (
                        );
-                       buildSettings = {
-                               DYLIB_COMPATIBILITY_VERSION = 1;
-                               DYLIB_CURRENT_VERSION = 4.7.30;
-                               FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-                               FRAMEWORK_VERSION = A;
-                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
-                               GCC_PREFIX_HEADER = common.h;
-                               GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
-                               GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
-                               GCC_WARN_UNKNOWN_PRAGMAS = NO;
-                               INFOPLIST_FILE = "WOExtensions-Info.plist";
-                               INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-                               OTHER_CFLAGS = "";
-                               OTHER_LDFLAGS = (
-                                       "-seg1addr",
-                                       0xC4300000,
-                                       "-headerpad_max_install_names",
-                               );
-                               OTHER_REZFLAGS = "";
-                               PRODUCT_NAME = WOExtensions;
-                               SECTORDER_FLAGS = "";
-                               WARNING_CFLAGS = "-Wmost";
-                       };
                        dependencies = (
-                               ADFE75F906E2905F006628C4 /* PBXTargetDependency */,
                        );
                        name = WOExtensions;
                        productName = WOExtensions;
                        productReference = ADD65D5806DA372D007161CA /* WOExtensions.framework */;
-                       productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>English</string>
-       <key>CFBundleExecutable</key>
-       <string>WOExtensions</string>
-       <key>CFBundleIdentifier</key>
-       <string>org.OpenGroupware.SOPE.WOExtensions</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundlePackageType</key>
-       <string>FMWK</string>
-       <key>CFBundleSignature</key>
-       <string>????</string>
-       <key>CFBundleVersion</key>
-       <string>1.0</string>
-</dict>
-</plist>
-";
                        productType = "com.apple.product-type.framework";
                };
 /* End PBXNativeTarget section */
                ADD65B6A06DA32D6007161CA /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = ADA07954085738DC00993825 /* Build configuration list for PBXProject "WOExtensions" */;
-                       buildSettings = {
-                       };
-                       buildStyles = (
-                               ADD65B6806DA32D6007161CA /* Development */,
-                               ADD65B6906DA32D6007161CA /* Wrapper */,
-                       );
                        hasScannedForEncodings = 0;
                        mainGroup = ADD65B6606DA32D6007161CA;
                        productRefGroup = ADD65D5906DA372D007161CA /* Products */;
                };
 /* End PBXSourcesBuildPhase section */
 
-/* Begin PBXTargetDependency section */
-               ADFE75F906E2905F006628C4 /* PBXTargetDependency */ = {
-                       isa = PBXTargetDependency;
-                       name = "NGObjWeb (from NGObjWeb.xcodeproj)";
-                       targetProxy = ADFE75F806E2905F006628C4 /* PBXContainerItemProxy */;
-               };
-/* End PBXTargetDependency section */
-
 /* Begin XCBuildConfiguration section */
                ADA07951085738DC00993825 /* Development */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                COPY_PHASE_STRIP = NO;
-                               DYLIB_COMPATIBILITY_VERSION = 1;
-                               DYLIB_CURRENT_VERSION = 4.7.30;
+                               DYLIB_COMPATIBILITY_VERSION = 4.7.0;
+                               DYLIB_CURRENT_VERSION = 4.7.31;
                                FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
                                FRAMEWORK_VERSION = A;
                                GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index 13444642be126e5340b3144ec6eb2bd9e1918be7..2df9876463565c1c5111a524baa68fd330f7342d 100644 (file)
@@ -213,6 +213,11 @@ void _applyIndex(WORadioButtonMatrix *self, WOComponent *cmp, unsigned _idx)
   unsigned    r, rowCount; // row    index
   unsigned    cnt;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+
   cmp      = [_ctx component];
   colCount = [self->maxColumns unsignedIntValueInComponent:cmp];
   array    = [self->list valueInComponent:cmp];
index 1740a9a9aecf01929bd0ce2e13ea86fc0dca0d6f..aa0580da9ab85a82ad15dbd4c7deea39b7519c66 100644 (file)
@@ -47,7 +47,7 @@
 - (void)takeValuesFromRequest:(WORequest *)_req inContext:(WOContext *)_ctx {
 }
 - (id)invokeActionForRequest:(WORequest *)_req inContext:(WOContext *)_ctx {
-  [self logWithFormat:@"WARNING: called %s on WORedirect!", 
+  [self warnWithFormat:@"called %s on WORedirect!", 
           __PRETTY_FUNCTION__];
   return nil;
 }
@@ -58,7 +58,7 @@
   NSString *loc;
   
   if (![self->url isNotNull]) {
-    [self logWithFormat:@"ERROR: missing URL for redirect!"];
+    [self errorWithFormat:@"missing URL for redirect!"];
     return;
   }
   
@@ -68,7 +68,7 @@
     loc = [self->url stringValue];
 
   if ([loc length] == 0) {
-    [self logWithFormat:@"ERROR: got invalid URL for redirect: '%@'(%@)", 
+    [self errorWithFormat:@"got invalid URL for redirect: '%@'(%@)", 
             self->url, NSStringFromClass([self->url class])];
     return;
   }
index 0cb4a45973d0948068525b1f9b537ace8dc1017d..504312a0491d3282894bd25e357610f8d276aad1 100644 (file)
   [_ctx appendElementIDComponent:@"tab"];
   {
     WOComponent *sComponent;
-    NSArray *ttabs;
-    unsigned i;
+    NSArray     *ttabs;
+    unsigned    i;
     
     sComponent = [_ctx component];
-    ttabs = [self->tabs valueInComponent:sComponent];
+    ttabs      = [self->tabs valueInComponent:sComponent];
     
     [_ctx appendZeroElementIDComponent];
     
 }
 
 - (id)invokeActionForRequest:(WORequest *)_req inContext:(WOContext *)_ctx {
-  id result;
+  id       result;
   NSString *section;
 
   section = [_ctx currentElementID];
   unsigned    i, selIdx;
   NSString    *selColor, *unselColor, *s;
   
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+
   sComponent = [_ctx component];
   ttabs = [self->tabs valueInComponent:sComponent];
 
index 85eb87240649dcc948cf7a99a2b77f15e3bcc3a0..6f24ef804c697d81d17946cf4acc33a15efa02cc 100644 (file)
@@ -202,6 +202,11 @@ static inline void _applyIndex(WOTable *self, WOComponent *cmp, unsigned _idx)
   unsigned    cnt;
   unsigned    ownTDCount = 0;
 
+  if ([_ctx isRenderingDisabled]) {
+    [self->template appendToResponse:_response inContext:_ctx];
+    return;
+  }
+
   cmp      = [_ctx component];
   colCount = [self->maxColumns unsignedIntValueInComponent:cmp];
   array    = [self->list valueInComponent:cmp];
index 38adad543c92de210601531b1df89e48ced49144..11336c3fcc324a5c924328de64ee1fdc819f6a53 100644 (file)
@@ -71,7 +71,9 @@
   NSNumber    *v;       // value        association
   NSString    *nFormat; // numberFormat association
   NSString    *color;
-  NSString    *result = nil;
+  NSString    *result;
+
+  if ([_ctx isRenderingDisabled]) return;
 
   comp    = [_ctx component];
   low     = [self->lowColor     stringValueInComponent:comp];