mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-21 10:51:23 +00:00
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added * GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m * GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names * GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces * GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names * GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings * GSWeb.framework/GSWSession.m: handle WO/GSWeb names * GSWeb.framework/GSWRequest.m: handle WO/GSWeb names * GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names, added tag counts to help errors hunt * GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces * GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names * GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names * GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names * GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names * GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names * GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names * GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names * GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names * GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names * GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names * GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names * GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names * GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names * GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names * GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names * GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names * GSWeb.framework/GSWText.m: handle WO/GSWeb names * GSWeb.framework/GSWTextField.m: handle WO/GSWeb names * GSWeb.framework/GSWDeployedBundle.m: warnings * GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h * GSWeb.framework/GSWAdaptor.m: traces * GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces * GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names * GSWeb.framework/NSNonBlockingFileHandle.m: added traces * GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names * GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names added tag count to help errors hunt remove "Tag gsweb invalid" message handle unicode strings in node content traces remove html and body tags if they are not present in the template * GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag * GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead of deallocating 2 times sessionTimeOuts * GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html: tag mismatch, Encode french characters * GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html: tag mismatch * GSWHTMLBareString.m: handle unicode strings in description * GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html: Encode french characters, Tag Mismatch * GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html: Encode french characters * GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html: Encode french characters * GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html: Tag Mismatch * GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd: added convertHTMLEntities for strings * GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars * GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6e70b408e8
commit
bd47f4ea4a
87 changed files with 2333 additions and 1909 deletions
72
ChangeLog
72
ChangeLog
|
@ -1,3 +1,75 @@
|
|||
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
|
||||
* GSWeb.framework/GSWWOCompatibility.h/.m: added
|
||||
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
|
||||
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
|
||||
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
|
||||
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
|
||||
added tag counts to help errors hunt
|
||||
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
|
||||
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWDeployedBundle.m: warnings
|
||||
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
|
||||
* GSWeb.framework/GSWAdaptor.m: traces
|
||||
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
|
||||
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
|
||||
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
|
||||
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
|
||||
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
|
||||
added tag count to help errors hunt
|
||||
remove "Tag gsweb invalid" message
|
||||
handle unicode strings in node content traces
|
||||
remove html and body tags if they are not present in the template
|
||||
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
|
||||
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
|
||||
of deallocating 2 times sessionTimeOuts
|
||||
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
|
||||
tag mismatch, Encode french characters
|
||||
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
|
||||
tag mismatch
|
||||
* GSWHTMLBareString.m: handle unicode strings in description
|
||||
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
|
||||
Encode french characters, Tag Mismatch
|
||||
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
|
||||
Encode french characters
|
||||
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
|
||||
Encode french characters
|
||||
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
|
||||
Tag Mismatch
|
||||
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
|
||||
added convertHTMLEntities for strings
|
||||
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
|
||||
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
|
||||
|
||||
2001-02-23 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||
|
||||
* GSWeb.framework/GSWApplication.m ([GSWApplication -dealloc]): reset
|
||||
|
|
|
@ -121,7 +121,7 @@ static void* GSWeb_CreateConfig(pool* p_pPool,
|
|||
GSWeb_Config *pConfig = (GSWeb_Config*)ap_palloc(p_pPool,sizeof(GSWeb_Config));
|
||||
pConfig->pszGSWeb = g_szGSWeb_Prefix;
|
||||
GSWLog(GSW_DEBUG,p_pServerRec,"GSWeb_CreateConfig: pConfig->pszGSWeb=%s",
|
||||
pConfig->pszGSWeb);
|
||||
pConfig->pszGSWeb);
|
||||
pConfig->pszConfigPath = NULL;
|
||||
// pConfig->pszRoot = NULL;
|
||||
return pConfig;
|
||||
|
|
|
@ -247,14 +247,25 @@ GSWHTTPResponse* GSWAppRequest_HandleRequest(GSWHTTPRequest** p_ppHTTPRequest,
|
|||
CONST char* pszCookie=GSWHTTPRequest_HeaderForKey(*p_ppHTTPRequest,g_szHeader_Cookie);
|
||||
if (pszCookie)
|
||||
{
|
||||
CONST char* pszInstanceCookie=strstr(pszCookie, g_szGSWeb_InstanceCookie);
|
||||
CONST char* pszInstanceCookie=strstr(pszCookie, g_szGSWeb_InstanceCookie[GSWNAMES_INDEX]);
|
||||
if (pszInstanceCookie)
|
||||
{
|
||||
stAppRequest.iInstance = atoi(pszInstanceCookie + strlen(g_szGSWeb_InstanceCookie[GSWNAMES_INDEX]));
|
||||
GSWLog(GSW_INFO,p_pLogServerData,"Cookie instance %d from %s",
|
||||
stAppRequest.iInstance,
|
||||
pszCookie);
|
||||
}
|
||||
else
|
||||
{
|
||||
pszInstanceCookie=strstr(pszCookie, g_szGSWeb_InstanceCookie[WONAMES_INDEX]);
|
||||
if (pszInstanceCookie)
|
||||
{
|
||||
stAppRequest.iInstance = atoi(pszInstanceCookie + strlen(g_szGSWeb_InstanceCookie));
|
||||
stAppRequest.iInstance = atoi(pszInstanceCookie + strlen(g_szGSWeb_InstanceCookie[WONAMES_INDEX]));
|
||||
GSWLog(GSW_INFO,p_pLogServerData,"Cookie instance %d from %s",
|
||||
stAppRequest.iInstance,
|
||||
pszCookie);
|
||||
stAppRequest.iInstance,
|
||||
pszCookie);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ const char* g_szGSWeb_AdaptorVersion=GSWEB_SERVER_ADAPTOR_VERSION_MAJOR_STRING "
|
|||
const char* g_szGSWeb_Prefix=GSWEB_PREFIX;
|
||||
const char* g_szGSWeb_Handler=GSWEB_HANDLER;
|
||||
const char* g_szGSWeb_StatusResponseAppName=GSWEB_STATUS_RESPONSE_APP_NAME;
|
||||
const char* g_szGSWeb_AppExtention=GSWAPP_EXTENSION;
|
||||
const char* g_szGSWeb_AppExtention[2]={ GSWAPP_EXTENSION_GSW, GSWAPP_EXTENSION_WO };
|
||||
|
||||
const char* g_szGSWeb_MimeType=GSWEB__MIME_TYPE;
|
||||
//const char* g_szGSWeb_Conf_DocRoot=GSWEB_CONF__DOC_ROOT;
|
||||
|
@ -74,7 +74,7 @@ const char* g_szGSWeb_Conf_AppRoot=GSWEB_CONF__APP_ROOT;
|
|||
const char* g_szGSWeb_Conf_Name=GSWEB_CONF__NAME;
|
||||
#endif
|
||||
|
||||
const char* g_szGSWeb_InstanceCookie=GSWEB_INSTANCE_COOKIE;
|
||||
const char* g_szGSWeb_InstanceCookie[2]={ GSWEB_INSTANCE_COOKIE_GSW, GSWEB_INSTANCE_COOKIE_WO };
|
||||
|
||||
const char* g_szGSWeb_Server=SERVER;
|
||||
const char* g_szGSWeb_ServerAndAdaptorVersion=SERVER "/" GSWEB_SERVER_ADAPTOR_VERSION_MAJOR_STRING "." GSWEB_SERVER_ADAPTOR_VERSION_MINOR_STRING;
|
||||
|
@ -82,13 +82,8 @@ const char* g_szGSWeb_ServerAndAdaptorVersion=SERVER "/" GSWEB_SERVER_ADAPTOR_VE
|
|||
|
||||
const char* const g_szGNUstep = "GNUstep";
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
const char* const g_szOKGSWeb = "OK Apple";
|
||||
const char* const g_szOKStatus = "HTTP/1.0 200 OK Apple GSWeb";
|
||||
#else
|
||||
const char* const g_szOKGSWeb = "OK GSWeb";
|
||||
const char* const g_szOKStatus = "HTTP/1.0 200 OK GNUstep GSWeb";
|
||||
#endif
|
||||
const char* const g_szOKGSWeb[2] = { "OK GSWeb", "OK Apple"};
|
||||
const char* const g_szOKStatus[2] = { "HTTP/1.0 200 OK GNUstep GSWeb", "HTTP/1.0 200 OK Apple GSWeb"};
|
||||
|
||||
#if defined(Apache)
|
||||
#define GSWServerVersion ap_get_server_version()
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
#include "GSWString.h"
|
||||
#include "GSWApp.h"
|
||||
|
||||
#define GSWNAMES_INDEX 0
|
||||
#define WONAMES_INDEX 1
|
||||
|
||||
|
||||
extern GSWLock g_lockAppList;
|
||||
extern GSWDict* g_pAppDict;
|
||||
extern time_t config_mtime;
|
||||
|
@ -46,7 +50,7 @@ extern const char* g_szGSWeb_Handler;
|
|||
extern const char* g_szGSWeb_StatusResponseAppName;
|
||||
|
||||
|
||||
extern const char* g_szGSWeb_AppExtention;
|
||||
extern const char* g_szGSWeb_AppExtention[2];
|
||||
|
||||
extern const char* g_szGSWeb_MimeType;
|
||||
//extern const char* g_szGSWeb_Conf_DocRoot;
|
||||
|
@ -65,15 +69,15 @@ extern const char* g_szGSWeb_Conf_Name;
|
|||
#endif
|
||||
|
||||
|
||||
extern const char* g_szGSWeb_InstanceCookie;
|
||||
extern const char* g_szGSWeb_InstanceCookie[2];
|
||||
|
||||
extern const char* g_szGSWeb_Server;
|
||||
extern const char* g_szGSWeb_ServerAndAdaptorVersion;
|
||||
|
||||
|
||||
extern const char* const g_szGNUstep;
|
||||
extern const char* const g_szOKGSWeb;
|
||||
extern const char* const g_szOKStatus;
|
||||
extern const char* const g_szOKGSWeb[2];
|
||||
extern const char* const g_szOKStatus[2];
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ GSWHTTPResponse* GSWHTTPResponse_BuildErrorResponse(GSWAppRequest* p_pAppRequest
|
|||
GSWLog(GSW_INFO,p_pLogServerData,"Build Error Response [%s] pApp=%p",p_pszMessage,pApp);
|
||||
#endif
|
||||
pHTTPResponse->uStatus = 200;
|
||||
pHTTPResponse->pszStatusMessage = strdup(g_szOKGSWeb);
|
||||
pHTTPResponse->pszStatusMessage = strdup(g_szOKGSWeb[GSWNAMES_INDEX]);
|
||||
pHTTPResponse->pHeaders = GSWDict_New(2);
|
||||
GSWDict_Add(pHTTPResponse->pHeaders,
|
||||
g_szHeader_ContentType,
|
||||
|
@ -145,7 +145,7 @@ GSWHTTPResponse* GSWHTTPResponse_BuildRedirectedResponse(CONST char* p_pszRedire
|
|||
GSWHTTPResponse* pHTTPResponse=calloc(1,sizeof(GSWHTTPResponse));
|
||||
GSWLog(GSW_DEBUG,p_pLogServerData,"Start GSWHTTPResponse_BuildRedirectedResponse");
|
||||
pHTTPResponse->uStatus = 302;
|
||||
pHTTPResponse->pszStatusMessage = strdup(g_szOKGSWeb);
|
||||
pHTTPResponse->pszStatusMessage = strdup(g_szOKGSWeb[GSWNAMES_INDEX]);
|
||||
pHTTPResponse->pHeaders=GSWDict_New(2);
|
||||
GSWDict_Add(pHTTPResponse->pHeaders, g_szHeader_ContentType, g_szContentType_TextHtml,FALSE);
|
||||
GSWDict_AddStringDup(pHTTPResponse->pHeaders,"location",p_pszRedirectPath);
|
||||
|
@ -343,7 +343,7 @@ void GSWHTTPResponse_AddHeaderToString(GSWDictElem* p_pElem,void* p_pData)
|
|||
//--------------------------------------------------------------------
|
||||
GSWHTTPResponse* GSWHTTPResponse_BuildStatusResponse(GSWHTTPRequest* p_pHTTPRequest,void* p_pLogServerData)
|
||||
{
|
||||
GSWHTTPResponse* pHTTPResponse=GSWHTTPResponse_New(g_szOKStatus,p_pLogServerData);
|
||||
GSWHTTPResponse* pHTTPResponse=GSWHTTPResponse_New(g_szOKStatus[GSWNAMES_INDEX],p_pLogServerData);
|
||||
GSWDict* pRequestHeaders=NULL;
|
||||
GSWString* pContent=GSWString_New();
|
||||
GSWString* pHeadersBuffer=GSWString_New();
|
||||
|
@ -404,7 +404,7 @@ GSWHTTPResponse* GSWDumpConfigFile(GSWURLComponents* p_pURLComponents,void* p_pL
|
|||
g_pszLocalHostName= strdup(szHostName);
|
||||
};
|
||||
|
||||
pHTTPResponse = GSWHTTPResponse_New(g_szOKStatus,p_pLogServerData);
|
||||
pHTTPResponse = GSWHTTPResponse_New(g_szOKStatus[GSWNAMES_INDEX],p_pLogServerData);
|
||||
GSWDict_AddString(pHTTPResponse->pHeaders,
|
||||
g_szHeader_ContentType,
|
||||
g_szContentType_TextHtml,
|
||||
|
|
|
@ -66,6 +66,7 @@ GSWURLError GSWParseURL(GSWURLComponents* p_pURLComponents,CONST char* p_pszURL,
|
|||
if (pszPrefix)
|
||||
{
|
||||
CONST char* pszAppExtension=NULL;
|
||||
CONST char* pszfoundExtension=NULL;
|
||||
pszStop=pszPrefix+strlen(g_szGSWeb_Prefix);
|
||||
pszNext=*pszStop ? pszStop+1 : pszStop; // Drop the trailing /
|
||||
pURLCPrefix->pszStart = pszPrefix;
|
||||
|
@ -76,7 +77,15 @@ GSWURLError GSWParseURL(GSWURLComponents* p_pURLComponents,CONST char* p_pszURL,
|
|||
|
||||
// Get Application Name
|
||||
pszStart=pszNext;
|
||||
pszAppExtension=strcasestr(pszStart,g_szGSWeb_AppExtention);
|
||||
pszAppExtension=strcasestr(pszStart,g_szGSWeb_AppExtention[GSWNAMES_INDEX]);
|
||||
if (pszAppExtension)
|
||||
pszfoundExtension=g_szGSWeb_AppExtention[GSWNAMES_INDEX];
|
||||
else
|
||||
{
|
||||
pszAppExtension=strcasestr(pszStart,g_szGSWeb_AppExtention[WONAMES_INDEX]);
|
||||
if (pszAppExtension)
|
||||
pszfoundExtension=g_szGSWeb_AppExtention[WONAMES_INDEX];
|
||||
};
|
||||
if (pszAppExtension)
|
||||
{
|
||||
if (pszQueryStringMark && pszQueryStringMark<=pszAppExtension)
|
||||
|
@ -88,7 +97,7 @@ GSWURLError GSWParseURL(GSWURLComponents* p_pURLComponents,CONST char* p_pszURL,
|
|||
else
|
||||
{
|
||||
pszStop=pszAppExtension;
|
||||
pszNext=pszStop+strlen(g_szGSWeb_AppExtention);
|
||||
pszNext=pszStop+strlen(pszfoundExtension);
|
||||
};
|
||||
}
|
||||
else
|
||||
|
@ -253,8 +262,8 @@ void GSWComposeURL(char* p_pszURL,GSWURLComponents* p_pURLComponents,void* p_pLo
|
|||
*p_pszURL++='/';
|
||||
strncpy(p_pszURL, pURLCAppName->pszStart, pURLCAppName->iLength);
|
||||
p_pszURL+= pURLCAppName->iLength;
|
||||
strcpy(p_pszURL,g_szGSWeb_AppExtention);
|
||||
p_pszURL+=strlen(g_szGSWeb_AppExtention);
|
||||
strcpy(p_pszURL,g_szGSWeb_AppExtention[GSWNAMES_INDEX]);
|
||||
p_pszURL+=strlen(g_szGSWeb_AppExtention[GSWNAMES_INDEX]);
|
||||
|
||||
if (pURLCAppNum->iLength>0)
|
||||
{
|
||||
|
@ -299,7 +308,7 @@ int GSWComposeURLLen(GSWURLComponents* p_pURLComponents,void* p_pLogServerData)
|
|||
|
||||
iLength+=pURLCPrefix->iLength;
|
||||
iLength+=1+pURLCAppName->iLength;
|
||||
iLength+=strlen(g_szGSWeb_AppExtention);
|
||||
iLength+=strlen(g_szGSWeb_AppExtention[GSWNAMES_INDEX]);
|
||||
if (pURLCAppNum->iLength>0)
|
||||
iLength+= 1+pURLCAppNum->iLength;
|
||||
if (pURLCReqHandlerKey->iLength>0)
|
||||
|
|
|
@ -48,14 +48,10 @@ extern "C" {
|
|||
#define GSWEB_PREFIX "/GSWeb"
|
||||
#define GSWEB_HANDLER "GSWeb"
|
||||
#endif
|
||||
|
||||
#define GSWEB_STATUS_RESPONSE_APP_NAME "status"
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
#define GSWAPP_EXTENSION ".woa"
|
||||
#else
|
||||
#define GSWAPP_EXTENSION ".gswa"
|
||||
#endif
|
||||
#define GSWAPP_EXTENSION_WO ".woa"
|
||||
#define GSWAPP_EXTENSION_GSW ".gswa"
|
||||
|
||||
// Time Outs ...
|
||||
#define APP_CONNECT_TIMEOUT 300
|
||||
|
@ -74,7 +70,6 @@ extern "C" {
|
|||
#else
|
||||
#define GSWEB__MIME_TYPE "application/x-httpd-gsweb"
|
||||
#endif
|
||||
|
||||
// Config File Keywords
|
||||
|
||||
// All
|
||||
|
@ -94,11 +89,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
#define GSWEB_INSTANCE_COOKIE "woinst="
|
||||
#else
|
||||
#define GSWEB_INSTANCE_COOKIE "gswinst="
|
||||
#endif
|
||||
#define GSWEB_INSTANCE_COOKIE_WO "woinst="
|
||||
#define GSWEB_INSTANCE_COOKIE_GSW "gswinst="
|
||||
|
||||
/*
|
||||
* operating specific things regarding gethostbyname()
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<gsweb name="ExclamationImage"></gsweb><br>
|
||||
Ré-entrer<br>
|
||||
Ré-entrer<br>
|
||||
<gsweb name="ReenterHyperlink">
|
||||
<b><gsweb name="ApplicationNameString"></gsweb></b>
|
||||
</gsweb>
|
||||
|
@ -70,8 +70,8 @@
|
|||
</td>
|
||||
</tr>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
</table>
|
||||
</table>
|
||||
</gsweb>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
<tr>
|
||||
<td align="CENTER" Valign="TOP">
|
||||
<gsweb name="ExclamationImage"></gsweb><br>
|
||||
Ré-entrer<br>
|
||||
Ré-entrer<br>
|
||||
<gsweb name="ReenterHyperlink">
|
||||
<b><gsweb name="ApplicationNameString"></gsweb></b>
|
||||
</gsweb>
|
||||
</td>
|
||||
<td align="LEFT" Valign="MIDDLE">
|
||||
<b> Vous etes retourné trop loin.<br></b>
|
||||
<b> Vous etes retourné trop loin.<br></b>
|
||||
La limite de
|
||||
<gsweb name="BacktrackingLimitString"></gsweb>
|
||||
a été dépassée.<br>
|
||||
a été dépassée.<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Erreur de création de session</title>
|
||||
<title>Erreur de création de session</title>
|
||||
</head>
|
||||
<body BGcolor="white">
|
||||
|
||||
|
@ -8,13 +8,13 @@
|
|||
<tr>
|
||||
<td align="CENTER" Valign="TOP">
|
||||
<gsweb name="ExclamationImage"></gsweb><br>
|
||||
Ré-entrer<br>
|
||||
Ré-entrer<br>
|
||||
<gsweb name="ReenterHyperlink">
|
||||
<b><gsweb name="ApplicationNameString"></gsweb></b>
|
||||
</gsweb>
|
||||
</td>
|
||||
<td align="LEFT" Valign="MIDDLE">
|
||||
<b>Votre session n'a pu etre crée.<b>
|
||||
<b>Votre session n'a pu etre crée.<b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
<tr>
|
||||
<td align="CENTER" Valign="TOP">
|
||||
<gsweb name="ExclamationImage"></gsweb><br>
|
||||
Ré-entrer<br>
|
||||
Ré-entrer<br>
|
||||
<gsweb name="ReenterHyperlink">
|
||||
<b><gsweb name="ApplicationNameString"></gsweb></b>
|
||||
</gsweb>
|
||||
</td>
|
||||
<td align="LEFT" Valign="MIDDLE">
|
||||
<b>Votre session a expiré.<b>
|
||||
<b>Votre session a expiré.</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -37,7 +37,8 @@ FRAMEWORK_NAME = GSWExtensions
|
|||
|
||||
# The framework resource files and directories
|
||||
GSWExtensions_RESOURCE_FILES = \
|
||||
Resources/Info-gnustep.plist
|
||||
Resources/Info-gnustep.plist \
|
||||
GSWSessionRestorationErrorPage.gswd
|
||||
|
||||
GSWExtensions_COMPONENTS = \
|
||||
GSWSessionCreationErrorPage.gswc \
|
||||
|
|
|
@ -34,6 +34,7 @@ ReasonString: GSWString
|
|||
{
|
||||
value = tmpReason;
|
||||
escapeHTML = YES;
|
||||
convertHTMLEntities = YES;
|
||||
}
|
||||
|
||||
ReenterHyperlink: GSWHyperlink
|
||||
|
@ -70,4 +71,5 @@ UserInfoValueString: GSWString
|
|||
{
|
||||
value = tmpUserInfoValue;
|
||||
escapeHTML = YES;
|
||||
convertHTMLEntities = YES;
|
||||
}
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
</td>
|
||||
</tr>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
</table>
|
||||
</table>
|
||||
</gsweb>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,17 +1 @@
|
|||
ExclamationImage: GSWImage
|
||||
{
|
||||
filename = "exclamation.gif";
|
||||
framework = "GSWExtensions";
|
||||
border = 0;
|
||||
}
|
||||
|
||||
ApplicationNameString: GSWString
|
||||
{
|
||||
value = application.name;
|
||||
}
|
||||
|
||||
ReenterHyperlink: GSWHyperlink
|
||||
{
|
||||
pageName = "Main";
|
||||
target = "_top";
|
||||
}
|
||||
#include "GSWSessionRestorationErrorPage"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</gsweb>
|
||||
</td>
|
||||
<td align="LEFT" Valign="MIDDLE">
|
||||
<b>Your session has timed out.<b>
|
||||
<b>Your session has timed out.</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -178,6 +178,7 @@ GSWGeometricRegion.m \
|
|||
GSWFileUpload.m \
|
||||
GSWResourceURL.m \
|
||||
GSWProcFS.m \
|
||||
GSWWOCompatibility.m \
|
||||
stacktrace.m \
|
||||
attach.m
|
||||
|
||||
|
@ -294,7 +295,8 @@ GSWUtils.h \
|
|||
GSWGeometricRegion.h \
|
||||
GSWFileUpload.h \
|
||||
GSWResourceURL.h \
|
||||
GSWProcFS.h
|
||||
GSWProcFS.h \
|
||||
GSWWOCompatibility.h
|
||||
|
||||
|
||||
SRCS = $(LIBRARY_NAME:=.m)
|
||||
|
|
|
@ -30,10 +30,11 @@
|
|||
@interface GSWActiveImage: GSWInput
|
||||
{
|
||||
GSWAssociation* imageMapFileName;
|
||||
#if !GSWEB_STRICT
|
||||
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* imageMapString;
|
||||
GSWAssociation* imageMapRegions;
|
||||
#endif
|
||||
// }
|
||||
GSWAssociation* action;
|
||||
GSWAssociation* href;
|
||||
GSWAssociation* src;
|
||||
|
|
|
@ -39,10 +39,11 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLog(@"name_=%@ associations_:%@ elements_=%@",name_,associations_,elements_);
|
||||
_associations=[NSMutableDictionary dictionaryWithDictionary:associations_];
|
||||
[_associations removeObjectForKey:imageMapFileName__Key];
|
||||
#if !GSWEB_STRICT
|
||||
[_associations removeObjectForKey:imageMapString__Key];
|
||||
[_associations removeObjectForKey:imageMapRegions__Key];
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[_associations removeObjectForKey:imageMapString__Key];
|
||||
[_associations removeObjectForKey:imageMapRegions__Key];
|
||||
};
|
||||
[_associations removeObjectForKey:action__Key];
|
||||
[_associations removeObjectForKey:href__Key];
|
||||
[_associations removeObjectForKey:src__Key];
|
||||
|
@ -65,24 +66,25 @@ static char rcsId[] = "$Id$";
|
|||
if (imageMapFileName)
|
||||
_imageMapDefNb++;
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
imageMapString = [[associations_ objectForKey:imageMapString__Key
|
||||
withDefaultObject:[imageMapString autorelease]] retain];
|
||||
if (imageMapString)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
imageMapString = [[associations_ objectForKey:imageMapString__Key
|
||||
withDefaultObject:[imageMapString autorelease]] retain];
|
||||
if (imageMapString)
|
||||
_imageMapDefNb++;
|
||||
|
||||
imageMapRegions = [[associations_ objectForKey:imageMapRegions__Key
|
||||
withDefaultObject:[imageMapRegions autorelease]] retain];
|
||||
if (imageMapRegions)
|
||||
|
||||
imageMapRegions = [[associations_ objectForKey:imageMapRegions__Key
|
||||
withDefaultObject:[imageMapRegions autorelease]] retain];
|
||||
if (imageMapRegions)
|
||||
_imageMapDefNb++;
|
||||
if (_imageMapDefNb>0)
|
||||
if (_imageMapDefNb>0)
|
||||
{
|
||||
ExceptionRaise(@"GSWActiveImage",@"you can't specify %@, %@ and %@",
|
||||
imageMapFileName__Key,
|
||||
imageMapString__Key,
|
||||
imageMapRegions__Key);
|
||||
imageMapFileName__Key,
|
||||
imageMapString__Key,
|
||||
imageMapRegions__Key);
|
||||
};
|
||||
#endif
|
||||
};
|
||||
action = [[associations_ objectForKey:action__Key
|
||||
withDefaultObject:[action autorelease]] retain];
|
||||
|
||||
|
@ -135,10 +137,8 @@ static char rcsId[] = "$Id$";
|
|||
-(void)dealloc
|
||||
{
|
||||
DESTROY(imageMapFileName);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(imageMapString);
|
||||
DESTROY(imageMapRegions);
|
||||
#endif
|
||||
DESTROY(action);
|
||||
DESTROY(href);
|
||||
DESTROY(src);
|
||||
|
@ -259,7 +259,7 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLog(@"_elementID=%@",_elementID);
|
||||
if ([_elementID isEqualToString:_senderID])
|
||||
{
|
||||
id _param=[request_ formValueForKey:GSWKey_IsmapCoords];
|
||||
id _param=[request_ formValueForKey:GSWKey_IsmapCoords[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"_param=%@",_param);
|
||||
if (_param)
|
||||
{
|
||||
|
@ -300,17 +300,15 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
};
|
||||
}
|
||||
#if !GSWEB_STRICT
|
||||
else if (imageMapString)
|
||||
else if (!WOStrictFlag && imageMapString)
|
||||
{
|
||||
id _imageMapValue=[imageMapString valueInComponent:_component];
|
||||
_regions=[GSWGeometricRegion geometricRegionsWithString:_imageMapValue];
|
||||
}
|
||||
else if (imageMapRegions)
|
||||
else if (!WOStrictFlag && imageMapRegions)
|
||||
{
|
||||
_regions=[imageMapRegions valueInComponent:_component];
|
||||
};
|
||||
#endif
|
||||
if (xAssoc)
|
||||
[xAssoc setValue:[NSNumber numberWithInt:_x]
|
||||
inComponent:_component];
|
||||
|
|
|
@ -35,7 +35,9 @@ static char rcsId[] = "$Id$";
|
|||
-(id)initWithName:(NSString*)name_
|
||||
arguments:(NSDictionary*)arguments_
|
||||
{
|
||||
NSDebugMLog(@"Init");
|
||||
self=[super init];
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,10 +27,18 @@
|
|||
#define _GSWApplication_h__
|
||||
|
||||
extern void GSWApplicationSetDebugSetOption(NSString* opt_);
|
||||
extern int WOApplicationMain(NSString* applicationClassName,
|
||||
int argc,
|
||||
const char *argv[]);
|
||||
extern int GSWApplicationMain(NSString* applicationClassName,
|
||||
int argc,
|
||||
const char *argv[]);
|
||||
extern NSString* globalApplicationClassName;
|
||||
extern int GSWebNamingConv;//GSWNAMES_INDEX or WONAMES_INDEX
|
||||
#define GSWebNamingConvInversed (GSWebNamingConv==GSWNAMES_INDEX ? WONAMES_INDEX : GSWNAMES_INDEX)
|
||||
#define GSWebNamingConvForRound(r) ((r)==0 ? GSWebNamingConv : (GSWebNamingConv==GSWNAMES_INDEX ? WONAMES_INDEX : GSWNAMES_INDEX))
|
||||
|
||||
extern BOOL WOStrictFlag;
|
||||
//====================================================================
|
||||
@interface GSWApplication : NSObject <NSLocking>
|
||||
{
|
||||
|
@ -514,6 +522,7 @@ extern NSString* globalApplicationClassName;
|
|||
+(void)setResourceRequestHandlerKey:(NSString*)key_;
|
||||
+(void)setSessionTimeOut:(id)timeOut_;
|
||||
+(id)sessionTimeOut;
|
||||
+(NSTimeInterval)sessionTimeOutValue;
|
||||
+(NSString*)debugSetConfigFilePath;//NDFN
|
||||
+(void)setDebugSetConfigFilePath:(NSString*)debugSetConfigFilePath_;//NDFN
|
||||
@end
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -216,13 +216,10 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
if (keyPath_)
|
||||
{
|
||||
if ([keyPath_ hasPrefix:@"^"]
|
||||
#if !GSWEB_STRICT
|
||||
|| [keyPath_ hasPrefix:@"~"]
|
||||
#endif
|
||||
)
|
||||
return [[[GSWBindingNameAssociation alloc]initWithKeyPath:keyPath_] autorelease];
|
||||
|| (!WOStrictFlag && [keyPath_ hasPrefix:@"~"]))
|
||||
return [[[GSWBindingNameAssociation alloc]initWithKeyPath:keyPath_] autorelease];
|
||||
else
|
||||
return [[[GSWKeyValueAssociation alloc]initWithKeyPath:keyPath_] autorelease];
|
||||
return [[[GSWKeyValueAssociation alloc]initWithKeyPath:keyPath_] autorelease];
|
||||
}
|
||||
else
|
||||
return nil;
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
{
|
||||
NSString* parentBindingName;
|
||||
NSString* keyPath;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
BOOL isNonMandatory;
|
||||
#endif
|
||||
// }
|
||||
};
|
||||
|
||||
-(id)initWithKeyPath:(NSString*)keyPath_;
|
||||
|
|
|
@ -40,19 +40,15 @@ static char rcsId[] = "$Id$";
|
|||
keys=[keyPath_ componentsSeparatedByString:@"."];
|
||||
if ([keys count]>0)
|
||||
{
|
||||
#if !GSWEB_STRICT
|
||||
if ([keyPath_ hasPrefix:@"^"])
|
||||
{
|
||||
#endif
|
||||
ASSIGNCOPY(parentBindingName,[[keys objectAtIndex:0] stringWithoutPrefix:@"^"]);
|
||||
#if !GSWEB_STRICT
|
||||
}
|
||||
else if ([keyPath_ hasPrefix:@"~"])
|
||||
{
|
||||
ASSIGNCOPY(parentBindingName,[[keys objectAtIndex:0] stringWithoutPrefix:@"~"]);
|
||||
isNonMandatory=YES;
|
||||
};
|
||||
#endif
|
||||
if (!WOStrictFlag && [keyPath_ hasPrefix:@"^"])
|
||||
{
|
||||
ASSIGNCOPY(parentBindingName,[[keys objectAtIndex:0] stringWithoutPrefix:@"^"]);
|
||||
}
|
||||
else if (!WOStrictFlag && [keyPath_ hasPrefix:@"~"])
|
||||
{
|
||||
ASSIGNCOPY(parentBindingName,[[keys objectAtIndex:0] stringWithoutPrefix:@"~"]);
|
||||
isNonMandatory=YES;
|
||||
};
|
||||
if ([keys count]>1)
|
||||
{
|
||||
ASSIGN(keyPath,[[keys subarrayWithRange:NSMakeRange(1,[keys count]-1)]componentsJoinedByString:@"."]);
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
GSWAssociation* item;
|
||||
GSWAssociation* displayString;
|
||||
GSWAssociation* selections;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* selectionValues;
|
||||
#endif
|
||||
// }
|
||||
GSWAssociation* selectedValues;
|
||||
GSWAssociation* size;
|
||||
GSWAssociation* multiple;
|
||||
|
|
|
@ -42,9 +42,8 @@ static char rcsId[] = "$Id$";
|
|||
[_associations removeObjectForKey:item__Key];
|
||||
[_associations removeObjectForKey:displayString__Key];
|
||||
[_associations removeObjectForKey:selections__Key];
|
||||
#if !GSWEB_STRICT
|
||||
[_associations removeObjectForKey:selectionValues__Key];
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
[_associations removeObjectForKey:selectionValues__Key];
|
||||
[_associations removeObjectForKey:selectedValues__Key];
|
||||
[_associations removeObjectForKey:size__Key];
|
||||
[_associations removeObjectForKey:multiple__Key];
|
||||
|
@ -67,14 +66,15 @@ static char rcsId[] = "$Id$";
|
|||
//TODO
|
||||
};
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
selectionValues=[[associations_ objectForKey:selectionValue__Key
|
||||
withDefaultObject:[selectionValues autorelease]] retain];
|
||||
if (selectionValues && ![selectionValues isValueSettable])
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
//TODO
|
||||
selectionValues=[[associations_ objectForKey:selectionValue__Key
|
||||
withDefaultObject:[selectionValues autorelease]] retain];
|
||||
if (selectionValues && ![selectionValues isValueSettable])
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
selectedValues=[[associations_ objectForKey:selectedValues__Key
|
||||
withDefaultObject:[selectedValues autorelease]] retain];
|
||||
|
@ -96,9 +96,7 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(item);
|
||||
DESTROY(displayString);
|
||||
DESTROY(selections);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(selectionValues);
|
||||
#endif
|
||||
DESTROY(selectedValues);
|
||||
DESTROY(size);
|
||||
DESTROY(multiple);
|
||||
|
@ -401,39 +399,43 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"_found=%s",(_found ? "YES" : "NO"));
|
||||
if (selections)
|
||||
{
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[selections setValue:_foundValues
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
{
|
||||
[selections setValue:_foundValues
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[selections setValue:_foundValues
|
||||
inComponent:_component];
|
||||
#endif
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
if (selectionValues)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
if (selectionValues)
|
||||
{
|
||||
[selectionValues setValue:_foundValues
|
||||
inComponent:_component];
|
||||
NS_DURING
|
||||
{
|
||||
[selectionValues setValue:_foundValues
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWPopUpButton");
|
||||
|
|
|
@ -255,12 +255,16 @@ objectForReference:(NSString*)keyPath
|
|||
id _resource=nil;
|
||||
NSString* _path=nil;
|
||||
NSFileManager* _fileManager=nil;
|
||||
int _languagesNb=[languages_ count];
|
||||
int _languagesNb=nil;
|
||||
BOOL _exists=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"type=%@",type_);
|
||||
_languagesNb=[languages_ count];
|
||||
|
||||
_fileManager=[NSFileManager defaultManager];
|
||||
|
||||
_fileName=[NSString stringWithFormat:@"%@.%@",name_,type_];
|
||||
NSDebugMLog(@"fileName=%@",_fileName);
|
||||
for(_languageIndex=0;!_resource && !_path && _languageIndex<=_languagesNb;_languageIndex++)
|
||||
{
|
||||
_language=nil;
|
||||
|
@ -298,6 +302,7 @@ objectForReference:(NSString*)keyPath
|
|||
*relativePath_=_relativePath;
|
||||
if (absolutePath_)
|
||||
*absolutePath_=_absolutePath;
|
||||
LOGObjectFnStop();
|
||||
return _resource;
|
||||
};
|
||||
@end
|
||||
|
@ -337,26 +342,25 @@ objectForReference:(NSString*)keyPath
|
|||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
#if !GSWEB_STRICT
|
||||
{
|
||||
NSDictionary* _userDictionary=[archive_ objectForKey:@"userDictionary"];
|
||||
NSDictionary* _userAssociations=[archive_ objectForKey:@"userAssociations"];
|
||||
NSDictionary* _defaultAssociations=[archive_ objectForKey:@"defaultAssociations"];
|
||||
NSDebugMLLog(@"bundles",@"_userDictionary:%@",_userDictionary);
|
||||
NSDebugMLLog(@"bundles",@"_userAssociations:%@",_userAssociations);
|
||||
NSDebugMLLog(@"bundles",@"_defaultAssociations:%@",_defaultAssociations);
|
||||
_userAssociations=[_userAssociations dictionaryByReplacingStringsWithAssociations];
|
||||
NSDebugMLLog(@"bundles",@"_userAssociations:%@",_userAssociations);
|
||||
_defaultAssociations=[_defaultAssociations dictionaryByReplacingStringsWithAssociations];
|
||||
NSDebugMLLog(@"bundles",@"_defaultAssociations:%@",_defaultAssociations);
|
||||
if (_userDictionary && [object_ respondsToSelector:@selector(setUserDictionary:)])
|
||||
[object_ setUserDictionary:_userDictionary];
|
||||
if (_userAssociations && [object_ respondsToSelector:@selector(setUserAssociations:)])
|
||||
[object_ setUserAssociations:_userAssociations];
|
||||
if (_defaultAssociations && [object_ respondsToSelector:@selector(setDefaultAssociations:)])
|
||||
[object_ setDefaultAssociations:_defaultAssociations];
|
||||
};
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NSDictionary* _userDictionary=[archive_ objectForKey:@"userDictionary"];
|
||||
NSDictionary* _userAssociations=[archive_ objectForKey:@"userAssociations"];
|
||||
NSDictionary* _defaultAssociations=[archive_ objectForKey:@"defaultAssociations"];
|
||||
NSDebugMLLog(@"bundles",@"_userDictionary:%@",_userDictionary);
|
||||
NSDebugMLLog(@"bundles",@"_userAssociations:%@",_userAssociations);
|
||||
NSDebugMLLog(@"bundles",@"_defaultAssociations:%@",_defaultAssociations);
|
||||
_userAssociations=[_userAssociations dictionaryByReplacingStringsWithAssociations];
|
||||
NSDebugMLLog(@"bundles",@"_userAssociations:%@",_userAssociations);
|
||||
_defaultAssociations=[_defaultAssociations dictionaryByReplacingStringsWithAssociations];
|
||||
NSDebugMLLog(@"bundles",@"_defaultAssociations:%@",_defaultAssociations);
|
||||
if (_userDictionary && [object_ respondsToSelector:@selector(setUserDictionary:)])
|
||||
[object_ setUserDictionary:_userDictionary];
|
||||
if (_userAssociations && [object_ respondsToSelector:@selector(setUserAssociations:)])
|
||||
[object_ setUserAssociations:_userAssociations];
|
||||
if (_defaultAssociations && [object_ respondsToSelector:@selector(setDefaultAssociations:)])
|
||||
[object_ setDefaultAssociations:_defaultAssociations];
|
||||
};
|
||||
#if GDL2 // GDL2 implementation
|
||||
{
|
||||
EOKeyValueUnarchiver* unarchiver=nil;
|
||||
|
@ -456,11 +460,18 @@ objectForReference:(NSString*)keyPath
|
|||
NSString* _path=nil;
|
||||
id _script=nil;
|
||||
_script=[self lockedResourceNamed:name_
|
||||
ofType:GSWScriptSuffix
|
||||
ofType:GSWScriptSuffix[GSWebNamingConv]
|
||||
withLanguages:nil
|
||||
usingCache:classCache
|
||||
relativePath:NULL
|
||||
absolutePath:&_path];
|
||||
if (!_script && !_path)
|
||||
_script=[self lockedResourceNamed:name_
|
||||
ofType:GSWScriptSuffix[GSWebNamingConvInversed]
|
||||
withLanguages:nil
|
||||
usingCache:classCache
|
||||
relativePath:NULL
|
||||
absolutePath:&_path];
|
||||
return _path;
|
||||
};
|
||||
|
||||
|
@ -546,11 +557,25 @@ objectForReference:(NSString*)keyPath
|
|||
{
|
||||
NSString* _absoluteDefinitionPath=nil;
|
||||
_pageDefString=[self lockedResourceNamed:name_
|
||||
ofType:GSWComponentDefinitionSuffix
|
||||
ofType:GSWComponentDefinitionSuffix[GSWebNamingConv]
|
||||
withLanguages:languages_
|
||||
usingCache:nil
|
||||
relativePath:NULL
|
||||
absolutePath:&_absoluteDefinitionPath];
|
||||
NSDebugMLLog(@"bundles",@"_absoluteDefinitionPath=%@",
|
||||
_absoluteDefinitionPath);
|
||||
if (!_pageDefString && !_absoluteDefinitionPath)
|
||||
{
|
||||
_pageDefString=[self lockedResourceNamed:name_
|
||||
ofType:GSWComponentDefinitionSuffix[GSWebNamingConvInversed]
|
||||
withLanguages:languages_
|
||||
usingCache:nil
|
||||
relativePath:NULL
|
||||
absolutePath:&_absoluteDefinitionPath];
|
||||
NSDebugMLLog(@"bundles",@"_absoluteDefinitionPath=%@",
|
||||
_absoluteDefinitionPath);
|
||||
};
|
||||
|
||||
if (_absoluteDefinitionPath)
|
||||
{
|
||||
//TODO use encoding !
|
||||
|
@ -794,12 +819,11 @@ objectForReference:(NSString*)keyPath
|
|||
else
|
||||
{
|
||||
NSString* _completePath=[path stringByAppendingString:_baseURL];
|
||||
_url=(NSString*)[request_ _urlWithRequestHandlerKey:GSWResourceRequestHandlerKey
|
||||
path:nil
|
||||
queryString:[NSString stringWithFormat:@"%@=%@",
|
||||
GSWKey_Data,
|
||||
_completePath]];//TODO Escape
|
||||
|
||||
_url=(NSString*)[request_ _urlWithRequestHandlerKey:GSWResourceRequestHandlerKey[GSWebNamingConv]
|
||||
path:nil
|
||||
queryString:[NSString stringWithFormat:@"%@=%@",
|
||||
GSWKey_Data[GSWebNamingConv],
|
||||
_completePath]];//TODO Escape
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -941,11 +965,20 @@ objectForReference:(NSString*)keyPath
|
|||
BOOL _isCachingEnabled=NO;
|
||||
LOGObjectFnStart();
|
||||
_archive=[self lockedResourceNamed:name_
|
||||
ofType:GSWArchiveSuffix
|
||||
ofType:GSWArchiveSuffix[GSWebNamingConv]
|
||||
withLanguages:nil
|
||||
usingCache:archiveCache
|
||||
relativePath:&_relativePath
|
||||
absolutePath:&_absolutePath];
|
||||
if (!_archive && !_absolutePath)
|
||||
{
|
||||
_archive=[self lockedResourceNamed:name_
|
||||
ofType:GSWArchiveSuffix[GSWebNamingConvInversed]
|
||||
withLanguages:nil
|
||||
usingCache:archiveCache
|
||||
relativePath:&_relativePath
|
||||
absolutePath:&_absolutePath];
|
||||
};
|
||||
if (!_archive)
|
||||
{
|
||||
if (_absolutePath)
|
||||
|
|
|
@ -162,44 +162,50 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
//TODOV
|
||||
id _valueValue=[value valueInComponent:_component];
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[selection setValue:_valueValue
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[selection setValue:_valueValue
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
{
|
||||
[selection setValue:_valueValue
|
||||
inComponent:_component];
|
||||
};
|
||||
};
|
||||
};
|
||||
if (checked)
|
||||
{
|
||||
id _checkedValue=[NSNumber numberWithBool:_checkChecked];
|
||||
NSDebugMLLog(@"gswdync",@"_checkedValue=%@",_checkedValue);
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[checked setValue:_checkedValue
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[checked setValue:_checkedValue
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
{
|
||||
[checked setValue:_checkedValue
|
||||
inComponent:_component];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -223,22 +223,25 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"_selections=%d",_selections);
|
||||
NSDebugMLLog(@"gswdync",@"selections=%@",selections);
|
||||
GSWLogAssertGood(_component);
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
{
|
||||
[selections setValue:_selections
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[selections setValue:_selections
|
||||
inComponent:_component];
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[selections setValue:_selections
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
{
|
||||
[selections setValue:_selections
|
||||
inComponent:_component];
|
||||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWCheckBoxList");
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
GSWElement* childTemplate;
|
||||
GSWContext* context;
|
||||
GSWSession* session;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
NSDictionary* userDictionary;
|
||||
NSDictionary* userAssociations;
|
||||
NSDictionary* defaultAssociations;
|
||||
NSMutableDictionary* validationFailureMessages;
|
||||
#endif
|
||||
// }
|
||||
BOOL isPage;
|
||||
BOOL isCachingEnabled;
|
||||
BOOL isSynchronized;
|
||||
|
|
|
@ -80,7 +80,6 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(associations);
|
||||
GSWLogC("Dealloc GSWComponent: childTemplate");
|
||||
DESTROY(childTemplate);
|
||||
#if !GSWEB_STRICT
|
||||
GSWLogC("Dealloc GSWComponent: userDictionary");
|
||||
DESTROY(userDictionary);
|
||||
GSWLogC("Dealloc GSWComponent: userAssociations");
|
||||
|
@ -89,7 +88,6 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(defaultAssociations);
|
||||
GSWLogC("Dealloc GSWComponent: validationFailureMessages");
|
||||
DESTROY(validationFailureMessages);
|
||||
#endif
|
||||
GSWLogC("Dealloc GSWComponent: context (set to nil)");
|
||||
context=nil;
|
||||
GSWLogC("Dealloc GSWComponent: session (set to nil)");
|
||||
|
@ -231,7 +229,7 @@ static char rcsId[] = "$Id$";
|
|||
//TODOV
|
||||
NSBundle* bundle=[NSBundle mainBundle];
|
||||
return [bundle pathForResource:name
|
||||
ofType:GSWPageSuffix];
|
||||
ofType:GSWPageSuffix[GSWebNamingConv]];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -302,7 +300,7 @@ static char rcsId[] = "$Id$";
|
|||
return _dscr;
|
||||
};
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
// GSWeb Additions {
|
||||
-(NSDictionary*)userDictionary
|
||||
{
|
||||
return userDictionary;
|
||||
|
@ -335,7 +333,7 @@ static char rcsId[] = "$Id$";
|
|||
ASSIGN(defaultAssociations,defaultAssociations_);
|
||||
NSDebugMLLog(@"gswcomponents",@"defaultAssociations:%@",defaultAssociations);
|
||||
};
|
||||
#endif
|
||||
// }
|
||||
|
||||
@end
|
||||
|
||||
|
@ -778,12 +776,10 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
if (_index!=NSNotFound)
|
||||
_assoc=[associations objectAtIndex:_index];
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
if (_index==NSNotFound)
|
||||
if (!WOStrictFlag && _index==NSNotFound)
|
||||
{
|
||||
_assoc=[defaultAssociations objectForKey:_name];
|
||||
};
|
||||
#endif
|
||||
NSDebugMLLog(@"gswcomponents",@"_assoc=%@",_assoc);
|
||||
LOGObjectFnStop();
|
||||
return _assoc;
|
||||
|
@ -808,12 +804,10 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
_hasBinding=(_index!=NSNotFound);
|
||||
};
|
||||
NSDebugMLLog(@"gswcomponents",@"hasBinding=%s",(_hasBinding ? "YES" : "NO"));
|
||||
#if !GSWEB_STRICT
|
||||
if (!_hasBinding)
|
||||
if (!WOStrictFlag && !_hasBinding)
|
||||
{
|
||||
_hasBinding=([defaultAssociations objectForKey:parentBindingName_]!=nil);
|
||||
};
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
return _hasBinding;
|
||||
};
|
||||
|
@ -1040,9 +1034,7 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
LOGObjectFnStart();
|
||||
GSWAssertCorrectElementID(context_);// Debug Only
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
[validationFailureMessages removeAllObjects];
|
||||
#endif
|
||||
_oldValidateFlag=[context_ isValidate];
|
||||
[context_ setValidate:YES];
|
||||
NSDebugMLLog(@"gswcomponents",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
|
@ -1063,8 +1055,8 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
|
||||
//GSWeb Additions {
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setValidationFailureMessage:(NSString*)message
|
||||
forElement:(GSWDynamicElement*)element_
|
||||
|
@ -1125,7 +1117,7 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
return _msgs;
|
||||
};
|
||||
|
||||
#endif
|
||||
// }
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)ensureAwakeInContext:(GSWContext*)context_
|
||||
|
|
|
@ -389,23 +389,24 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
BOOL _createClassesOk=NO;
|
||||
NSString* _superClassName=nil;
|
||||
#if !GSWEB_STRICT
|
||||
NSDictionary* _archive=[bundle archiveNamed:name];
|
||||
NSDebugMLLog(@"gswcomponents",@"_archive=%@",_archive);
|
||||
_superClassName=[_archive objectForKey:@"superClassName"];
|
||||
NSDebugMLLog(@"gswcomponents",@"_superClassName=%@",_superClassName);
|
||||
if (_superClassName)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NSDictionary* _archive=[bundle archiveNamed:name];
|
||||
NSDebugMLLog(@"gswcomponents",@"_archive=%@",_archive);
|
||||
_superClassName=[_archive objectForKey:@"superClassName"];
|
||||
NSDebugMLLog(@"gswcomponents",@"_superClassName=%@",_superClassName);
|
||||
if (_superClassName)
|
||||
{
|
||||
if (!NSClassFromString(_superClassName))
|
||||
{
|
||||
ExceptionRaise(NSGenericException,@"Superclass %@ of component %@ doesn't exist",
|
||||
_superClassName,
|
||||
name);
|
||||
};
|
||||
{
|
||||
ExceptionRaise(NSGenericException,@"Superclass %@ of component %@ doesn't exist",
|
||||
_superClassName,
|
||||
name);
|
||||
};
|
||||
};
|
||||
if (!_superClassName)
|
||||
#endif
|
||||
_superClassName=@"GSWComponent";
|
||||
};
|
||||
if (!_superClassName)
|
||||
_superClassName=@"GSWComponent";
|
||||
NSDebugMLLog(@"gswcomponents",@"_superClassName=%@",_superClassName);
|
||||
_createClassesOk=[GSWApplication createUnknownComponentClasses:[NSArray arrayWithObject:name]
|
||||
superClassName:_superClassName];
|
||||
|
|
|
@ -89,7 +89,7 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"requests",@"_statisticsStore=%@",_statisticsStore);
|
||||
[_statisticsStore _applicationWillHandleComponentActionRequest];
|
||||
_context=[GSWContext contextWithRequest:request_];
|
||||
_senderID=[_requestHandlerValues objectForKey:GSWKey_ElementID];
|
||||
_senderID=[_requestHandlerValues objectForKey:GSWKey_ElementID[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"requests",@"AA _senderID=%@",_senderID);
|
||||
[_context _setSenderID:_senderID];
|
||||
[_application _setContext:_context];
|
||||
|
@ -160,7 +160,7 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStart();
|
||||
NS_DURING
|
||||
{
|
||||
_sessionID=[_elements objectForKey:GSWKey_SessionID];
|
||||
_sessionID=[_elements objectForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"requests",@"_sessionID=%@",_sessionID);
|
||||
if (_sessionID)
|
||||
{
|
||||
|
@ -234,7 +234,9 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"requests",@"_session=%@",_session);
|
||||
NSDebugMLLog(@"requests",@"_context=%@",_context);
|
||||
_storesIDsInCookies=[_session storesIDsInCookies]; //For What ?
|
||||
_contextID=[_elements objectForKey:GSWKey_ContextID];
|
||||
NSDebugMLLog(@"requests",@"_storesIDsInCookies=%s",(_storesIDsInCookies ? "YES" : "NO"));
|
||||
_contextID=[_elements objectForKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"requests",@"_contextID=%@",_contextID);
|
||||
if (_contextID) // ??
|
||||
{
|
||||
NSAssert([_contextID length]>0,@"contextID empty");
|
||||
|
@ -252,8 +254,9 @@ static char rcsId[] = "$Id$";
|
|||
}
|
||||
else
|
||||
{
|
||||
NSString* _pageName=[_elements objectForKey:GSWKey_PageName];
|
||||
NSString* _pageName=[_elements objectForKey:GSWKey_PageName[GSWebNamingConv]];
|
||||
NSException* _exception=nil;
|
||||
NSDebugMLLog(@"requests",@"_pageName=%@",_pageName);
|
||||
NS_DURING
|
||||
{
|
||||
_page=[[GSWApplication application] pageWithName:_pageName
|
||||
|
@ -324,7 +327,7 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"requests",@"_component=%@",_component);
|
||||
_request=[_context request];
|
||||
_contextID=[_elements objectForKey:GSWKey_ContextID];
|
||||
_contextID=[_elements objectForKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"requests",@"_contextID=%@",_contextID);
|
||||
_response=[[GSWResponse new]autorelease];
|
||||
NSDebugMLLog(@"requests",@"_response=%@",_response);
|
||||
|
|
|
@ -32,15 +32,17 @@
|
|||
#define GSWEB_WONAMES 0
|
||||
|
||||
#define GSWEB_DEFAULT_HTML_PARSER_CLASS_NAME @"GSWTemplateParserXMLHTML"
|
||||
#define GSWOPTVALUE_ApplicationBaseURL @"/GSWeb"
|
||||
#define GSWOPTVALUE_ApplicationBaseURL_WO @"/WebObjects"
|
||||
#define GSWOPTVALUE_ApplicationBaseURL_GSWEB @"/GSWeb"
|
||||
#define GSWOPTVALUE_AutoOpenInBrowser @"YES"
|
||||
#define GSWOPTVALUE_CGIAdaptorURL @"/cgi/GSWeb"
|
||||
#define GSWOPTVALUE_CGIAdaptorURL_WO @"/cgi/WebObjects"
|
||||
#define GSWOPTVALUE_CGIAdaptorURL_GSWEB @"/cgi/GSWeb"
|
||||
//or @"http://host.com/cgi/GSWeb"
|
||||
#define GSWOPTVALUE_CachingEnabled @"YES"
|
||||
#define GSWOPTVALUE_DebuggingEnabled @"YES"
|
||||
#define GSWOPTVALUE_StatusDebuggingEnabled @"YES"
|
||||
#define GSWOPTVALUE_DirectConnectEnabled @"YES"
|
||||
#define GSWOPTVALUE_FrameworksBaseURL @"/GSW/Frameworks"
|
||||
#define GSWOPTVALUE_FrameworksBaseURL @"/GSW/Frameworks"
|
||||
#define GSWOPTVALUE_IncludeCommentsInResponse @"YES"
|
||||
#define GSWOPTVALUE_ListenQueueSize @"16"
|
||||
#define GSWOPTVALUE_MonitorEnabled @"NO"
|
||||
|
|
|
@ -40,24 +40,27 @@ extern NSString* NSTNO;
|
|||
|
||||
//====================================================================
|
||||
// Suffixes
|
||||
extern NSString* GSWApplicationSuffix;
|
||||
extern NSString* GSWApplicationPSuffix;
|
||||
extern NSString* GSWPageSuffix;
|
||||
extern NSString* GSWPagePSuffix;
|
||||
extern NSString* GSWScriptSuffix;
|
||||
extern NSString* GSWScriptPSuffix;
|
||||
extern NSString* GSWResourceRequestHandlerKey;
|
||||
extern NSString* GSWComponentRequestHandlerKey;
|
||||
extern NSString* GSWDirectActionRequestHandlerKey;
|
||||
#define GSWNAMES_INDEX 0
|
||||
#define WONAMES_INDEX 1
|
||||
extern NSString* GSWApplicationSuffix[2];
|
||||
extern NSString* GSWApplicationPSuffix[2];
|
||||
extern NSString* GSWPageSuffix[2];
|
||||
extern NSString* GSWPagePSuffix[2];
|
||||
extern NSString* GSWScriptSuffix[2];
|
||||
extern NSString* GSWScriptPSuffix[2];
|
||||
extern NSString* GSWResourceRequestHandlerKey[2];
|
||||
extern NSString* GSWComponentRequestHandlerKey[2];
|
||||
extern NSString* GSWDirectActionRequestHandlerKey[2];
|
||||
extern NSString* GSWComponentTemplateSuffix;
|
||||
extern NSString* GSWComponentTemplatePSuffix;
|
||||
extern NSString* GSWComponentDefinitionSuffix;
|
||||
extern NSString* GSWComponentDefinitionPSuffix;
|
||||
extern NSString* GSWLibrarySuffix;
|
||||
extern NSString* GSWLibraryPSuffix;
|
||||
extern NSString* GSWArchiveSuffix;
|
||||
extern NSString* GSWArchivePSuffix;
|
||||
extern NSString* GSWURLPrefix;
|
||||
extern NSString* GSWComponentDefinitionSuffix[2];
|
||||
extern NSString* GSWComponentDefinitionPSuffix[2];
|
||||
extern NSString* GSWLibrarySuffix[2];
|
||||
extern NSString* GSWLibraryPSuffix[2];
|
||||
extern NSString* GSWArchiveSuffix[2];
|
||||
extern NSString* GSWArchivePSuffix[2];
|
||||
extern NSString* GSWURLPrefix[2];
|
||||
|
||||
extern NSString* GSFrameworkSuffix;
|
||||
extern NSString* GSFrameworkPSuffix;
|
||||
extern NSString* GSLanguageSuffix;
|
||||
|
@ -77,41 +80,41 @@ extern NSString* GSWAPIPSuffix;
|
|||
|
||||
extern NSString* GSWClassName_Session;
|
||||
extern NSString* GSWClassName_Application;
|
||||
extern NSString* GSWClassName_DefaultAdaptor;
|
||||
extern NSString* GSWClassName_DefaultAdaptor[2];
|
||||
|
||||
//====================================================================
|
||||
// Keys
|
||||
|
||||
extern NSString* GSWKey_InstanceID;
|
||||
extern NSString* GSWKey_SessionID;
|
||||
extern NSString* GSWKey_PageName;
|
||||
extern NSString* GSWKey_ContextID;
|
||||
extern NSString* GSWKey_ElementID;
|
||||
extern NSString* GSWKey_Data;
|
||||
extern NSString* GSWKey_SubmitAction;
|
||||
extern NSString* GSWKey_IsmapCoords;
|
||||
extern NSString* GSWKey_InstanceID[2];
|
||||
extern NSString* GSWKey_SessionID[2];
|
||||
extern NSString* GSWKey_PageName[2];
|
||||
extern NSString* GSWKey_ContextID[2];
|
||||
extern NSString* GSWKey_ElementID[2];
|
||||
extern NSString* GSWKey_Data[2];
|
||||
extern NSString* GSWKey_SubmitAction[2];
|
||||
extern NSString* GSWKey_IsmapCoords[2];
|
||||
|
||||
//====================================================================
|
||||
// HTTP Headers
|
||||
extern NSString* GSWHTTPHeader_Cookie;
|
||||
extern NSString* GSWHTTPHeader_SetCookie;
|
||||
extern NSString* GSWHTTPHeader_AdaptorVersion;
|
||||
extern NSString* GSWHTTPHeader_RequestMethod;
|
||||
extern NSString* GSWHTTPHeader_Recording;
|
||||
extern NSString* GSWHTTPHeader_QueryString;
|
||||
extern NSString* GSWHTTPHeader_RemoteAddress;
|
||||
extern NSString* GSWHTTPHeader_RemoteHost;
|
||||
extern NSString* GSWHTTPHeader_RemoteIdent;
|
||||
extern NSString* GSWHTTPHeader_RemoteUser;
|
||||
extern NSString* GSWHTTPHeader_ServerName;
|
||||
extern NSString* GSWHTTPHeader_ServerPort;
|
||||
extern NSString* GSWHTTPHeader_ServerSoftware;
|
||||
extern NSString* GSWHTTPHeader_AnnotationServer;
|
||||
extern NSString* GSWHTTPHeader_AuthPass;
|
||||
extern NSString* GSWHTTPHeader_AuthType;
|
||||
extern NSString* GSWHTTPHeader_DocumentRoot;
|
||||
extern NSString* GSWHTTPHeader_GatewayInterface;
|
||||
extern NSString* GSWHTTPHeader_Method;
|
||||
extern NSString* GSWHTTPHeader_AdaptorVersion[2];
|
||||
extern NSString* GSWHTTPHeader_RequestMethod[2];
|
||||
extern NSString* GSWHTTPHeader_Recording[2];
|
||||
extern NSString* GSWHTTPHeader_QueryString[2];
|
||||
extern NSString* GSWHTTPHeader_RemoteAddress[2];
|
||||
extern NSString* GSWHTTPHeader_RemoteHost[2];
|
||||
extern NSString* GSWHTTPHeader_RemoteIdent[2];
|
||||
extern NSString* GSWHTTPHeader_RemoteUser[2];
|
||||
extern NSString* GSWHTTPHeader_ServerName[2];
|
||||
extern NSString* GSWHTTPHeader_ServerPort[2];
|
||||
extern NSString* GSWHTTPHeader_ServerSoftware[2];
|
||||
extern NSString* GSWHTTPHeader_AnnotationServer[2];
|
||||
extern NSString* GSWHTTPHeader_AuthPass[2];
|
||||
extern NSString* GSWHTTPHeader_AuthType[2];
|
||||
extern NSString* GSWHTTPHeader_DocumentRoot[2];
|
||||
extern NSString* GSWHTTPHeader_GatewayInterface[2];
|
||||
extern NSString* GSWHTTPHeader_Method[2];
|
||||
extern NSString* GSWHTTPHeader_MethodPost;
|
||||
extern NSString* GSWHTTPHeader_MethodGet;
|
||||
extern NSString* GSWHTTPHeader_AcceptLanguage;
|
||||
|
@ -123,13 +126,13 @@ extern NSString* GSWHTTPHeader_MimeType_TextPlain;
|
|||
extern NSString* GSWHTTPHeader_UserAgent;
|
||||
|
||||
extern NSString* GSWHTTPHeader_Response_OK;
|
||||
extern NSString* GSWHTTPHeader_Response_HeaderLineEnd;
|
||||
extern NSString* GSWHTTPHeader_Response_HeaderLineEnd[2];
|
||||
|
||||
extern NSString* GSWFormValue_RemoteInvocationPost;
|
||||
extern NSString* GSWFormValue_RemoteInvocationPost[2];
|
||||
|
||||
//====================================================================
|
||||
// Notifications
|
||||
extern NSString* GSWNotification__SessionDidTimeOutNotification;
|
||||
extern NSString* GSWNotification__SessionDidTimeOutNotification[2];
|
||||
|
||||
//====================================================================
|
||||
// Frameworks
|
||||
|
@ -138,7 +141,7 @@ extern NSString* GSWNotification__SessionDidTimeOutNotification;
|
|||
extern NSString* GSWFramework_all;
|
||||
#endif
|
||||
extern NSString* GSWFramework_app;
|
||||
extern NSString* GSWFramework_extensions;
|
||||
extern NSString* GSWFramework_extensions[2];
|
||||
|
||||
//====================================================================
|
||||
// Protocols
|
||||
|
@ -149,29 +152,29 @@ extern NSString* GSWProtocol_HTTPS;
|
|||
//====================================================================
|
||||
// Option Names
|
||||
|
||||
extern NSString* GSWOPT_Adaptor;
|
||||
extern NSString* GSWOPT_AdditionalAdaptors;
|
||||
extern NSString* GSWOPT_ApplicationBaseURL;
|
||||
extern NSString* GSWOPT_AutoOpenInBrowser;
|
||||
extern NSString* GSWOPT_CGIAdaptorURL;
|
||||
extern NSString* GSWOPT_CachingEnabled;
|
||||
extern NSString* GSWOPT_ComponentRequestHandlerKey;
|
||||
extern NSString* GSWOPT_DebuggingEnabled;
|
||||
extern NSString* GSWOPT_StatusDebuggingEnabled;
|
||||
extern NSString* GSWOPT_DirectActionRequestHandlerKey;
|
||||
extern NSString* GSWOPT_DirectConnectEnabled;
|
||||
extern NSString* GSWOPT_FrameworksBaseURL;
|
||||
extern NSString* GSWOPT_IncludeCommentsInResponse;
|
||||
extern NSString* GSWOPT_ListenQueueSize;
|
||||
extern NSString* GSWOPT_LoadFrameworks;
|
||||
extern NSString* GSWOPT_MonitorEnabled;
|
||||
extern NSString* GSWOPT_MonitorHost;
|
||||
extern NSString* GSWOPT_Port;
|
||||
extern NSString* GSWOPT_Host;
|
||||
extern NSString* GSWOPT_ResourceRequestHandlerKey;
|
||||
extern NSString* GSWOPT_SMTPHost;
|
||||
extern NSString* GSWOPT_SessionTimeOut;
|
||||
extern NSString* GSWOPT_WorkerThreadCount;
|
||||
extern NSString* GSWOPT_Adaptor[2];
|
||||
extern NSString* GSWOPT_AdditionalAdaptors[2];
|
||||
extern NSString* GSWOPT_ApplicationBaseURL[2];
|
||||
extern NSString* GSWOPT_AutoOpenInBrowser[2];
|
||||
extern NSString* GSWOPT_CGIAdaptorURL[2];
|
||||
extern NSString* GSWOPT_CachingEnabled[2];
|
||||
extern NSString* GSWOPT_ComponentRequestHandlerKey[2];
|
||||
extern NSString* GSWOPT_DebuggingEnabled[2];
|
||||
extern NSString* GSWOPT_StatusDebuggingEnabled[2];
|
||||
extern NSString* GSWOPT_DirectActionRequestHandlerKey[2];
|
||||
extern NSString* GSWOPT_DirectConnectEnabled[2];
|
||||
extern NSString* GSWOPT_FrameworksBaseURL[2];
|
||||
extern NSString* GSWOPT_IncludeCommentsInResponse[2];
|
||||
extern NSString* GSWOPT_ListenQueueSize[2];
|
||||
extern NSString* GSWOPT_LoadFrameworks[2];
|
||||
extern NSString* GSWOPT_MonitorEnabled[2];
|
||||
extern NSString* GSWOPT_MonitorHost[2];
|
||||
extern NSString* GSWOPT_Port[2];
|
||||
extern NSString* GSWOPT_Host[2];
|
||||
extern NSString* GSWOPT_ResourceRequestHandlerKey[2];
|
||||
extern NSString* GSWOPT_SMTPHost[2];
|
||||
extern NSString* GSWOPT_SessionTimeOut[2];
|
||||
extern NSString* GSWOPT_WorkerThreadCount[2];
|
||||
extern NSString* GSWOPT_ProjectSearchPath;
|
||||
extern NSString* GSWOPT_MultiThreadEnabled;
|
||||
extern NSString* GSWOPT_DebugSetConfigFilePath;
|
||||
|
@ -186,19 +189,17 @@ extern NSString* GSFoundMarker;
|
|||
//====================================================================
|
||||
// GSWAssociation special keys
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
extern NSString* GSASK_Field;
|
||||
extern NSString* GSASK_FieldValidate;
|
||||
extern NSString* GSASK_FieldTitle;
|
||||
extern NSString* GSASK_Class;
|
||||
#endif
|
||||
extern NSString* GSASK_Field;
|
||||
extern NSString* GSASK_FieldValidate;
|
||||
extern NSString* GSASK_FieldTitle;
|
||||
extern NSString* GSASK_Class;
|
||||
|
||||
//====================================================================
|
||||
// Page names
|
||||
|
||||
extern NSString* GSWSessionRestorationErrorPageName;
|
||||
extern NSString* GSWExceptionPageName;
|
||||
extern NSString* GSWPageRestorationErrorPageName;
|
||||
extern NSString* GSWSessionRestorationErrorPageName[2];
|
||||
extern NSString* GSWExceptionPageName[2];
|
||||
extern NSString* GSWPageRestorationErrorPageName[2];
|
||||
|
||||
//====================================================================
|
||||
// Thread Keys
|
||||
|
@ -207,6 +208,11 @@ extern NSString* GSWThreadKey_ComponentDefinition;
|
|||
extern NSString* GSWThreadKey_DefaultAdaptorThread;
|
||||
extern NSString* GSWThreadKey_Context;
|
||||
|
||||
//====================================================================
|
||||
// Tag Name
|
||||
|
||||
extern NSString* GSWTag_Name[2];
|
||||
|
||||
//====================================================================
|
||||
// Components Keys
|
||||
|
||||
|
@ -259,7 +265,7 @@ extern id index__Key;
|
|||
extern id identifier__Key;
|
||||
extern id count__Key;
|
||||
extern id escapeHTML__Key;
|
||||
extern id GSWComponentName__Key;
|
||||
extern id GSWComponentName__Key[2];
|
||||
extern id prefix__Key;
|
||||
extern id suffix__Key;
|
||||
extern id level__Key;
|
||||
|
@ -277,25 +283,24 @@ extern id noSelectionString__Key;
|
|||
extern id displayString__Key;
|
||||
extern id filePath__Key;
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
extern id redirectURL__Key;
|
||||
extern id displayDisabled__Key;
|
||||
extern id actionYes__Key;
|
||||
extern id actionNo__Key;
|
||||
extern id pageSetVar__Prefix__Key;
|
||||
extern id pageSetVars__Key;
|
||||
extern id selectionValue__Key;
|
||||
extern id selectionValues__Key;
|
||||
extern id enabled__Key;
|
||||
extern id convertHTML__Key;
|
||||
extern id convertHTMLEntities__Key;
|
||||
extern id componentDesign__Key;
|
||||
extern id pageDesign__Key;
|
||||
extern id imageMapString__Key;
|
||||
extern id imageMapRegions__Key;
|
||||
extern id handleValidationException__Key;
|
||||
extern id selectedValues__Key;
|
||||
#endif
|
||||
//GSWeb Additions
|
||||
extern id redirectURL__Key;
|
||||
extern id displayDisabled__Key;
|
||||
extern id actionYes__Key;
|
||||
extern id actionNo__Key;
|
||||
extern id pageSetVar__Prefix__Key;
|
||||
extern id pageSetVars__Key;
|
||||
extern id selectionValue__Key;
|
||||
extern id selectionValues__Key;
|
||||
extern id enabled__Key;
|
||||
extern id convertHTML__Key;
|
||||
extern id convertHTMLEntities__Key;
|
||||
extern id componentDesign__Key;
|
||||
extern id pageDesign__Key;
|
||||
extern id imageMapString__Key;
|
||||
extern id imageMapRegions__Key;
|
||||
extern id handleValidationException__Key;
|
||||
extern id selectedValues__Key;
|
||||
|
||||
|
||||
#endif // _GSWebConstants_h__
|
||||
|
|
|
@ -39,41 +39,22 @@ NSString* GSWMonitorServiceName=@"gsweb-monitor";
|
|||
|
||||
//====================================================================
|
||||
// Suffixes
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWApplicationSuffix=@"woa";
|
||||
NSString* GSWApplicationPSuffix=@".woa";
|
||||
NSString* GSWPageSuffix=@"wo";
|
||||
NSString* GSWPagePSuffix=@".wo";
|
||||
NSString* GSWScriptSuffix=@"wos";
|
||||
NSString* GSWScriptPSuffix=@".wos";
|
||||
NSString* GSWResourceRequestHandlerKey=@"wr";
|
||||
NSString* GSWComponentRequestHandlerKey=@"wo";
|
||||
NSString* GSWDirectActionRequestHandlerKey=@"wa";
|
||||
NSString* GSWComponentDefinitionSuffix=@"wod";
|
||||
NSString* GSWComponentDefinitionPSuffix=@".wod";
|
||||
NSString* GSWArchiveSuffix=@"woo";
|
||||
NSString* GSWArchivePSuffix=@".woo";
|
||||
NSString* GSWURLPrefix=@"WebObjects";
|
||||
NSString* GSWLibrarySuffix=@"woso";
|
||||
NSString* GSWLibraryPSuffix=@".woso";
|
||||
#else
|
||||
NSString* GSWApplicationSuffix=@"gswa";
|
||||
NSString* GSWApplicationPSuffix=@".gswa";
|
||||
NSString* GSWPageSuffix=@"gswc";
|
||||
NSString* GSWPagePSuffix=@".gswc";
|
||||
NSString* GSWScriptSuffix=@"gsws";
|
||||
NSString* GSWScriptPSuffix=@".gsws";
|
||||
NSString* GSWResourceRequestHandlerKey=@"rr";
|
||||
NSString* GSWComponentRequestHandlerKey=@"cr";
|
||||
NSString* GSWDirectActionRequestHandlerKey=@"dr";
|
||||
NSString* GSWComponentDefinitionSuffix=@"gswd";
|
||||
NSString* GSWComponentDefinitionPSuffix=@".gswd";
|
||||
NSString* GSWArchiveSuffix=@"gswi";
|
||||
NSString* GSWArchivePSuffix=@".gswi";
|
||||
NSString* GSWURLPrefix=@"GSWeb";
|
||||
NSString* GSWLibrarySuffix=@"gswso";
|
||||
NSString* GSWLibraryPSuffix=@".gswso";
|
||||
#endif
|
||||
NSString* GSWApplicationSuffix[2]={ @"gswa", @"woa" };
|
||||
NSString* GSWApplicationPSuffix[2]={ @".gswa", @".woa" };
|
||||
NSString* GSWPageSuffix[2]={ @"gswc", @"wo" };
|
||||
NSString* GSWPagePSuffix[2]={ @".gswc", @".wo" };
|
||||
NSString* GSWScriptSuffix[2]={ @"gsws", @"wos" };
|
||||
NSString* GSWScriptPSuffix[2]={ @".gsws", @".wos" };
|
||||
NSString* GSWResourceRequestHandlerKey[2]={ @"rr", @"wr" };
|
||||
NSString* GSWComponentRequestHandlerKey[2]={ @"cr", @"wo" };
|
||||
NSString* GSWDirectActionRequestHandlerKey[2]={ @"dr", @"wa" };
|
||||
NSString* GSWComponentDefinitionSuffix[2]={ @"gswd", @"wod" };
|
||||
NSString* GSWComponentDefinitionPSuffix[2]={ @".gswd", @".wod" };
|
||||
NSString* GSWArchiveSuffix[2]={ @"gswi", @"woo" };
|
||||
NSString* GSWArchivePSuffix[2]={ @".gswi", @".woo" };
|
||||
NSString* GSWURLPrefix[2]={ @"GSWeb", @"WebObjects" };
|
||||
NSString* GSWLibrarySuffix[2]={ @"gswso", @"woso" };
|
||||
NSString* GSWLibraryPSuffix[2]={ @".gswso", @".woso" };
|
||||
|
||||
NSString* GSFrameworkSuffix=@"framework";
|
||||
NSString* GSFrameworkPSuffix=@".framework";
|
||||
|
@ -94,79 +75,44 @@ NSString* GSWMainPageName=@"Main";
|
|||
|
||||
NSString* GSWClassName_Session=@"Session";
|
||||
NSString* GSWClassName_Application=@"Application";
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWClassName_DefaultAdaptor=@"WODefaultAdaptor";
|
||||
#else
|
||||
NSString* GSWClassName_DefaultAdaptor=@"GSWDefaultAdaptor";
|
||||
#endif
|
||||
NSString* GSWClassName_DefaultAdaptor[2]={ @"GSWDefaultAdaptor", @"WODefaultAdaptor" };
|
||||
|
||||
//====================================================================
|
||||
// Keys
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWKey_InstanceID=@"woinst";
|
||||
NSString* GSWKey_SessionID=@"wosid";
|
||||
NSString* GSWKey_PageName=@"wopage";
|
||||
NSString* GSWKey_ContextID=@"wocid";
|
||||
NSString* GSWKey_ElementID=@"woeid";
|
||||
NSString* GSWKey_Data=@"wodata";
|
||||
NSString* GSWKey_SubmitAction=@"WOSubmitAction";
|
||||
NSString* GSWKey_IsmapCoords=@"WOIsmapCoords";
|
||||
#else
|
||||
NSString* GSWKey_InstanceID=@"gswinst";
|
||||
NSString* GSWKey_SessionID=@"gswsid";
|
||||
NSString* GSWKey_PageName=@"gswpage";
|
||||
NSString* GSWKey_ContextID=@"gswcid";
|
||||
NSString* GSWKey_ElementID=@"gsweid";
|
||||
NSString* GSWKey_Data=@"gswdata";
|
||||
NSString* GSWKey_SubmitAction=@"GSWSubmitAction";
|
||||
NSString* GSWKey_IsmapCoords=@"GSWIsmapCoords";
|
||||
#endif
|
||||
NSString* GSWKey_InstanceID[2]={ @"gswinst", @"woinst" };
|
||||
NSString* GSWKey_SessionID[2]={ @"gswsid", @"wosid" };
|
||||
NSString* GSWKey_PageName[2]={ @"gswpage", @"wopage" };
|
||||
NSString* GSWKey_ContextID[2]={ @"gswcid", @"wocid" };
|
||||
NSString* GSWKey_ElementID[2]={ @"gsweid", @"woeid" };
|
||||
NSString* GSWKey_Data[2]={ @"gswdata", @"wodata" };
|
||||
NSString* GSWKey_SubmitAction[2]={ @"GSWSubmitAction", @"WOSubmitAction" };
|
||||
NSString* GSWKey_IsmapCoords[2]={ @"GSWIsmapCoords", @"WOIsmapCoords" };
|
||||
|
||||
//====================================================================
|
||||
// HTTP Headers
|
||||
NSString* GSWHTTPHeader_Cookie=@"cookie";
|
||||
NSString* GSWHTTPHeader_SetCookie=@"set-cookie";
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWHTTPHeader_AdaptorVersion=@"x-webobjects-adaptor-version";
|
||||
NSString* GSWHTTPHeader_Method=@"x-webobjects-request-method";
|
||||
NSString* GSWHTTPHeader_Response_HeaderLineEnd=@" NeXT WebObjects";
|
||||
NSString* GSWHTTPHeader_RequestMethod=@"x-webobjects-request-method";
|
||||
NSString* GSWHTTPHeader_Recording=@"x-webobjects-recording";
|
||||
NSString* GSWHTTPHeader_QueryString=@"x-webobjects-query-string";
|
||||
NSString* GSWHTTPHeader_RemoteAddress=@"x-webobjects-remote-addr";
|
||||
NSString* GSWHTTPHeader_RemoteHost=@"x-webobjects-remote-host";
|
||||
NSString* GSWHTTPHeader_RemoteIdent=@"x-webobjects-remote-ident";
|
||||
NSString* GSWHTTPHeader_RemoteUser=@"x-webobjects-remote-user";
|
||||
NSString* GSWHTTPHeader_ServerName=@"x-webobjects-server-name";
|
||||
NSString* GSWHTTPHeader_ServerPort=@"x-webobjects-server-port";
|
||||
NSString* GSWHTTPHeader_ServerSoftware=@"x-webobjects-server-software";
|
||||
NSString* GSWHTTPHeader_AnnotationServer=@"x-webobjects-annotation-server";
|
||||
NSString* GSWHTTPHeader_AuthPass=@"x-webobjects-auth-pass";
|
||||
NSString* GSWHTTPHeader_AuthType=@"x-webobjects-auth-type";
|
||||
NSString* GSWHTTPHeader_DocumentRoot=@"x-webobjects-documentroot";
|
||||
NSString* GSWHTTPHeader_GatewayInterface=@"x-webobjects-gateway-interface";
|
||||
NSString* GSWHTTPHeader_AdaptorVersion[2]={ @"x-gsweb-adaptor-version", @"x-webobjects-adaptor-version" };
|
||||
NSString* GSWHTTPHeader_Method[2]={ @"x-gsweb-request-method", @"x-webobjects-request-method" };
|
||||
NSString* GSWHTTPHeader_Response_HeaderLineEnd[2]={ @" GNUstep GSWeb", @" NeXT WebObjects" };
|
||||
NSString* GSWHTTPHeader_RequestMethod[2]={ @"x-gsweb-request-method", @"x-webobjects-request-method" };
|
||||
NSString* GSWHTTPHeader_Recording[2]={ @"x-gsweb-recording", @"x-webobjects-recording" };
|
||||
NSString* GSWHTTPHeader_QueryString[2]={ @"x-gsweb-query-string", @"x-webobjects-query-string" };
|
||||
NSString* GSWHTTPHeader_RemoteAddress[2]={ @"x-gsweb-remote-addr", @"x-webobjects-remote-addr" };
|
||||
NSString* GSWHTTPHeader_RemoteHost[2]={ @"x-gsweb-remote-host", @"x-webobjects-remote-host" };
|
||||
NSString* GSWHTTPHeader_RemoteIdent[2]={ @"x-gsweb-remote-ident", @"x-webobjects-remote-ident" };
|
||||
NSString* GSWHTTPHeader_RemoteUser[2]={ @"x-gsweb-remote-user", @"x-webobjects-remote-user" };
|
||||
NSString* GSWHTTPHeader_ServerName[2]={ @"x-gsweb-server-name", @"x-webobjects-server-name" };
|
||||
NSString* GSWHTTPHeader_ServerPort[2]={ @"x-gsweb-server-port", @"x-webobjects-server-port" };
|
||||
NSString* GSWHTTPHeader_ServerSoftware[2]={ @"x-gsweb-server-software", @"x-webobjects-server-software" };
|
||||
NSString* GSWHTTPHeader_AnnotationServer[2]={ @"x-gsweb-annotation-server", @"x-webobjects-annotation-server" };
|
||||
NSString* GSWHTTPHeader_AuthPass[2]={ @"x-gsweb-auth-pass", @"x-webobjects-auth-pass" };
|
||||
NSString* GSWHTTPHeader_AuthType[2]={ @"x-gsweb-auth-type", @"x-webobjects-auth-type" };
|
||||
NSString* GSWHTTPHeader_DocumentRoot[2]={ @"x-gsweb-documentroot", @"x-webobjects-documentroot" };
|
||||
NSString* GSWHTTPHeader_GatewayInterface[2]={ @"x-gsweb-gateway-interface", @"x-webobjects-gateway-interface" };
|
||||
|
||||
#else
|
||||
NSString* GSWHTTPHeader_AdaptorVersion=@"x-gsweb-adaptor-version";
|
||||
NSString* GSWHTTPHeader_Method=@"x-gsweb-request-method";
|
||||
NSString* GSWHTTPHeader_Response_HeaderLineEnd=@" GNUstep GSWeb";
|
||||
NSString* GSWHTTPHeader_RequestMethod=@"x-gsweb-request-method";
|
||||
NSString* GSWHTTPHeader_Recording=@"x-gsweb-recording";
|
||||
NSString* GSWHTTPHeader_QueryString=@"x-gsweb-query-string";
|
||||
NSString* GSWHTTPHeader_RemoteAddress=@"x-gsweb-remote-addr";
|
||||
NSString* GSWHTTPHeader_RemoteHost=@"x-gsweb-remote-host";
|
||||
NSString* GSWHTTPHeader_RemoteIdent=@"x-gsweb-remote-ident";
|
||||
NSString* GSWHTTPHeader_RemoteUser=@"x-gsweb-remote-user";
|
||||
NSString* GSWHTTPHeader_ServerName=@"x-gsweb-server-name";
|
||||
NSString* GSWHTTPHeader_ServerPort=@"x-gsweb-server-port";
|
||||
NSString* GSWHTTPHeader_ServerSoftware=@"x-gsweb-server-software";
|
||||
NSString* GSWHTTPHeader_AnnotationServer=@"x-gsweb-annotation-server";
|
||||
NSString* GSWHTTPHeader_AuthPass=@"x-gsweb-auth-pass";
|
||||
NSString* GSWHTTPHeader_AuthType=@"x-gsweb-auth-type";
|
||||
NSString* GSWHTTPHeader_DocumentRoot=@"x-gsweb-documentroot";
|
||||
NSString* GSWHTTPHeader_GatewayInterface=@"x-gsweb-gateway-interface";
|
||||
#endif
|
||||
NSString* GSWHTTPHeader_MethodPost=@"POST";
|
||||
NSString* GSWHTTPHeader_MethodGet=@"GET";
|
||||
NSString* GSWHTTPHeader_AcceptLanguage=@"accept-language";
|
||||
|
@ -180,20 +126,12 @@ NSString* GSWHTTPHeader_ContentLength=@"content-length";
|
|||
|
||||
NSString* GSWHTTPHeader_Response_OK=@"OK";
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWFormValue_RemoteInvocationPost=@"WORemoteInvocationPost";
|
||||
#else
|
||||
NSString* GSWFormValue_RemoteInvocationPost=@"GSWRemoteInvocationPost";
|
||||
#endif
|
||||
NSString* GSWFormValue_RemoteInvocationPost[2]={ @"GSWRemoteInvocationPost", @"WORemoteInvocationPost" };
|
||||
|
||||
//====================================================================
|
||||
// Notifications
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWNotification__SessionDidTimeOutNotification=@"WOSessionDidTimeOutNotification";
|
||||
#else
|
||||
NSString* GSWNotification__SessionDidTimeOutNotification=@"GSWSessionDidTimeOutNotification";
|
||||
#endif
|
||||
NSString* GSWNotification__SessionDidTimeOutNotification[2]={ @"GSWSessionDidTimeOutNotification", @"WOSessionDidTimeOutNotification" };
|
||||
//====================================================================
|
||||
// Frameworks
|
||||
|
||||
|
@ -202,11 +140,7 @@ NSString* GSWNotification__SessionDidTimeOutNotification=@"GSWSessionDidTimeOutN
|
|||
#endif
|
||||
NSString* GSWFramework_app=@"app";
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWFramework_extensions=@"WOExtensions";
|
||||
#else
|
||||
NSString* GSWFramework_extensions=@"GSWExtensions";
|
||||
#endif
|
||||
NSString* GSWFramework_extensions[2]={ @"GSWExtensions", @"WOExtensions" };
|
||||
|
||||
//====================================================================
|
||||
// Protocols
|
||||
|
@ -217,57 +151,30 @@ NSString* GSWProtocol_HTTPS=@"https";
|
|||
//====================================================================
|
||||
// Option Names
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWOPT_Adaptor=@"WOAdaptor";
|
||||
NSString* GSWOPT_AdditionalAdaptors=@"WOAdditionalAdaptors";
|
||||
NSString* GSWOPT_ApplicationBaseURL=@"WOApplicationBaseURL";
|
||||
NSString* GSWOPT_AutoOpenInBrowser=@"WOAutoOpenInBrowser";
|
||||
NSString* GSWOPT_CGIAdaptorURL=@"WOCGIAdaptorURL";
|
||||
NSString* GSWOPT_CachingEnabled=@"WOCachingEnabled";
|
||||
NSString* GSWOPT_ComponentRequestHandlerKey=@"WOComponentRequestHandlerKey";
|
||||
NSString* GSWOPT_DebuggingEnabled=@"WODebuggingEnabled";
|
||||
NSString* GSWOPT_StatusDebuggingEnabled=@"WOStatusDebuggingEnabled";//NDFN
|
||||
NSString* GSWOPT_DirectActionRequestHandlerKey=@"WODirectActionRequestHandlerKey";
|
||||
NSString* GSWOPT_DirectConnectEnabled=@"WODirectConnectEnabled";
|
||||
NSString* GSWOPT_FrameworksBaseURL=@"WOFrameworksBaseURL";
|
||||
NSString* GSWOPT_IncludeCommentsInResponse=@"WOIncludeCommentsInResponse";
|
||||
NSString* GSWOPT_ListenQueueSize=@"WOListenQueueSize";
|
||||
NSString* GSWOPT_LoadFrameworks=@"WOLoadFrameworks";
|
||||
NSString* GSWOPT_MonitorEnabled=@"WOMonitorEnabled";
|
||||
NSString* GSWOPT_MonitorHost=@"WOMonitorHost";
|
||||
NSString* GSWOPT_Port=@"WOPort";
|
||||
NSString* GSWOPT_Host=@"WOHost";
|
||||
NSString* GSWOPT_ResourceRequestHandlerKey=@"WOResourceRequestHandlerKey";
|
||||
NSString* GSWOPT_SMTPHost=@"WOSMTPHost";
|
||||
NSString* GSWOPT_SessionTimeOut=@"WOSessionTimeOut";
|
||||
NSString* GSWOPT_WorkerThreadCount=@"WOWorkerThreadCount";
|
||||
NSString* GSWOPT_Adaptor[2]={ @"GSWAdaptor", @"WOAdaptor" };
|
||||
NSString* GSWOPT_AdditionalAdaptors[2]={ @"GSWAdditionalAdaptors", @"WOAdditionalAdaptors" };
|
||||
NSString* GSWOPT_ApplicationBaseURL[2]={ @"GSWApplicationBaseURL", @"WOApplicationBaseURL" };
|
||||
NSString* GSWOPT_AutoOpenInBrowser[2]={ @"GSWAutoOpenInBrowser", @"WOAutoOpenInBrowser" };
|
||||
NSString* GSWOPT_CGIAdaptorURL[2]={ @"GSWCGIAdaptorURL", @"WOCGIAdaptorURL" };
|
||||
NSString* GSWOPT_CachingEnabled[2]={ @"GSWCachingEnabled", @"WOCachingEnabled" };
|
||||
NSString* GSWOPT_ComponentRequestHandlerKey[2]={ @"GSWComponentRequestHandlerKey", @"WOComponentRequestHandlerKey" };
|
||||
NSString* GSWOPT_DebuggingEnabled[2]={ @"GSWDebuggingEnabled", @"WODebuggingEnabled" };
|
||||
NSString* GSWOPT_StatusDebuggingEnabled[2]={ @"GSWStatusDebuggingEnabled", @"WOStatusDebuggingEnabled" };//NDFN
|
||||
NSString* GSWOPT_DirectActionRequestHandlerKey[2]={ @"GSWDirectActionRequestHandlerKey", @"WODirectActionRequestHandlerKey" };
|
||||
NSString* GSWOPT_DirectConnectEnabled[2]={ @"GSWDirectConnectEnabled", @"WODirectConnectEnabled" };
|
||||
NSString* GSWOPT_FrameworksBaseURL[2]={ @"GSWFrameworksBaseURL", @"WOFrameworksBaseURL" };
|
||||
NSString* GSWOPT_IncludeCommentsInResponse[2]={ @"GSWIncludeCommentsInResponse", @"WOIncludeCommentsInResponse" };
|
||||
NSString* GSWOPT_ListenQueueSize[2]={ @"GSWListenQueueSize", @"WOListenQueueSize" };
|
||||
NSString* GSWOPT_LoadFrameworks[2]={ @"GSWLoadFrameworks", @"WOLoadFrameworks" };
|
||||
NSString* GSWOPT_MonitorEnabled[2]={ @"GSWMonitorEnabled", @"WOMonitorEnabled" };
|
||||
NSString* GSWOPT_MonitorHost[2]={ @"GSWMonitorHost", @"WOMonitorHost" };
|
||||
NSString* GSWOPT_Port[2]={ @"GSWPort", @"WOPort" };
|
||||
NSString* GSWOPT_Host[2]={ @"GSWHost", @"WOHost" };
|
||||
NSString* GSWOPT_ResourceRequestHandlerKey[2]={ @"GSWResourceRequestHandlerKey", @"WOResourceRequestHandlerKey" };
|
||||
NSString* GSWOPT_SMTPHost[2]={ @"GSWSMTPHost", @"WOSMTPHost" };
|
||||
NSString* GSWOPT_SessionTimeOut[2]={ @"GSWSessionTimeOut", @"WOSessionTimeOut" };
|
||||
NSString* GSWOPT_WorkerThreadCount[2]={ @"GSWWorkerThreadCount", @"WOWorkerThreadCount" };
|
||||
NSString* GSWOPT_ProjectSearchPath=@"NSProjectSearchPath";
|
||||
#else
|
||||
NSString* GSWOPT_Adaptor=@"GSWAdaptor";
|
||||
NSString* GSWOPT_AdditionalAdaptors=@"GSWAdditionalAdaptors";
|
||||
NSString* GSWOPT_ApplicationBaseURL=@"GSWApplicationBaseURL";
|
||||
NSString* GSWOPT_AutoOpenInBrowser=@"GSWAutoOpenInBrowser";
|
||||
NSString* GSWOPT_CGIAdaptorURL=@"GSWCGIAdaptorURL";
|
||||
NSString* GSWOPT_CachingEnabled=@"GSWCachingEnabled";
|
||||
NSString* GSWOPT_ComponentRequestHandlerKey=@"GSWComponentRequestHandlerKey";
|
||||
NSString* GSWOPT_DebuggingEnabled=@"GSWDebuggingEnabled";
|
||||
NSString* GSWOPT_StatusDebuggingEnabled=@"GSWStatusDebuggingEnabled";//NDFN
|
||||
NSString* GSWOPT_DirectActionRequestHandlerKey=@"GSWDirectActionRequestHandlerKey";
|
||||
NSString* GSWOPT_DirectConnectEnabled=@"GSWDirectConnectEnabled";
|
||||
NSString* GSWOPT_FrameworksBaseURL=@"GSWFrameworksBaseURL";
|
||||
NSString* GSWOPT_IncludeCommentsInResponse=@"GSWIncludeCommentsInResponse";
|
||||
NSString* GSWOPT_ListenQueueSize=@"GSWListenQueueSize";
|
||||
NSString* GSWOPT_LoadFrameworks=@"GSWLoadFrameworks";
|
||||
NSString* GSWOPT_MonitorEnabled=@"GSWMonitorEnabled";
|
||||
NSString* GSWOPT_MonitorHost=@"GSWMonitorHost";
|
||||
NSString* GSWOPT_Port=@"GSWPort";
|
||||
NSString* GSWOPT_Host=@"GSWHost";
|
||||
NSString* GSWOPT_ResourceRequestHandlerKey=@"GSWResourceRequestHandlerKey";
|
||||
NSString* GSWOPT_SMTPHost=@"GSWSMTPHost";
|
||||
NSString* GSWOPT_SessionTimeOut=@"GSWSessionTimeOut";
|
||||
NSString* GSWOPT_WorkerThreadCount=@"GSWWorkerThreadCount";
|
||||
NSString* GSWOPT_ProjectSearchPath=@"NSProjectSearchPath";
|
||||
#endif
|
||||
NSString* GSWOPT_MultiThreadEnabled=@"GSWMTEnabled";
|
||||
NSString* GSWOPT_DebugSetConfigFilePath=@"GSWDebugSetConfigFilePath";
|
||||
|
||||
|
@ -279,25 +186,17 @@ NSString* GSFoundMarker=@"FoundMarker";
|
|||
//====================================================================
|
||||
// GSWAssociation special keys
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
NSString* GSASK_Field=@"GSField";
|
||||
NSString* GSASK_FieldValidate=@"GSFieldValidate";
|
||||
NSString* GSASK_FieldTitle=@"GSFieldTitle";
|
||||
NSString* GSASK_Class = @"GSClass";
|
||||
#endif
|
||||
|
||||
//====================================================================
|
||||
// Page names
|
||||
|
||||
#if GSWEB_WONAMES
|
||||
NSString* GSWSessionRestorationErrorPageName=@"WOSessionRestorationErrorPage";
|
||||
NSString* GSWExceptionPageName=@"WOExceptionPage";
|
||||
NSString* GSWPageRestorationErrorPageName=@"WOPageRestorationErrorPage";
|
||||
#else
|
||||
NSString* GSWSessionRestorationErrorPageName=@"GSWSessionRestorationErrorPage";
|
||||
NSString* GSWExceptionPageName=@"GSWExceptionPage";
|
||||
NSString* GSWPageRestorationErrorPageName=@"GSWPageRestorationErrorPage";
|
||||
#endif
|
||||
NSString* GSWSessionRestorationErrorPageName[2]={ @"GSWSessionRestorationErrorPage", @"WOSessionRestorationErrorPage" };
|
||||
NSString* GSWExceptionPageName[2]={ @"GSWExceptionPage", @"WOExceptionPage" };
|
||||
NSString* GSWPageRestorationErrorPageName[2]={ @"GSWPageRestorationErrorPage", @"WOPageRestorationErrorPage" };
|
||||
|
||||
|
||||
//====================================================================
|
||||
|
@ -306,6 +205,12 @@ NSString* GSWPageRestorationErrorPageName=@"GSWPageRestorationErrorPage";
|
|||
NSString* GSWThreadKey_ComponentDefinition=@"ComponentDefinition";
|
||||
NSString* GSWThreadKey_DefaultAdaptorThread=@"DefaultAdaptorThread";
|
||||
NSString* GSWThreadKey_Context=@"Context";
|
||||
|
||||
//====================================================================
|
||||
// Tag Name
|
||||
|
||||
NSString* GSWTag_Name[2]={ @"gsweb", @"webobject" };
|
||||
|
||||
//====================================================================
|
||||
// Components Keys
|
||||
|
||||
|
@ -358,11 +263,7 @@ id index__Key = @"index";
|
|||
id identifier__Key = @"identifier";
|
||||
id count__Key = @"count";
|
||||
id escapeHTML__Key = @"escapeHTML";
|
||||
#if GSWEB_WONAMES
|
||||
id GSWComponentName__Key = @"WOComponentName";
|
||||
#else
|
||||
id GSWComponentName__Key = @"GSWComponentName";
|
||||
#endif
|
||||
id GSWComponentName__Key[2] = { @"GSWComponentName", @"WOComponentName"};
|
||||
id prefix__Key = @"prefix";
|
||||
id suffix__Key = @"suffix";
|
||||
id level__Key = @"level";
|
||||
|
@ -379,20 +280,21 @@ id selectedValue__Key = @"selectedValue";
|
|||
id noSelectionString__Key = @"noSelectionString";
|
||||
id displayString__Key = @"displayString";
|
||||
id filePath__Key = @"filePath";
|
||||
#if !GSWEB_STRICT
|
||||
id redirectURL__Key = @"redirectURL";
|
||||
id displayDisabled__Key = @"displayDisabled";
|
||||
id actionYes__Key = @"actionYes";
|
||||
id actionNo__Key = @"actionNo";
|
||||
id pageSetVar__Prefix__Key=@"pageSetVar_";
|
||||
id pageSetVars__Key=@"pageSetVars";
|
||||
id selectionValue__Key=@"selectionValue";
|
||||
id selectionValues__Key=@"selectionValues";
|
||||
id enabled__Key=@"enabled";
|
||||
id convertHTML__Key=@"convertHTML";
|
||||
id convertHTMLEntities__Key=@"convertHTMLEntities";
|
||||
id imageMapString__Key = @"imageMapString";
|
||||
id imageMapRegions__Key = @"imageMapRegions";
|
||||
id handleValidationException__Key = @"handleValidationException";
|
||||
id selectedValues__Key = @"selectedValues";
|
||||
#endif
|
||||
|
||||
//GSWeb additions
|
||||
id redirectURL__Key = @"redirectURL";
|
||||
id displayDisabled__Key = @"displayDisabled";
|
||||
id actionYes__Key = @"actionYes";
|
||||
id actionNo__Key = @"actionNo";
|
||||
id pageSetVar__Prefix__Key=@"pageSetVar_";
|
||||
id pageSetVars__Key=@"pageSetVars";
|
||||
id selectionValue__Key=@"selectionValue";
|
||||
id selectionValues__Key=@"selectionValues";
|
||||
id enabled__Key=@"enabled";
|
||||
id convertHTML__Key=@"convertHTML";
|
||||
id convertHTMLEntities__Key=@"convertHTMLEntities";
|
||||
id imageMapString__Key = @"imageMapString";
|
||||
id imageMapRegions__Key = @"imageMapRegions";
|
||||
id handleValidationException__Key = @"handleValidationException";
|
||||
id selectedValues__Key = @"selectedValues";
|
||||
|
||||
|
|
|
@ -367,6 +367,10 @@ static int dontTraceComponentActionURL=0;
|
|||
//OK
|
||||
GSWDynamicURLString* _url=nil;
|
||||
GSWRequest* _request=[self request];
|
||||
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
||||
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
||||
@"generateCompleteURLs=%s",
|
||||
(generateCompleteURLs ? "YES" : "NO"));
|
||||
if (generateCompleteURLs)
|
||||
_url=[self completeURLWithRequestHandlerKey:requestHandlerKey_
|
||||
path:requestHandlerPath_
|
||||
|
@ -375,6 +379,9 @@ static int dontTraceComponentActionURL=0;
|
|||
_url=[_request _urlWithRequestHandlerKey:requestHandlerKey_
|
||||
path:requestHandlerPath_
|
||||
queryString:queryString_];
|
||||
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
||||
@"url=%@",_url);
|
||||
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
||||
return _url;
|
||||
};
|
||||
|
||||
|
@ -401,6 +408,7 @@ static int dontTraceComponentActionURL=0;
|
|||
isSecure:(BOOL)isSecure_
|
||||
port:(int)port_
|
||||
{
|
||||
NSString* host=nil;
|
||||
GSWDynamicURLString* _url=nil;
|
||||
GSWRequest* _request=nil;
|
||||
LOGObjectFnStart();
|
||||
|
@ -416,8 +424,11 @@ static int dontTraceComponentActionURL=0;
|
|||
|
||||
if (port_)
|
||||
[_url setURLPort:port_];
|
||||
|
||||
[_url setURLHost:[_request urlHost]];
|
||||
NSDebugMLLog(@"low",@"_url=%@",_url);
|
||||
host=[_request urlHost];
|
||||
NSAssert(host,@"No host !");
|
||||
NSDebugMLLog(@"low",@"host=%@",host);
|
||||
[_url setURLHost:host];
|
||||
NSDebugMLLog(@"low",@"_url=%@",_url);
|
||||
LOGObjectFnStop();
|
||||
return _url;
|
||||
|
@ -507,6 +518,7 @@ static int dontTraceComponentActionURL=0;
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
||||
-(id)_directActionURLForActionNamed:(NSString*)_actionName
|
||||
queryDictionary:(NSDictionary*)_dict
|
||||
url:(id)_url
|
||||
|
@ -516,6 +528,8 @@ static int dontTraceComponentActionURL=0;
|
|||
NSEnumerator* _enumerator =nil;
|
||||
id _key=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
||||
@"url=%@",_url);
|
||||
// _url=[[_url copy] autorelease];
|
||||
//TODOV
|
||||
_enumerator = [_dict keyEnumerator];
|
||||
|
@ -530,13 +544,15 @@ static int dontTraceComponentActionURL=0;
|
|||
[_dict objectForKey:_key]];
|
||||
};
|
||||
/*
|
||||
[_url setURLRequestHandlerKey:GSWDirectActionRequestHandlerKey];
|
||||
[_url setURLRequestHandlerKey:GSWDirectActionRequestHandlerKey[GSWebNamingConv]];
|
||||
[_url setURLRequestHandlerPath:_actionName];
|
||||
[_url setURLQueryString:_queryString];
|
||||
*/
|
||||
_url=[self completeURLWithRequestHandlerKey:GSWDirectActionRequestHandlerKey
|
||||
_url=[self completeURLWithRequestHandlerKey:GSWDirectActionRequestHandlerKey[GSWebNamingConv]
|
||||
path:_actionName
|
||||
queryString:_queryString];
|
||||
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
||||
@"url=%@",_url);
|
||||
LOGObjectFnStop();
|
||||
return _url;
|
||||
};
|
||||
|
@ -612,11 +628,14 @@ static int dontTraceComponentActionURL=0;
|
|||
NSString* _adaptorPrefix=nil;
|
||||
NSString* _applicationName=nil;
|
||||
LOGObjectFnStart();
|
||||
_adaptorPrefix=[_request adaptorPrefix];
|
||||
NSDebugMLLog(@"low",@"_request=%@",_request);
|
||||
NSDebugMLLog(@"low",@"url=%@",url);
|
||||
_adaptorPrefix=[_request adaptorPrefix];
|
||||
NSDebugMLLog(@"low",@"_adaptorPrefix=%@",_adaptorPrefix);
|
||||
[url setURLPrefix:_adaptorPrefix];
|
||||
NSDebugMLLog(@"low",@"url=%@",url);
|
||||
_applicationName=[_request applicationName];
|
||||
NSDebugMLLog(@"low",@"_applicationName=%@",_applicationName);
|
||||
[url setURLApplicationName:_applicationName];
|
||||
NSDebugMLLog(@"low",@"url=%@",url);
|
||||
ASSIGN(request,_request);
|
||||
|
@ -829,7 +848,7 @@ static int dontTraceComponentActionURL=0;
|
|||
[request urlProtocolHostPort],
|
||||
[request adaptorPrefix],
|
||||
[request applicationName],
|
||||
GSWApplicationSuffix,
|
||||
GSWApplicationSuffix[GSWebNamingConv],
|
||||
[session sessionID]];
|
||||
};
|
||||
|
||||
|
|
|
@ -31,21 +31,23 @@ static char rcsId[] = "$Id$";
|
|||
-(id)initWithName:(NSString*)name_
|
||||
arguments:(NSDictionary*)arguments_
|
||||
{
|
||||
NSDebugMLog(@"Init");
|
||||
if ((self=[super initWithName:name_
|
||||
arguments:arguments_]))
|
||||
{
|
||||
fileHandle=nil;
|
||||
threads=[NSMutableArray new];
|
||||
waitingThreads=[NSMutableArray new];
|
||||
selfLock=[NSLock new];
|
||||
port=[[arguments_ objectForKey:GSWOPT_Port] intValue];
|
||||
NSDebugMLLog(@"info",@"port=%d",port);
|
||||
ASSIGN(host,[arguments_ objectForKey:GSWOPT_Host]);
|
||||
// [self setInstance:_instance];
|
||||
queueSize=[[arguments_ objectForKey:GSWOPT_ListenQueueSize] intValue];
|
||||
workerThreadCount=[[arguments_ objectForKey:GSWOPT_WorkerThreadCount] intValue];
|
||||
isMultiThreadEnabled=[[arguments_ objectForKey:GSWOPT_MultiThreadEnabled] boolValue];
|
||||
};
|
||||
arguments:arguments_]))
|
||||
{
|
||||
fileHandle=nil;
|
||||
threads=[NSMutableArray new];
|
||||
waitingThreads=[NSMutableArray new];
|
||||
selfLock=[NSLock new];
|
||||
port=[[arguments_ objectForKey:GSWOPT_Port[GSWebNamingConv]] intValue];
|
||||
NSDebugMLLog(@"info",@"port=%d",port);
|
||||
ASSIGN(host,[arguments_ objectForKey:GSWOPT_Host[GSWebNamingConv]]);
|
||||
// [self setInstance:_instance];
|
||||
queueSize=[[arguments_ objectForKey:GSWOPT_ListenQueueSize[GSWebNamingConv]] intValue];
|
||||
workerThreadCount=[[arguments_ objectForKey:GSWOPT_WorkerThreadCount[GSWebNamingConv]] intValue];
|
||||
isMultiThreadEnabled=[[arguments_ objectForKey:GSWOPT_MultiThreadEnabled] boolValue];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
NSDate* runDate;
|
||||
NSDate* dispatchRequestDate;
|
||||
NSDate* sendResponseDate;
|
||||
int requestNamingConv;//GSWNAMES_INDEX or WONAMES_INDEX
|
||||
}
|
||||
|
||||
-(id)initWithApp:(GSWApplication*)_application
|
||||
|
|
|
@ -33,9 +33,10 @@ static char rcsId[] = "$Id$";
|
|||
-(id)init
|
||||
{
|
||||
if ((self=[super init]))
|
||||
{
|
||||
ASSIGN(creationDate,[NSDate date]);
|
||||
};
|
||||
{
|
||||
ASSIGN(creationDate,[NSDate date]);
|
||||
requestNamingConv=GSWebNamingConv;//GSWNAMES_INDEX or WONAMES_INDEX
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -352,6 +353,7 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
dataBlock=[stream availableDataNonBlocking];
|
||||
dataBlockLength=[dataBlock length];
|
||||
NSDebugMLog(@"dataBlockLength=%i",dataBlockLength);
|
||||
if (dataBlockLength>0)
|
||||
{
|
||||
readenBytesNb+=dataBlockLength;
|
||||
|
@ -411,9 +413,11 @@ static char rcsId[] = "$Id$";
|
|||
_value=[NSString string];
|
||||
NSDebugMLLog(@"low",@"_value:%@",_value);
|
||||
};
|
||||
NSDebugMLLog(@"low",@"key:%@ value:%@",_key,_value);
|
||||
if ([_key isEqualToString:GSWHTTPHeader_ContentLength])
|
||||
contentLength=[_value intValue];
|
||||
else if ([_key isEqualToString:GSWHTTPHeader_Method])
|
||||
else if ([_key isEqualToString:GSWHTTPHeader_Method[GSWNAMES_INDEX]]
|
||||
|| [_key isEqualToString:GSWHTTPHeader_Method[WONAMES_INDEX]])
|
||||
{
|
||||
if ([_value isEqualToString:GSWHTTPHeader_MethodPost])
|
||||
_requestMethod=REQUEST_METHOD__POST;
|
||||
|
@ -421,13 +425,21 @@ static char rcsId[] = "$Id$";
|
|||
_requestMethod=REQUEST_METHOD__GET;
|
||||
else
|
||||
{
|
||||
NSAssert1(NO,@"Unknwon method %@",_value);
|
||||
NSAssert1(NO,@"Unknown method %@",_value);
|
||||
};
|
||||
}
|
||||
else if ([_key isEqualToString:GSWHTTPHeader_UserAgent])
|
||||
_userAgent=_value;
|
||||
else if ([_key isEqualToString:GSWHTTPHeader_RemoteAddress])
|
||||
else if ([_key isEqualToString:GSWHTTPHeader_RemoteAddress[GSWNAMES_INDEX]]
|
||||
||[_key isEqualToString:GSWHTTPHeader_RemoteAddress[WONAMES_INDEX]])
|
||||
_remoteAddr=_value;
|
||||
if ([_key isEqualToString:GSWHTTPHeader_AdaptorVersion[GSWNAMES_INDEX]]
|
||||
|| [_key isEqualToString:GSWHTTPHeader_ServerName[GSWNAMES_INDEX]])
|
||||
requestNamingConv=GSWNAMES_INDEX;
|
||||
else if ([_key isEqualToString:GSWHTTPHeader_AdaptorVersion[WONAMES_INDEX]]
|
||||
|| [_key isEqualToString:GSWHTTPHeader_ServerName[WONAMES_INDEX]])
|
||||
requestNamingConv=WONAMES_INDEX;
|
||||
|
||||
_prevValue=[_headers objectForKey:_key];
|
||||
NSDebugMLLog(@"low",@"_prevValue:%@",_prevValue);
|
||||
if (_prevValue)
|
||||
|
@ -443,6 +455,7 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"_requestMethod=%d",_requestMethod);
|
||||
dataBytesNb=[_pendingData length];
|
||||
if (_isDataStep)
|
||||
{
|
||||
|
@ -556,7 +569,7 @@ static char rcsId[] = "$Id$";
|
|||
[response httpVersion],
|
||||
[response status],
|
||||
GSWHTTPHeader_Response_OK,
|
||||
GSWHTTPHeader_Response_HeaderLineEnd];
|
||||
GSWHTTPHeader_Response_HeaderLineEnd[requestNamingConv]];
|
||||
/* NSString* cl=[NSString stringWithFormat:@"%@: %d\n",
|
||||
GSWHTTPHeader_ContentLength,
|
||||
[[response content] length]];
|
||||
|
|
|
@ -162,7 +162,7 @@ static char rcsId[] = "$Id$";
|
|||
-(NSArray*)pathsForResourcesOfType:(NSString*)type_
|
||||
{
|
||||
//OK
|
||||
NSString* _paths=nil;
|
||||
NSArray* _paths=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"type_=%@ language_=%@",type_);
|
||||
[self lock];
|
||||
|
@ -252,22 +252,25 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"name_=%@ language_=%@",name_,language_);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying WebServerResources",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"WebServerResources"
|
||||
forLanguage:language_];
|
||||
//NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
if (!_path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"Resources"
|
||||
forLanguage:language_];
|
||||
//NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
if (!_path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying .",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"."
|
||||
forLanguage:language_];
|
||||
//NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
@ -282,22 +285,25 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"name_=%@ languages_=%@",name_,languages_);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying WebServerResources",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"WebServerResources"
|
||||
forLanguages:languages_];
|
||||
//NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
if (!_path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"Resources"
|
||||
forLanguages:languages_];
|
||||
//NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
if (!_path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying .",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"."
|
||||
forLanguages:languages_];
|
||||
//NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
@ -380,12 +386,12 @@ static char rcsId[] = "$Id$";
|
|||
[language_ stringByAppendingString:GSLanguagePSuffix]];
|
||||
//NSDebugMLLog(@"bundles",@"_pathTest=%@",_pathTest);
|
||||
_pathTest=[_pathTest stringByAppendingPathComponent:name_];
|
||||
//NSDebugMLLog(@"bundles",@"_pathTest=%@",_pathTest);
|
||||
NSDebugMLLog(@"bundles",@"_pathTest=%@",_pathTest);
|
||||
_completePathTest=[_bundlePath stringByAppendingPathComponent:_pathTest];
|
||||
//NSDebugMLLog(@"bundles",@"_completePathTest=%@",_completePathTest);
|
||||
NSDebugMLLog(@"bundles",@"_completePathTest=%@",_completePathTest);
|
||||
_fileManager=[NSFileManager defaultManager];
|
||||
_exists=[_fileManager fileExistsAtPath:_completePathTest];
|
||||
//NSDebugMLLog(@"bundles",@"_exists=%s",(_exists ? "YES" : "NO"));
|
||||
NSDebugMLLog(@"bundles",@"_exists=%s",(_exists ? "YES" : "NO"));
|
||||
if (_exists)
|
||||
{
|
||||
_path=_pathTest;
|
||||
|
|
|
@ -225,10 +225,10 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _gswsid=nil;
|
||||
LOGObjectFnStart();
|
||||
_request=[_context request];
|
||||
_gswsid=[_request formValueForKey:GSWKey_SessionID];
|
||||
_gswsid=[_request formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!_gswsid)
|
||||
{
|
||||
_gswsid=[_request cookieValueForKey:GSWKey_SessionID];
|
||||
_gswsid=[_request cookieValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
};
|
||||
if (_gswsid)
|
||||
{
|
||||
|
|
|
@ -110,7 +110,9 @@ static char rcsId[] = "$Id$";
|
|||
[_resourceManager _allFrameworkProjectBundles];//So what ?
|
||||
[_application awake];
|
||||
_class=NSClassFromString(_className);
|
||||
NSAssert1(_class,@"No direct action class named %@",_className);
|
||||
_directAction=[[_class alloc]initWithRequest:request_];
|
||||
NSAssert1(_directAction,@"Direct action of class named %@ can't be created",_className);
|
||||
_context=[_directAction _context];
|
||||
_actionResult=[_directAction performActionNamed:_actionName];
|
||||
_response=[_actionResult generateResponse];
|
||||
|
@ -176,7 +178,7 @@ static char rcsId[] = "$Id$";
|
|||
//OK
|
||||
NSArray* _submitActions=nil;
|
||||
LOGObjectFnStart();
|
||||
_submitActions=[_request formValuesForKey:GSWKey_SubmitAction];
|
||||
_submitActions=[_request formValuesForKey:GSWKey_SubmitAction[GSWebNamingConv]];
|
||||
if (_submitActions)
|
||||
{
|
||||
//TODO
|
||||
|
|
|
@ -317,7 +317,7 @@ static char rcsId[] = "$Id$";
|
|||
if (url)
|
||||
{
|
||||
int _length=[url length];
|
||||
NSDebugMLLog(@"low",@"url class=%@",[url class]);
|
||||
NSDebugMLLog(@"low",@"url %@ class=%@",url,[url class]);
|
||||
if (_length>0)
|
||||
[url deleteCharactersInRange:NSMakeRange(0,_length)];
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ static char rcsId[] = "$Id$";
|
|||
if (prefix)
|
||||
[url appendFormat:@"%@/",prefix];
|
||||
if (applicationName)
|
||||
[url appendFormat:@"%@.%@/",applicationName,GSWApplicationSuffix];
|
||||
[url appendFormat:@"%@.%@/",applicationName,GSWApplicationSuffix[GSWebNamingConv]];
|
||||
if (applicationNumber>=0)
|
||||
[url appendFormat:@"%d/",applicationNumber];
|
||||
if (requestHandlerKey)
|
||||
|
@ -350,6 +350,7 @@ static char rcsId[] = "$Id$";
|
|||
[url appendFormat:@"%@",requestHandlerPath];
|
||||
if (queryString)
|
||||
[url appendFormat:@"?%@",queryString];
|
||||
NSDebugMLLog(@"low",@"url %@ class=%@",url,[url class]);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -471,14 +472,16 @@ static char rcsId[] = "$Id$";
|
|||
*/
|
||||
for(tmpIndex=index;!prefix && tmpIndex<[_components count];tmpIndex++)
|
||||
{
|
||||
if ([[_components objectAtIndex:tmpIndex]hasSuffix:GSWApplicationPSuffix])
|
||||
{
|
||||
if (tmpIndex-index>1)
|
||||
{
|
||||
ASSIGN(prefix,[[_components subarrayWithRange:NSMakeRange(index,tmpIndex-index)]componentsJoinedByString:@"/"]);
|
||||
index=tmpIndex;//Stay on ApplicationName !
|
||||
};
|
||||
};
|
||||
NSString* tmp=[_components objectAtIndex:tmpIndex];
|
||||
if ([tmp hasSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]]
|
||||
|| [tmp hasSuffix:GSWApplicationPSuffix[WONAMES_INDEX]])
|
||||
{
|
||||
if (tmpIndex-index>1)
|
||||
{
|
||||
ASSIGN(prefix,[[_components subarrayWithRange:NSMakeRange(index,tmpIndex-index)]componentsJoinedByString:@"/"]);
|
||||
index=tmpIndex;//Stay on ApplicationName !
|
||||
};
|
||||
};
|
||||
};
|
||||
if (!prefix)
|
||||
{
|
||||
|
@ -495,20 +498,33 @@ static char rcsId[] = "$Id$";
|
|||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog(@"low",@"applicationName: _components [%@]",[_components subarrayWithRange:NSMakeRange(index,[_components count]-index)]);
|
||||
NSDebugMLLog(@"low",@"applicationName: _components [%@]",
|
||||
[_components subarrayWithRange:NSMakeRange(index,[_components count]-index)]);
|
||||
for(tmpIndex=index;!applicationName && tmpIndex<[_components count];tmpIndex++)
|
||||
{
|
||||
if ([[_components objectAtIndex:tmpIndex]hasSuffix:GSWApplicationPSuffix])
|
||||
NSString* tmp=[_components objectAtIndex:tmpIndex];
|
||||
NSString* appSuffix=nil;
|
||||
if ([tmp hasSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]])
|
||||
appSuffix=GSWApplicationPSuffix[GSWNAMES_INDEX];
|
||||
else if ([tmp hasSuffix:GSWApplicationPSuffix[WONAMES_INDEX]])
|
||||
appSuffix=GSWApplicationPSuffix[WONAMES_INDEX];
|
||||
if (appSuffix)
|
||||
{
|
||||
ASSIGN(applicationName,[[[_components subarrayWithRange:NSMakeRange(index,tmpIndex-index+1)]componentsJoinedByString:@"/"]stringWithoutSuffix:GSWApplicationPSuffix]);
|
||||
ASSIGN(applicationName,[[[_components
|
||||
subarrayWithRange:NSMakeRange(index,tmpIndex-index+1)]
|
||||
componentsJoinedByString:@"/"]
|
||||
stringWithoutSuffix:appSuffix]);
|
||||
index=tmpIndex+1;
|
||||
};
|
||||
};
|
||||
if (!applicationName)
|
||||
{
|
||||
NSString* tmp=[[_components subarrayWithRange:NSMakeRange(index,[_components count]-index)]componentsJoinedByString:@"/"];
|
||||
if ([tmp hasSuffix:GSWApplicationPSuffix])
|
||||
tmp=[tmp stringWithoutSuffix:GSWApplicationPSuffix];
|
||||
NSString* tmp=[[_components subarrayWithRange:NSMakeRange(index,[_components count]-index)]
|
||||
componentsJoinedByString:@"/"];
|
||||
if ([tmp hasSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]])
|
||||
tmp=[tmp stringWithoutSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]];
|
||||
else if ([tmp hasSuffix:GSWApplicationPSuffix[WONAMES_INDEX]])
|
||||
tmp=[tmp stringWithoutSuffix:GSWApplicationPSuffix[WONAMES_INDEX]];
|
||||
ASSIGN(applicationName,tmp);
|
||||
index=[_components count];
|
||||
};
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
GSWAssociation* actionClass;
|
||||
GSWAssociation* directActionName;
|
||||
GSWAssociation* queryDictionary;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* disabled;
|
||||
GSWAssociation* enabled;
|
||||
#endif
|
||||
// }
|
||||
NSDictionary* otherQueryAssociations;
|
||||
};
|
||||
|
||||
|
|
|
@ -49,11 +49,14 @@ static char rcsId[] = "$Id$";
|
|||
[_associations removeObjectForKey:href__Key];
|
||||
[_associations removeObjectForKey:multipleSubmit__Key];
|
||||
[_associations removeObjectForKey:actionClass__Key];
|
||||
if (directActionName) [_associations removeObjectForKey:directActionName];
|
||||
#if !GSWEB_STRICT
|
||||
[_associations removeObjectForKey:disabled__Key];
|
||||
[_associations removeObjectForKey:enabled__Key];
|
||||
#endif
|
||||
if (directActionName)
|
||||
[_associations removeObjectForKey:directActionName];
|
||||
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[_associations removeObjectForKey:disabled__Key];
|
||||
[_associations removeObjectForKey:enabled__Key];
|
||||
};
|
||||
[_associations removeObjectForKey:queryDictionary__Key];
|
||||
|
||||
//call isValueSettable sur value (return YES)
|
||||
|
@ -73,19 +76,20 @@ static char rcsId[] = "$Id$";
|
|||
withDefaultObject:[directActionName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: directActionName=%@",directActionName);
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
disabled = [[associations_ objectForKey:disabled__Key
|
||||
withDefaultObject:[disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm disabled=%@",disabled);
|
||||
enabled = [[associations_ objectForKey:enabled__Key
|
||||
withDefaultObject:[enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm enabled=%@",enabled);
|
||||
if (disabled && enabled)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
disabled = [[associations_ objectForKey:disabled__Key
|
||||
withDefaultObject:[disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm disabled=%@",disabled);
|
||||
enabled = [[associations_ objectForKey:enabled__Key
|
||||
withDefaultObject:[enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm enabled=%@",enabled);
|
||||
if (disabled && enabled)
|
||||
{
|
||||
ExceptionRaise(@"GSWForm",@"You can't specify 'disabled' and 'enabled' together. componentAssociations:%@",
|
||||
associations_);
|
||||
associations_);
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
queryDictionary = [[associations_ objectForKey:queryDictionary__Key
|
||||
withDefaultObject:[queryDictionary autorelease]] retain];
|
||||
|
@ -108,10 +112,8 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(actionClass);
|
||||
DESTROY(directActionName);
|
||||
DESTROY(queryDictionary);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(disabled);
|
||||
DESTROY(enabled);
|
||||
#endif
|
||||
DESTROY(otherQueryAssociations);
|
||||
[super dealloc];
|
||||
};
|
||||
|
@ -136,7 +138,7 @@ static char rcsId[] = "$Id$";
|
|||
//====================================================================
|
||||
@implementation GSWForm (GSWFormA)
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)disabledInContext:(GSWContext*)_context
|
||||
{
|
||||
|
@ -148,7 +150,7 @@ static char rcsId[] = "$Id$";
|
|||
return [self evaluateCondition:disabled
|
||||
inContext:_context];
|
||||
};
|
||||
#endif
|
||||
// }
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)compactHTMLTags
|
||||
{
|
||||
|
@ -171,7 +173,7 @@ static char rcsId[] = "$Id$";
|
|||
//TODO
|
||||
};
|
||||
_request=[context_ request];
|
||||
_gswsid=[_request formValueForKey:GSWKey_SessionID];
|
||||
_gswsid=[_request formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (_gswsid)
|
||||
{
|
||||
//TODO
|
||||
|
@ -195,9 +197,6 @@ static char rcsId[] = "$Id$";
|
|||
inContext:(GSWContext*)context_
|
||||
{
|
||||
//OK
|
||||
#if !GSWEB_STRICT
|
||||
BOOL _disabledInContext=NO;
|
||||
#endif
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
#endif
|
||||
|
@ -206,12 +205,15 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
GSWSaveAppendToResponseElementID(context_);//Debug Only
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
[context_ setInForm:!_disabledInContext];
|
||||
#else
|
||||
[context_ setInForm:YES];
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
BOOL _disabledInContext=NO;
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
[context_ setInForm:!_disabledInContext];
|
||||
}
|
||||
else
|
||||
[context_ setInForm:YES];
|
||||
|
||||
[self appendToResponse:response_
|
||||
inContext:context_
|
||||
elementsFromIndex:0
|
||||
|
@ -259,10 +261,9 @@ static char rcsId[] = "$Id$";
|
|||
_elementID,
|
||||
_senderID,
|
||||
(_isFormSubmited ? "YES" : "NO"));
|
||||
#if !GSWEB_STRICT
|
||||
if (_isFormSubmited && [self disabledInContext:context_])
|
||||
if (!WOStrictFlag && _isFormSubmited && [self disabledInContext:context_])
|
||||
_isFormSubmited=NO;
|
||||
#endif
|
||||
|
||||
if (_isFormSubmited)
|
||||
{
|
||||
[context_ setInForm:YES];
|
||||
|
@ -349,10 +350,8 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
_isFormSubmited=[_elementID isEqualToString:_senderID];
|
||||
NSDebugMLLog(@"gswdync",@"_isFormSubmited=%d",(int)_isFormSubmited);
|
||||
#if !GSWEB_STRICT
|
||||
if (_isFormSubmited && [self disabledInContext:context_])
|
||||
if (!WOStrictFlag && _isFormSubmited && [self disabledInContext:context_])
|
||||
_isFormSubmited=NO;
|
||||
#endif
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"Starting GSWForm TV ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
if (_isFormSubmited)
|
||||
|
@ -395,16 +394,15 @@ static char rcsId[] = "$Id$";
|
|||
inContext:(GSWContext*)context_
|
||||
{
|
||||
//OK//TODOV
|
||||
#if !GSWEB_STRICT
|
||||
BOOL _disabledInContext=NO;
|
||||
#endif
|
||||
LOGObjectFnStartC("GSWForm");
|
||||
#if !GSWEB_STRICT
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_disabledInContext=%s",(_disabledInContext ? "YES" : "NO"));
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_disabledInContext=%s",(_disabledInContext ? "YES" : "NO"));
|
||||
};
|
||||
if (!_disabledInContext)
|
||||
{
|
||||
#endif
|
||||
GSWComponent* _component=[context_ component];
|
||||
id _actionValue=nil;
|
||||
if (href)
|
||||
|
@ -417,9 +415,7 @@ static char rcsId[] = "$Id$";
|
|||
[response_ appendContentCharacter:'"'];
|
||||
[response_ appendContentString:_actionValue];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
LOGObjectFnStopC("GSWForm");
|
||||
};
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p - String:[%@]>",
|
||||
return [NSString stringWithFormat:@"<%s %p - String:[%s]>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
string];
|
||||
[string lossyCString]];
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -70,7 +70,7 @@ static char rcsId[] = "$Id$";
|
|||
[_htmlBareStrings addObject:[NSString stringWithString:@"="]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"%@",_associationValue]];
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"\"%@\"",_associationValue]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
}
|
||||
|
@ -93,14 +93,16 @@ static char rcsId[] = "$Id$";
|
|||
for(;elementsN>0;elementsN--)
|
||||
[_elementsMap appendBytes:&ElementsMap_dynamicElement
|
||||
length:1];
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
};
|
||||
};
|
||||
//VERIFY Only if _elements ?
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
|
||||
[self _initWithElementsMap:_elementsMap
|
||||
htmlBareStrings:_htmlBareStrings
|
||||
dynamicChildren:_elements];
|
||||
|
@ -145,14 +147,15 @@ static char rcsId[] = "$Id$";
|
|||
for(;elementsN>0;elementsN--)
|
||||
[_elementsMap appendBytes:&ElementsMap_dynamicElement
|
||||
length:1];
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
};
|
||||
};
|
||||
//VERIFY Only if _elements ?
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
[self _initWithElementsMap:_elementsMap
|
||||
htmlBareStrings:_htmlBareStrings
|
||||
dynamicChildren:_elements];
|
||||
|
@ -289,7 +292,7 @@ static char rcsId[] = "$Id$";
|
|||
//OK (verifier avec GSWSession appendToR
|
||||
GSWRequest* _request=[context_ request];
|
||||
BOOL _isFromClientComponent=[_request isFromClientComponent]; //bis repetitam
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ self=%p",[self class],[context_ elementID],self);
|
||||
GSWSaveAppendToResponseElementID(context_);//Debug Only
|
||||
if ([elementsMap length]>0)
|
||||
{
|
||||
|
@ -298,7 +301,7 @@ static char rcsId[] = "$Id$";
|
|||
elementsFromIndex:0
|
||||
toIndex:[elementsMap length]-1];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@ self=%p",[self class],[context_ elementID],self);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -322,17 +325,22 @@ static char rcsId[] = "$Id$";
|
|||
element=(BYTE)elements[elementN];
|
||||
if (element==ElementsMap_htmlBareString)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"%d:htmlBareString : %@",elementN,[htmlBareStrings objectAtIndex:elementsN[0]]);
|
||||
if (elementN>=_fromIndex)
|
||||
[response_ appendContentData:[[htmlBareStrings objectAtIndex:elementsN[0]] dataUsingEncoding:_encoding]];
|
||||
[response_ appendContentData:[[htmlBareStrings objectAtIndex:elementsN[0]]
|
||||
dataUsingEncoding:_encoding]];
|
||||
elementsN[0]++;
|
||||
}
|
||||
else if (element==ElementsMap_dynamicElement)
|
||||
{
|
||||
if (elementN>=_fromIndex)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[[_dynamicChildren objectAtIndex:elementsN[1]] class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"%d:dynamicElement : %@",elementN,[_dynamicChildren objectAtIndex:elementsN[1]]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",
|
||||
[[_dynamicChildren objectAtIndex:elementsN[1]] class],
|
||||
[context_ elementID]);
|
||||
[[_dynamicChildren objectAtIndex:elementsN[1]] appendToResponse:response_
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
[context_ incrementLastElementIDComponent];
|
||||
};
|
||||
elementsN[1]++;
|
||||
|
@ -340,6 +348,7 @@ static char rcsId[] = "$Id$";
|
|||
else if (element==ElementsMap_attributeElement)
|
||||
{
|
||||
//TODO
|
||||
NSDebugMLLog(@"gswdync",@"%d:attributeElement",elementN);
|
||||
elementsN[2]++;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
GSWAssociation* src;
|
||||
GSWAssociation* value;
|
||||
GSWAssociation* pageName;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
NSDictionary* pageSetVarAssociations;
|
||||
GSWAssociation* pageSetVarAssociationsDynamic;
|
||||
#endif
|
||||
// }
|
||||
GSWAssociation* filename;
|
||||
GSWAssociation* framework;
|
||||
GSWAssociation* data;
|
||||
|
|
|
@ -97,9 +97,10 @@ static char rcsId[] = "$Id$";
|
|||
[_associations removeObjectForKey:actionClass__Key];
|
||||
[_associations removeObjectForKey:directActionName__Key];
|
||||
[_associations removeObjectForKey:queryDictionary__Key];
|
||||
#if !GSWEB_STRICT
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
//pageSetVarAssociations//GNUstepWeb only
|
||||
{
|
||||
|
||||
NSDictionary* _pageSetVarAssociations=[associations_ associationsWithoutPrefix:pageSetVar__Prefix__Key
|
||||
removeFrom:_associations];
|
||||
if ([_pageSetVarAssociations count]>0)
|
||||
|
@ -109,9 +110,7 @@ static char rcsId[] = "$Id$";
|
|||
withDefaultObject:[pageSetVarAssociationsDynamic autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"pageSetVarAssociationsDynamic=%@",pageSetVarAssociationsDynamic);
|
||||
[_associations removeObjectForKey:pageSetVars__Key];
|
||||
};
|
||||
#endif
|
||||
|
||||
};
|
||||
if ((self=[super initWithName:[self elementName]//NEW
|
||||
attributeAssociations:_associations
|
||||
contentElements:elements_]))
|
||||
|
@ -127,10 +126,8 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(src);
|
||||
DESTROY(value);
|
||||
DESTROY(pageName);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(pageSetVarAssociations);//GNUstepWeb only
|
||||
DESTROY(pageSetVarAssociationsDynamic);
|
||||
#endif
|
||||
DESTROY(pageSetVarAssociationsDynamic);//GSWeb only
|
||||
DESTROY(filename);
|
||||
DESTROY(framework);
|
||||
DESTROY(data);
|
||||
|
@ -195,8 +192,7 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _pageNameValue=[pageName valueInComponent:_component];
|
||||
_element=[GSWApp pageWithName:_pageNameValue
|
||||
inContext:context_];
|
||||
#if !GSWEB_STRICT
|
||||
if (_element)//GNUstepWeb only
|
||||
if (!WOStrictFlag && _element)//GNUstepWeb only
|
||||
{
|
||||
if (pageSetVarAssociations)
|
||||
{
|
||||
|
@ -224,7 +220,6 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
};
|
||||
};
|
||||
#endif
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"GSWHTMLURLValuedElement invoke _element=%@",_element);
|
||||
//the end ?
|
||||
|
|
|
@ -38,23 +38,23 @@
|
|||
GSWAssociation* queryDictionary;
|
||||
GSWAssociation* actionClass;
|
||||
GSWAssociation* directActionName;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* enabled;
|
||||
GSWAssociation* displayDisabled;
|
||||
GSWAssociation* redirectURL;
|
||||
NSDictionary* pageSetVarAssociations;
|
||||
GSWAssociation* pageSetVarAssociationsDynamic;
|
||||
#endif
|
||||
// }
|
||||
NSDictionary* otherQueryAssociations;
|
||||
NSDictionary* otherAssociations;
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* filename;
|
||||
GSWAssociation* framework;
|
||||
GSWAssociation* data;
|
||||
GSWAssociation* mimeType;
|
||||
GSWAssociation* key;
|
||||
#endif
|
||||
// }
|
||||
GSWElement* children;
|
||||
};
|
||||
|
||||
|
|
|
@ -73,46 +73,45 @@ static char rcsId[] = "$Id$";
|
|||
withDefaultObject:[directActionName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"directActionName=%@",directActionName);
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
enabled = [[associations_ objectForKey:enabled__Key
|
||||
withDefaultObject:[enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"enabled=%@",enabled);
|
||||
if (disabled && enabled)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
enabled = [[associations_ objectForKey:enabled__Key
|
||||
withDefaultObject:[enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"enabled=%@",enabled);
|
||||
if (disabled && enabled)
|
||||
{
|
||||
ExceptionRaise(@"GSWHyperlink",@"You can't specify 'disabled' and 'enabled' together. componentAssociations:%@",
|
||||
associations_);
|
||||
associations_);
|
||||
};
|
||||
|
||||
displayDisabled = [[associations_ objectForKey:displayDisabled__Key
|
||||
withDefaultObject:[displayDisabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"displayDisabled=%@",displayDisabled);
|
||||
|
||||
redirectURL = [[associations_ objectForKey:redirectURL__Key
|
||||
withDefaultObject:[redirectURL autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"redirectURL=%@",redirectURL);
|
||||
|
||||
filename = [[associations_ objectForKey:filename__Key
|
||||
withDefaultObject:[filename autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"filename=%@",filename);
|
||||
|
||||
framework = [[associations_ objectForKey:framework__Key
|
||||
withDefaultObject:[framework autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"framework=%@",framework);
|
||||
|
||||
displayDisabled = [[associations_ objectForKey:displayDisabled__Key
|
||||
withDefaultObject:[displayDisabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"displayDisabled=%@",displayDisabled);
|
||||
|
||||
redirectURL = [[associations_ objectForKey:redirectURL__Key
|
||||
withDefaultObject:[redirectURL autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"redirectURL=%@",redirectURL);
|
||||
#endif
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
filename = [[associations_ objectForKey:filename__Key
|
||||
withDefaultObject:[filename autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"filename=%@",filename);
|
||||
|
||||
framework = [[associations_ objectForKey:framework__Key
|
||||
withDefaultObject:[framework autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"framework=%@",framework);
|
||||
|
||||
data = [[associations_ objectForKey:data__Key
|
||||
withDefaultObject:[data autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"data=%@",data);
|
||||
|
||||
mimeType = [[associations_ objectForKey:mimeType__Key
|
||||
withDefaultObject:[mimeType autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"mimeType=%@",mimeType);
|
||||
|
||||
key = [[associations_ objectForKey:key__Key
|
||||
withDefaultObject:[key autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"key=%@",key);
|
||||
#endif
|
||||
data = [[associations_ objectForKey:data__Key
|
||||
withDefaultObject:[data autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"data=%@",data);
|
||||
|
||||
mimeType = [[associations_ objectForKey:mimeType__Key
|
||||
withDefaultObject:[mimeType autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"mimeType=%@",mimeType);
|
||||
|
||||
key = [[associations_ objectForKey:key__Key
|
||||
withDefaultObject:[key autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"key=%@",key);
|
||||
};
|
||||
|
||||
_otherAssociations=[NSMutableDictionary dictionaryWithDictionary:associations_];
|
||||
[_otherAssociations removeObjectForKey:action__Key];
|
||||
|
@ -124,33 +123,31 @@ static char rcsId[] = "$Id$";
|
|||
[_otherAssociations removeObjectForKey:queryDictionary__Key];
|
||||
[_otherAssociations removeObjectForKey:actionClass__Key];
|
||||
[_otherAssociations removeObjectForKey:directActionName__Key];
|
||||
#if !GSWEB_STRICT
|
||||
[_otherAssociations removeObjectForKey:enabled__Key];
|
||||
[_otherAssociations removeObjectForKey:redirectURL__Key];
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[_otherAssociations removeObjectForKey:enabled__Key];
|
||||
[_otherAssociations removeObjectForKey:redirectURL__Key];
|
||||
|
||||
[_otherAssociations removeObjectForKey:filename__Key];
|
||||
[_otherAssociations removeObjectForKey:framework__Key];
|
||||
[_otherAssociations removeObjectForKey:data__Key];
|
||||
[_otherAssociations removeObjectForKey:mimeType__Key];
|
||||
[_otherAssociations removeObjectForKey:key__Key];
|
||||
};
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
[_otherAssociations removeObjectForKey:filename__Key];
|
||||
[_otherAssociations removeObjectForKey:framework__Key];
|
||||
[_otherAssociations removeObjectForKey:data__Key];
|
||||
[_otherAssociations removeObjectForKey:mimeType__Key];
|
||||
[_otherAssociations removeObjectForKey:key__Key];
|
||||
#endif
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
//pageSetVarAssociations//GNUstepWeb only
|
||||
{
|
||||
NSDictionary* _pageSetVarAssociations=[associations_ associationsWithoutPrefix:pageSetVar__Prefix__Key
|
||||
removeFrom:_otherAssociations];
|
||||
if ([_pageSetVarAssociations count]>0)
|
||||
if (!WOStrictFlag)
|
||||
//pageSetVarAssociations//GNUstepWeb only
|
||||
{
|
||||
NSDictionary* _pageSetVarAssociations=[associations_ associationsWithoutPrefix:pageSetVar__Prefix__Key
|
||||
removeFrom:_otherAssociations];
|
||||
if ([_pageSetVarAssociations count]>0)
|
||||
pageSetVarAssociations=[_pageSetVarAssociations retain];
|
||||
|
||||
pageSetVarAssociationsDynamic=[[associations_ objectForKey:pageSetVars__Key
|
||||
withDefaultObject:[pageSetVarAssociationsDynamic autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"pageSetVarAssociationsDynamic=%@",pageSetVarAssociationsDynamic);
|
||||
[_otherAssociations removeObjectForKey:pageSetVars__Key];
|
||||
};
|
||||
#endif
|
||||
|
||||
pageSetVarAssociationsDynamic=[[associations_ objectForKey:pageSetVars__Key
|
||||
withDefaultObject:[pageSetVarAssociationsDynamic autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"pageSetVarAssociationsDynamic=%@",pageSetVarAssociationsDynamic);
|
||||
[_otherAssociations removeObjectForKey:pageSetVars__Key];
|
||||
};
|
||||
|
||||
if ([_otherAssociations count]>0)
|
||||
otherAssociations=[[NSDictionary dictionaryWithDictionary:_otherAssociations] retain];
|
||||
|
@ -178,22 +175,18 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(queryDictionary);
|
||||
DESTROY(actionClass);
|
||||
DESTROY(directActionName);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(enabled);
|
||||
DESTROY(enabled);//GSWeb Only
|
||||
DESTROY(displayDisabled);
|
||||
DESTROY(redirectURL);
|
||||
DESTROY(pageSetVarAssociations);//GNUstepWeb only
|
||||
DESTROY(pageSetVarAssociationsDynamic);
|
||||
#endif
|
||||
DESTROY(otherQueryAssociations);
|
||||
DESTROY(otherAssociations);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(filename);
|
||||
DESTROY(framework);
|
||||
DESTROY(data);
|
||||
DESTROY(mimeType);
|
||||
DESTROY(key);
|
||||
#endif
|
||||
DESTROY(children);
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -218,9 +211,7 @@ static char rcsId[] = "$Id$";
|
|||
//OK (pageName/action/directActionName)
|
||||
GSWComponent* _component=[context_ component];
|
||||
BOOL _disabled=NO;
|
||||
#if !GSWEB_STRICT
|
||||
BOOL _displayDisabled=YES;
|
||||
#endif
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
#endif
|
||||
|
@ -233,13 +224,12 @@ static char rcsId[] = "$Id$";
|
|||
else if (enabled)
|
||||
_disabled=![self evaluateCondition:enabled
|
||||
inContext:context_];
|
||||
#if !GSWEB_STRICT
|
||||
if (disabled && displayDisabled)
|
||||
|
||||
if (!WOStrictFlag && disabled && displayDisabled)
|
||||
{
|
||||
_displayDisabled=[self evaluateCondition:displayDisabled
|
||||
inContext:context_];
|
||||
};
|
||||
#endif
|
||||
if (!_disabled)
|
||||
{
|
||||
[response_ _appendContentAsciiString:@"<A "];
|
||||
|
@ -271,8 +261,7 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"href=%@",href);
|
||||
NSDebugMLLog(@"gswdync",@"_hrefValue=%@",_hrefValue);
|
||||
}
|
||||
#if !GSWEB_STRICT
|
||||
else if (filename || data)
|
||||
else if (!WOStrictFlag && (filename || data))
|
||||
{
|
||||
NSString* _url=nil;
|
||||
NSString* _keyValue=nil;
|
||||
|
@ -326,7 +315,6 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
[response_ appendContentString:_url];
|
||||
};
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -384,7 +372,7 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Addintions {
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)context_
|
||||
{
|
||||
|
@ -398,7 +386,7 @@ static char rcsId[] = "$Id$";
|
|||
_frameworkName=[_component frameworkName];
|
||||
return _frameworkName;
|
||||
};
|
||||
#endif
|
||||
// }
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_appendCGIActionURLToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
|
@ -507,13 +495,11 @@ static char rcsId[] = "$Id$";
|
|||
if (_session)
|
||||
{
|
||||
if (!action && !pageName
|
||||
#if !GSWEB_STRICT
|
||||
&& !redirectURL) //??
|
||||
#endif
|
||||
&& (WOStrictFlag || (!WOStrictFlag && !redirectURL))) //??
|
||||
{
|
||||
NSString* _sessionID=[_session sessionID];
|
||||
[_queryDictionary setObject:_sessionID
|
||||
forKey:GSWKey_SessionID];
|
||||
forKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
};
|
||||
};
|
||||
//TODOV
|
||||
|
@ -587,8 +573,7 @@ static char rcsId[] = "$Id$";
|
|||
_element=[GSWApp pageWithName:_pageNameValue
|
||||
inContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_element=%@",_element);
|
||||
#if !GSWEB_STRICT
|
||||
if (_element)//GNUstepWeb only
|
||||
if (!WOStrictFlag && _element)//GNUstepWeb only
|
||||
{
|
||||
if (pageSetVarAssociations)
|
||||
{
|
||||
|
@ -616,10 +601,8 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
};
|
||||
};
|
||||
#endif
|
||||
}
|
||||
#if !GSWEB_STRICT
|
||||
else if (redirectURL) //GNUstepWeb only
|
||||
else if (!WOStrictFlag && redirectURL) //GNUstepWeb only
|
||||
{
|
||||
NSString* _url=[redirectURL valueInComponent:_component];
|
||||
id _redirectComponent = [GSWApp pageWithName:@"GSWRedirect"
|
||||
|
@ -627,7 +610,6 @@ static char rcsId[] = "$Id$";
|
|||
[_redirectComponent setURL:_url];
|
||||
_element=_redirectComponent;
|
||||
}
|
||||
#endif
|
||||
else if (href)
|
||||
{
|
||||
LOGSeriousError(@"We shouldn't come here (href=%@)",href);
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
@interface GSWImageButton: GSWInput
|
||||
{
|
||||
GSWAssociation* imageMapFileName;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* imageMapString;
|
||||
GSWAssociation* imageMapRegions;
|
||||
#endif
|
||||
// }
|
||||
GSWAssociation* action;
|
||||
GSWAssociation* actionClass;
|
||||
GSWAssociation* directActionName;
|
||||
|
|
|
@ -39,10 +39,11 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"name_=%@ associations_:%@ _elements=%@",name_,associations_,_elements);
|
||||
_associations=[NSMutableDictionary dictionaryWithDictionary:associations_];
|
||||
[_associations removeObjectForKey:imageMapFileName__Key];
|
||||
#if !GSWEB_STRICT
|
||||
[_associations removeObjectForKey:imageMapString__Key];
|
||||
[_associations removeObjectForKey:imageMapRegions__Key];
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[_associations removeObjectForKey:imageMapString__Key];
|
||||
[_associations removeObjectForKey:imageMapRegions__Key];
|
||||
};
|
||||
[_associations removeObjectForKey:action__Key];
|
||||
[_associations removeObjectForKey:actionClass__Key];
|
||||
[_associations removeObjectForKey:directActionName__Key];
|
||||
|
@ -73,24 +74,25 @@ static char rcsId[] = "$Id$";
|
|||
_imageMapDefNb++;
|
||||
NSDebugMLLog(@"gswdync",@"imageMapFileName=%@",imageMapFileName);
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
imageMapString = [[associations_ objectForKey:imageMapString__Key
|
||||
withDefaultObject:[imageMapString autorelease]] retain];
|
||||
if (imageMapString)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
imageMapString = [[associations_ objectForKey:imageMapString__Key
|
||||
withDefaultObject:[imageMapString autorelease]] retain];
|
||||
if (imageMapString)
|
||||
_imageMapDefNb++;
|
||||
|
||||
imageMapRegions = [[associations_ objectForKey:imageMapRegions__Key
|
||||
withDefaultObject:[imageMapRegions autorelease]] retain];
|
||||
if (imageMapRegions)
|
||||
|
||||
imageMapRegions = [[associations_ objectForKey:imageMapRegions__Key
|
||||
withDefaultObject:[imageMapRegions autorelease]] retain];
|
||||
if (imageMapRegions)
|
||||
_imageMapDefNb++;
|
||||
if (_imageMapDefNb>0)
|
||||
if (_imageMapDefNb>0)
|
||||
{
|
||||
ExceptionRaise(@"GSWActiveImage",@"you can't specify %@, %@ and %@",
|
||||
imageMapFileName__Key,
|
||||
imageMapString__Key,
|
||||
imageMapRegions__Key);
|
||||
imageMapFileName__Key,
|
||||
imageMapString__Key,
|
||||
imageMapRegions__Key);
|
||||
};
|
||||
#endif
|
||||
};
|
||||
actionClass = [[associations_ objectForKey:actionClass__Key
|
||||
withDefaultObject:[actionClass autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"actionClass=%@",actionClass);
|
||||
|
@ -132,10 +134,8 @@ static char rcsId[] = "$Id$";
|
|||
-(void)dealloc
|
||||
{
|
||||
DESTROY(imageMapFileName);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(imageMapString);
|
||||
DESTROY(imageMapRegions);
|
||||
#endif
|
||||
DESTROY(imageMapString);//GSWeb only
|
||||
DESTROY(imageMapRegions);//GSWeb Only
|
||||
DESTROY(action);
|
||||
DESTROY(actionClass);
|
||||
DESTROY(directActionName);
|
||||
|
@ -380,17 +380,15 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
};
|
||||
}
|
||||
#if !GSWEB_STRICT
|
||||
else if (imageMapString)
|
||||
else if (!WOStrictFlag && imageMapString)
|
||||
{
|
||||
id _imageMapValue=[imageMapString valueInComponent:_component];
|
||||
_regions=[GSWGeometricRegion geometricRegionsWithString:_imageMapValue];
|
||||
}
|
||||
else if (imageMapRegions)
|
||||
else if (!WOStrictFlag && imageMapRegions)
|
||||
{
|
||||
_regions=[imageMapRegions valueInComponent:_component];
|
||||
};
|
||||
#endif
|
||||
if (xAssoc)
|
||||
[xAssoc setValue:[NSNumber numberWithInt:_x]
|
||||
inComponent:_component];
|
||||
|
|
|
@ -31,14 +31,14 @@
|
|||
@interface GSWInput: GSWHTMLDynamicElement
|
||||
{
|
||||
GSWAssociation* disabled;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* enabled;
|
||||
#endif
|
||||
//}
|
||||
GSWAssociation* name;
|
||||
GSWAssociation* value;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* handleValidationException;
|
||||
#endif
|
||||
// }
|
||||
};
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
|
|
|
@ -39,9 +39,8 @@ static char rcsId[] = "$Id$";
|
|||
[_attributedAssociations removeObjectForKey:disabled__Key];
|
||||
[_attributedAssociations removeObjectForKey:enabled__Key];//??
|
||||
[_attributedAssociations removeObjectForKey:value__Key];//??
|
||||
#if !GSWEB_STRICT
|
||||
if (!WOStrictFlag)
|
||||
[_attributedAssociations removeObjectForKey:handleValidationException__Key];
|
||||
#endif
|
||||
value = [[associations_ objectForKey:value__Key
|
||||
withDefaultObject:[value autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWInput: value=%@",value);
|
||||
|
@ -52,24 +51,26 @@ static char rcsId[] = "$Id$";
|
|||
disabled = [[associations_ objectForKey:disabled__Key
|
||||
withDefaultObject:[disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWInput: disabled=%@",disabled);
|
||||
#if !GSWEB_STRICT
|
||||
enabled = [[associations_ objectForKey:enabled__Key
|
||||
withDefaultObject:[enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWInput: enabled=%@",enabled);
|
||||
if (disabled && enabled)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
enabled = [[associations_ objectForKey:enabled__Key
|
||||
withDefaultObject:[enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWInput: enabled=%@",enabled);
|
||||
if (disabled && enabled)
|
||||
{
|
||||
ExceptionRaise0(@"GSWInput",@"You can't use 'diabled' and 'enabled' parameters at the same time.");
|
||||
};
|
||||
#endif
|
||||
};
|
||||
name = [[associations_ objectForKey:name__Key
|
||||
withDefaultObject:[name autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWInput: name=%@",name);
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
handleValidationException = [[associations_ objectForKey:handleValidationException__Key
|
||||
withDefaultObject:[handleValidationException autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWInput: handleValidationException=%@",handleValidationException);
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
handleValidationException = [[associations_ objectForKey:handleValidationException__Key
|
||||
withDefaultObject:[handleValidationException autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWInput: handleValidationException=%@",handleValidationException);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWInput");
|
||||
return self;
|
||||
|
@ -79,14 +80,10 @@ static char rcsId[] = "$Id$";
|
|||
-(void)dealloc
|
||||
{
|
||||
DESTROY(disabled);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(enabled);
|
||||
#endif
|
||||
DESTROY(enabled);//GSWeb Only
|
||||
DESTROY(name);
|
||||
DESTROY(value);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(handleValidationException);
|
||||
#endif
|
||||
DESTROY(handleValidationException);//GSWeb Only
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -161,14 +158,12 @@ static int countAutoValue = 0;
|
|||
-(BOOL)disabledInContext:(GSWContext*)_context
|
||||
{
|
||||
//OK
|
||||
#if !GSWEB_STRICT
|
||||
if (enabled)
|
||||
return ![self evaluateCondition:enabled
|
||||
inContext:_context];
|
||||
if (!WOStrictFlag && enabled)
|
||||
return ![self evaluateCondition:enabled
|
||||
inContext:_context];
|
||||
else
|
||||
#endif
|
||||
return [self evaluateCondition:disabled
|
||||
inContext:_context];
|
||||
return [self evaluateCondition:disabled
|
||||
inContext:_context];
|
||||
};
|
||||
|
||||
@end
|
||||
|
@ -195,22 +190,23 @@ static int countAutoValue = 0;
|
|||
NSString* _value=[request_ formValueForKey:_nameInContext];
|
||||
NSDebugMLLog(@"gswdync",@"_nameInContext=%@",_nameInContext);
|
||||
NSDebugMLLog(@"gswdync",@"_value=%@",_value);
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[value setValue:_value
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[value setValue:_value
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
[value setValue:_value
|
||||
inComponent:_component];
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -302,7 +298,7 @@ static int countAutoValue = 0;
|
|||
//====================================================================
|
||||
@implementation GSWInput (GSWInputE)
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb additions {
|
||||
-(void)handleValidationException:(NSException*)exception_
|
||||
inContext:(GSWContext*)context_
|
||||
{
|
||||
|
@ -359,5 +355,5 @@ static int countAutoValue = 0;
|
|||
};
|
||||
LOGObjectFnStopC("GSWInput");
|
||||
};
|
||||
#endif
|
||||
// }
|
||||
@end
|
||||
|
|
|
@ -61,8 +61,11 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"associations",@"keyPath=%@ object_=%p",keyPath,(void*)object_);
|
||||
retValue=[GSWAssociation valueInObject:object_
|
||||
forKeyPath:keyPath];
|
||||
NSDebugMLLog(@"associations",@"retValue=%@ (class=%@)",retValue,[retValue class]);
|
||||
forKeyPath:keyPath];
|
||||
NSDebugMLLog(@"associations",@"retValue=%@ (%p) (class=%@)",
|
||||
retValue,
|
||||
retValue,
|
||||
[retValue class]);
|
||||
[self logTakeValue:retValue];
|
||||
LOGObjectFnStop();
|
||||
return retValue;
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
GSWAssociation* item;
|
||||
GSWAssociation* displayString;
|
||||
GSWAssociation* selection;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* selectionValue;
|
||||
#endif
|
||||
// }
|
||||
GSWAssociation* selectedValue;
|
||||
GSWAssociation* noSelectionString;
|
||||
GSWAssociation* escapeHTML;
|
||||
|
|
|
@ -42,9 +42,8 @@ static char rcsId[] = "$Id$";
|
|||
[_associations removeObjectForKey:item__Key];
|
||||
[_associations removeObjectForKey:displayString__Key];
|
||||
[_associations removeObjectForKey:selection__Key];
|
||||
#if !GSWEB_STRICT
|
||||
[_associations removeObjectForKey:selectionValue__Key];
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
[_associations removeObjectForKey:selectionValue__Key];
|
||||
[_associations removeObjectForKey:selectedValue__Key];
|
||||
[_associations removeObjectForKey:noSelectionString__Key];
|
||||
[_associations removeObjectForKey:escapeHTML__Key];
|
||||
|
@ -66,14 +65,15 @@ static char rcsId[] = "$Id$";
|
|||
//TODO
|
||||
};
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
selectionValue=[[associations_ objectForKey:selectionValue__Key
|
||||
withDefaultObject:[selectionValue autorelease]] retain];
|
||||
if (selectionValue && ![selectionValue isValueSettable])
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
selectionValue=[[associations_ objectForKey:selectionValue__Key
|
||||
withDefaultObject:[selectionValue autorelease]] retain];
|
||||
if (selectionValue && ![selectionValue isValueSettable])
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
selectedValue=[[associations_ objectForKey:selectedValue__Key
|
||||
withDefaultObject:[selectedValue autorelease]] retain];
|
||||
|
@ -93,9 +93,7 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(item);
|
||||
DESTROY(displayString);
|
||||
DESTROY(selection);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(selectionValue);
|
||||
#endif
|
||||
DESTROY(selectionValue);//GSWeb Only
|
||||
DESTROY(selectedValue);
|
||||
DESTROY(noSelectionString);
|
||||
DESTROY(escapeHTML);
|
||||
|
@ -408,40 +406,42 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"selection=%@",selection);
|
||||
if (selection)
|
||||
{
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[selection setValue:_itemValue
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[selection setValue:_itemValue
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
[selection setValue:_itemValue
|
||||
inComponent:_component];
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
NSDebugMLLog(@"gswdync",@"selectionValue=%@",selectionValue);
|
||||
if (selectionValue)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"selectionValue=%@",selectionValue);
|
||||
if (selectionValue)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[selectionValue setValue:_valueValue
|
||||
inComponent:_component];
|
||||
};
|
||||
{
|
||||
[selectionValue setValue:_valueValue
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
_found=YES;
|
||||
};
|
||||
};
|
||||
|
@ -451,25 +451,25 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
if (selection)
|
||||
{
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[selection setValue:nil
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[selection setValue:nil
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
[selection setValue:nil
|
||||
inComponent:_component];
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
if (selectionValue)
|
||||
if (!WOStrictFlag && selectionValue)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -483,7 +483,6 @@ static char rcsId[] = "$Id$";
|
|||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
-(id)initWithPath:(NSString*)path_;
|
||||
-(void)dealloc;
|
||||
-(NSString*)description;
|
||||
-(NSString*)lockedPathsForResourcesOfType:(id)type_;
|
||||
-(NSString*)lockedPathsForResourcesInSubprojectsOfType:(id)type_;
|
||||
-(NSArray*)lockedPathsForResourcesOfType:(id)type_;
|
||||
-(NSArray*)lockedPathsForResourcesInSubprojectsOfType:(id)type_;
|
||||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)name_
|
||||
forLanguage:(NSString*)language_;
|
||||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)name_
|
||||
|
|
|
@ -65,14 +65,14 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)lockedPathsForResourcesOfType:(id)type_
|
||||
-(NSArray*)lockedPathsForResourcesOfType:(id)type_
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return [super lockedPathsForResourcesOfType:type_];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)lockedPathsForResourcesInSubprojectsOfType:(id)type_
|
||||
-(NSArray*)lockedPathsForResourcesInSubprojectsOfType:(id)type_
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
@ -151,7 +151,7 @@ static char rcsId[] = "$Id$";
|
|||
NSEnumerator* _projectEnum = nil;
|
||||
NSEnumerator* _projectSearchPathEnum=nil;
|
||||
NSString* _path=nil;
|
||||
NSString* _suffix=isFramework_ ? GSFrameworkPSuffix : GSWApplicationPSuffix;
|
||||
NSString* _suffix=isFramework_ ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConv];
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"bundles",@"name_:%@",name_);
|
||||
NSDebugMLLog(@"bundles",@"isFramework_=%s",(isFramework_ ? "YES" : "NO"));
|
||||
|
|
|
@ -151,44 +151,46 @@ static char rcsId[] = "$Id$";
|
|||
_checkChecked=YES;
|
||||
if (selection)
|
||||
{
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[selection setValue:_valueValue
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[selection setValue:_valueValue
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
[selection setValue:_valueValue
|
||||
inComponent:_component];
|
||||
};
|
||||
};
|
||||
if (checked)
|
||||
{
|
||||
id _checkedValue=[NSNumber numberWithBool:_checkChecked];
|
||||
NSDebugMLLog(@"gswdync",@"_checkedValue=%@",_checkedValue);
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[checked setValue:_checkedValue
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[checked setValue:_checkedValue
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
[checked setValue:_checkedValue
|
||||
inComponent:_component];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -193,30 +193,33 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"_foundIndex=%d",_foundIndex);
|
||||
NSDebugMLLog(@"gswdync",@"selection=%@",selection);
|
||||
GSWLogAssertGood(_component);
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
if (_foundIndex>=0)
|
||||
[selection setValue:_valueToSet
|
||||
inComponent:_component];
|
||||
[selection setValue:_valueToSet
|
||||
inComponent:_component];
|
||||
else
|
||||
[selection setValue:nil
|
||||
inComponent:_component];
|
||||
[selection setValue:nil
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
if (_foundIndex>=0)
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_foundIndex>=0)
|
||||
[selection setValue:_valueToSet
|
||||
inComponent:_component];
|
||||
else
|
||||
inComponent:_component];
|
||||
else
|
||||
[selection setValue:nil
|
||||
inComponent:_component];
|
||||
#endif
|
||||
inComponent:_component];
|
||||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
//====================================================================
|
||||
@interface GSWRepetition: GSWDynamicElement
|
||||
{
|
||||
GSWAssociation* list;
|
||||
GSWAssociation* item;
|
||||
GSWAssociation* identifier;
|
||||
GSWAssociation* count;
|
||||
GSWAssociation* index;
|
||||
GSWHTMLStaticGroup* childrenGroup;
|
||||
GSWAssociation* _list;
|
||||
GSWAssociation* _item;
|
||||
GSWAssociation* _identifier;
|
||||
GSWAssociation* _count;
|
||||
GSWAssociation* _index;
|
||||
GSWHTMLStaticGroup* _childrenGroup;
|
||||
};
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
|
|
|
@ -29,57 +29,57 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWRepetition
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
contentElements:(NSArray*)elements_
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super initWithName:name_
|
||||
associations:nil
|
||||
template:nil]))
|
||||
{
|
||||
list=[[associations_ objectForKey:list__Key
|
||||
withDefaultObject:[list autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"list=%@",list);
|
||||
item=[[associations_ objectForKey:item__Key
|
||||
withDefaultObject:[item autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"item=%@",item);
|
||||
if (item && ![item isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWCheckBox",@"'item' parameter must be settable");
|
||||
};
|
||||
identifier=[[associations_ objectForKey:identifier__Key
|
||||
withDefaultObject:[identifier autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"identifier=%@",identifier);
|
||||
count=[[associations_ objectForKey:count__Key
|
||||
withDefaultObject:[count autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"count=%@",count);
|
||||
index=[[associations_ objectForKey:index__Key
|
||||
withDefaultObject:[index autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"index=%@",index);
|
||||
if (index && ![index isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWCheckBox",@"'index' parameter must be settable");
|
||||
};
|
||||
if (elements_)
|
||||
{
|
||||
childrenGroup=[[GSWHTMLStaticGroup alloc]initWithContentElements:elements_];
|
||||
};
|
||||
};
|
||||
if ((self=[super initWithName:name
|
||||
associations:nil
|
||||
template:nil]))
|
||||
{
|
||||
_list=[[associations objectForKey:list__Key
|
||||
withDefaultObject:[_list autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"list=%@",_list);
|
||||
_item=[[associations objectForKey:item__Key
|
||||
withDefaultObject:[_item autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"item=%@",_item);
|
||||
if (_item && ![_item isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWCheckBox",@"'item' parameter must be settable");
|
||||
};
|
||||
_identifier=[[associations objectForKey:identifier__Key
|
||||
withDefaultObject:[_identifier autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"identifier=%@",_identifier);
|
||||
_count=[[associations objectForKey:count__Key
|
||||
withDefaultObject:[_count autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"count=%@",_count);
|
||||
_index=[[associations objectForKey:index__Key
|
||||
withDefaultObject:[_index autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"index=%@",_index);
|
||||
if (_index && ![_index isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWCheckBox",@"'index' parameter must be settable");
|
||||
};
|
||||
if (elements)
|
||||
{
|
||||
_childrenGroup=[[GSWHTMLStaticGroup alloc]initWithContentElements:elements];
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
self=[self initWithName:name_
|
||||
associations:associations_
|
||||
contentElements:templateElement_ ? [NSArray arrayWithObject:templateElement_] : nil];
|
||||
self=[self initWithName:name
|
||||
associations:associations
|
||||
contentElements:templateElement ? [NSArray arrayWithObject:templateElement] : nil];
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
@ -87,12 +87,12 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(list);
|
||||
DESTROY(item);
|
||||
DESTROY(identifier);
|
||||
DESTROY(count);
|
||||
DESTROY(index);
|
||||
DESTROY(childrenGroup);
|
||||
DESTROY(_list);
|
||||
DESTROY(_item);
|
||||
DESTROY(_identifier);
|
||||
DESTROY(_count);
|
||||
DESTROY(_index);
|
||||
DESTROY(_childrenGroup);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -100,384 +100,396 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p>",
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWRepetition (GSWRepetitionA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWComponent* _component=nil;
|
||||
NSArray* _listValue=nil;
|
||||
GSWComponent* component=nil;
|
||||
NSArray* listValue=nil;
|
||||
int i=0;
|
||||
int _count=0;
|
||||
int countValue=0;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_component=[context_ component];
|
||||
if (list)
|
||||
{
|
||||
_listValue=[list valueInComponent:_component];
|
||||
NSAssert2(!_listValue || [_listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
list,
|
||||
[_listValue class]);
|
||||
_count=[_listValue count];
|
||||
};
|
||||
if (count)
|
||||
{
|
||||
id _tmpCountValue=[count valueInComponent:_component];
|
||||
int _tmpCount=0;
|
||||
NSAssert2([_tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) (of class:%@) doesn't respond to 'intValue'",
|
||||
count,
|
||||
[_tmpCountValue class]);
|
||||
_tmpCount=[_tmpCountValue intValue];
|
||||
_count=min(_tmpCount,_count);
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
component=[context component];
|
||||
if (_list)
|
||||
{
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSAssert2(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
[listValue class]);
|
||||
countValue=[listValue count];
|
||||
};
|
||||
if (_count)
|
||||
{
|
||||
id tmpCountValue=[_count valueInComponent:component];
|
||||
int tmpCount=0;
|
||||
NSAssert3(!tmpCountValue || [tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) value %@ (of class:%@) doesn't respond to 'intValue'",
|
||||
_count,
|
||||
tmpCountValue,
|
||||
[tmpCountValue class]);
|
||||
tmpCount=[tmpCountValue intValue];
|
||||
NSDebugMLog(@"tmpCount=%d",tmpCount);
|
||||
if (_list)
|
||||
countValue=min(tmpCount,countValue);
|
||||
else
|
||||
countValue=tmpCount;
|
||||
};
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"_count=%d",_count);
|
||||
for(i=0;i<_count;i++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"countValue=%d",countValue);
|
||||
for(i=0;i<countValue;i++)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
GSWElementIDString* debugElementID=[context_ elementID];
|
||||
GSWElementIDString* debugElementID=[context elementID];
|
||||
#endif
|
||||
[self startOneIterationWithIndex:i
|
||||
list:_listValue
|
||||
inContext:context_];
|
||||
[context_ appendZeroElementIDComponent];
|
||||
[childrenGroup appendToResponse:response_
|
||||
inContext:context_];
|
||||
[context_ deleteLastElementIDComponent];
|
||||
[self stopOneIterationWithIndex:i
|
||||
count:_count
|
||||
isLastOne:NO
|
||||
inContext:context_];
|
||||
[self startOneIterationWithIndex:i
|
||||
list:listValue
|
||||
inContext:context];
|
||||
[context appendZeroElementIDComponent];
|
||||
[_childrenGroup appendToResponse:response
|
||||
inContext:context];
|
||||
[context deleteLastElementIDComponent];
|
||||
[self stopOneIterationWithIndex:i
|
||||
count:countValue
|
||||
isLastOne:NO
|
||||
inContext:context];
|
||||
#ifndef NDEBUG
|
||||
if (![debugElementID isEqualToString:[context_ elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context_ elementID]=%@",[self class],debugElementID,[context_ elementID]);
|
||||
|
||||
};
|
||||
if (![debugElementID isEqualToString:[context elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context elementID]=%@",[self class],debugElementID,[context elementID]);
|
||||
|
||||
};
|
||||
#endif
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWRepetion appendToResponse: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context elementID]elementsNb],@"GSWRepetion appendToResponse: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWElement* _element=nil;
|
||||
BOOL _isInForm=NO;
|
||||
GSWElement* element=nil;
|
||||
BOOL isInForm=NO;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_isInForm=[context_ isInForm];
|
||||
NSDebugMLLog(@"gswdync",@"_isInForm=%s",_isInForm ? "YES" : "NO");
|
||||
if (_isInForm)
|
||||
_element=[self _slowInvokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
isInForm=[context isInForm];
|
||||
NSDebugMLLog(@"gswdync",@"isInForm=%s",isInForm ? "YES" : "NO");
|
||||
if (isInForm)
|
||||
element=[self _slowInvokeActionForRequest:request
|
||||
inContext:context];
|
||||
else
|
||||
_element=[self _fastInvokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_element=%@",_element);
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
element=[self _fastInvokeActionForRequest:request
|
||||
inContext:context];
|
||||
NSDebugMLLog(@"gswdync",@"element=%@",element);
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWRepetion invokeActionForRequest: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context elementID]elementsNb],@"GSWRepetion invokeActionForRequest: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWComponent* _component=nil;
|
||||
NSArray* _listValue=nil;
|
||||
GSWComponent* component=nil;
|
||||
NSArray* listValue=nil;
|
||||
int i=0;
|
||||
int _count=0;
|
||||
int countValue=0;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_component=[context_ component];
|
||||
if (list)
|
||||
{
|
||||
_listValue=[list valueInComponent:_component];
|
||||
NSAssert2(!_listValue || [_listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
list,
|
||||
[_listValue class]);
|
||||
_count=[_listValue count];
|
||||
};
|
||||
if (count)
|
||||
{
|
||||
id _tmpCountValue=[count valueInComponent:_component];
|
||||
int _tmpCount=0;
|
||||
NSAssert2(!_tmpCountValue || [_tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) (of class:%@) doesn't respond to 'intValue'",
|
||||
count,
|
||||
[_tmpCountValue class]);
|
||||
_tmpCount=[_tmpCountValue intValue];
|
||||
_count=min(_tmpCount,_count);
|
||||
};
|
||||
for(i=0;i<_count;i++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
component=[context component];
|
||||
if (_list)
|
||||
{
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSAssert2(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
[listValue class]);
|
||||
countValue=[listValue count];
|
||||
};
|
||||
if (_count)
|
||||
{
|
||||
id tmpCountValue=[_count valueInComponent:component];
|
||||
int tmpCount=0;
|
||||
NSAssert2(!tmpCountValue || [tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) (of class:%@) doesn't respond to 'intValue'",
|
||||
_count,
|
||||
[tmpCountValue class]);
|
||||
tmpCount=[tmpCountValue intValue];
|
||||
if (_list)
|
||||
countValue=min(tmpCount,countValue);
|
||||
else
|
||||
countValue=tmpCount;
|
||||
};
|
||||
for(i=0;i<countValue;i++)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
GSWElementIDString* debugElementID=[context_ elementID];
|
||||
GSWElementIDString* debugElementID=[context elementID];
|
||||
#endif
|
||||
[self startOneIterationWithIndex:i
|
||||
list:_listValue
|
||||
inContext:context_];
|
||||
[context_ appendZeroElementIDComponent];
|
||||
[childrenGroup takeValuesFromRequest:request_
|
||||
inContext:context_];
|
||||
[context_ deleteLastElementIDComponent];
|
||||
[self startOneIterationWithIndex:i
|
||||
list:listValue
|
||||
inContext:context];
|
||||
[context appendZeroElementIDComponent];
|
||||
[_childrenGroup takeValuesFromRequest:request
|
||||
inContext:context];
|
||||
[context deleteLastElementIDComponent];
|
||||
[self stopOneIterationWithIndex:i
|
||||
count:_count
|
||||
isLastOne:NO
|
||||
inContext:context_];
|
||||
count:countValue
|
||||
isLastOne:NO
|
||||
inContext:context];
|
||||
#ifndef NDEBUG
|
||||
if (![debugElementID isEqualToString:[context_ elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context_ elementID]=%@",[self class],debugElementID,[context_ elementID]);
|
||||
|
||||
};
|
||||
if (![debugElementID isEqualToString:[context elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context elementID]=%@",[self class],debugElementID,[context elementID]);
|
||||
|
||||
};
|
||||
#endif
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWRepetion takeValuesFromRequest: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context elementID]elementsNb],@"GSWRepetion takeValuesFromRequest: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)_slowInvokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)_slowInvokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWElement* _element=nil;
|
||||
GSWComponent* _component=nil;
|
||||
NSArray* _listValue=nil;
|
||||
GSWElement* element=nil;
|
||||
GSWComponent* component=nil;
|
||||
NSArray* listValue=nil;
|
||||
int i=0;
|
||||
int _count=0;
|
||||
int countValue=0;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_component=[context_ component];
|
||||
if (list)
|
||||
{
|
||||
_listValue=[list valueInComponent:_component];
|
||||
NSAssert2(!_listValue || [_listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
list,
|
||||
[_listValue class]);
|
||||
_count=[_listValue count];
|
||||
};
|
||||
if (count)
|
||||
{
|
||||
id _tmpCountValue=[count valueInComponent:_component];
|
||||
int _tmpCount=0;
|
||||
NSAssert2(!_tmpCountValue || [_tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) (of class:%@) doesn't respond to 'intValue'",
|
||||
count,
|
||||
[_tmpCountValue class]);
|
||||
_tmpCount=[_tmpCountValue intValue];
|
||||
_count=min(_tmpCount,_count);
|
||||
};
|
||||
for(i=0;!_element && i<_count;i++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
component=[context component];
|
||||
if (_list)
|
||||
{
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSAssert2(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
[listValue class]);
|
||||
countValue=[listValue count];
|
||||
};
|
||||
if (_count)
|
||||
{
|
||||
id tmpCountValue=[_count valueInComponent:component];
|
||||
int tmpCount=0;
|
||||
NSAssert2(!tmpCountValue || [tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) (of class:%@) doesn't respond to 'intValue'",
|
||||
_count,
|
||||
[tmpCountValue class]);
|
||||
tmpCount=[tmpCountValue intValue];
|
||||
if (_list)
|
||||
countValue=min(tmpCount,countValue);
|
||||
else
|
||||
countValue=tmpCount;
|
||||
};
|
||||
for(i=0;!element && i<countValue;i++)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
GSWElementIDString* debugElementID=[context_ elementID];
|
||||
GSWElementIDString* debugElementID=[context elementID];
|
||||
#endif
|
||||
[self startOneIterationWithIndex:i
|
||||
list:_listValue
|
||||
inContext:context_];
|
||||
[context_ appendZeroElementIDComponent];
|
||||
_element=[childrenGroup invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
[context_ deleteLastElementIDComponent];
|
||||
[self stopOneIterationWithIndex:i
|
||||
count:_count
|
||||
isLastOne:(_element!=nil)
|
||||
inContext:context_];
|
||||
[self startOneIterationWithIndex:i
|
||||
list:listValue
|
||||
inContext:context];
|
||||
[context appendZeroElementIDComponent];
|
||||
element=[_childrenGroup invokeActionForRequest:request
|
||||
inContext:context];
|
||||
[context deleteLastElementIDComponent];
|
||||
[self stopOneIterationWithIndex:i
|
||||
count:countValue
|
||||
isLastOne:(element!=nil)
|
||||
inContext:context];
|
||||
#ifndef NDEBUG
|
||||
if (![debugElementID isEqualToString:[context_ elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context_ elementID]=%@",[self class],debugElementID,[context_ elementID]);
|
||||
|
||||
};
|
||||
if (![debugElementID isEqualToString:[context elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context elementID]=%@",[self class],debugElementID,[context elementID]);
|
||||
};
|
||||
#endif
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWRepetion _slowInvokeActionForRequest: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context elementID]elementsNb],@"GSWRepetion _slowInvokeActionForRequest: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)_fastInvokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)_fastInvokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWElement* _element=nil;
|
||||
NSString* _senderID=nil;
|
||||
NSString* _elementID=nil;
|
||||
GSWElement* element=nil;
|
||||
NSString* senderID=nil;
|
||||
NSString* elementID=nil;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_senderID=[context_ senderID];
|
||||
NSDebugMLLog(@"gswdync",@"_senderID=%@",_senderID);
|
||||
_elementID=[context_ elementID];
|
||||
NSDebugMLLog(@"gswdync",@"_elementID=%@",_elementID);
|
||||
if ([_senderID hasPrefix:_elementID])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
senderID=[context senderID];
|
||||
NSDebugMLLog(@"gswdync",@"senderID=%@",senderID);
|
||||
elementID=[context elementID];
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",elementID);
|
||||
if ([senderID hasPrefix:elementID])
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
GSWElementIDString* debugElementID=[context_ elementID];
|
||||
GSWElementIDString* debugElementID=[context elementID];
|
||||
#endif
|
||||
int _count=0;
|
||||
NSArray* _listValue=nil;
|
||||
int i=0;
|
||||
GSWComponent* _component=[context_ component];
|
||||
if (list)
|
||||
{
|
||||
_listValue=[list valueInComponent:_component];
|
||||
NSAssert2(!_listValue || [_listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
list,
|
||||
[_listValue class]);
|
||||
_count=[_listValue count];
|
||||
};
|
||||
if (count)
|
||||
{
|
||||
id _tmpCountValue=[count valueInComponent:_component];
|
||||
int _tmpCount=0;
|
||||
NSAssert2(!_tmpCountValue || [_tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) (of class:%@) doesn't respond to 'intValue'",
|
||||
count,
|
||||
[_tmpCountValue class]);
|
||||
_tmpCount=[_tmpCountValue intValue];
|
||||
_count=min(_tmpCount,_count);
|
||||
};
|
||||
for(i=0;!_element && i<_count;i++)
|
||||
{
|
||||
[self startOneIterationWithIndex:i
|
||||
list:_listValue
|
||||
inContext:context_];
|
||||
[context_ appendZeroElementIDComponent];
|
||||
_element=[childrenGroup invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_element=%@",_element);
|
||||
[context_ deleteLastElementIDComponent];
|
||||
[self stopOneIterationWithIndex:i
|
||||
count:_count
|
||||
isLastOne:(_element!=nil)
|
||||
inContext:context_];
|
||||
int countValue=0;
|
||||
NSArray* listValue=nil;
|
||||
int i=0;
|
||||
GSWComponent* component=[context component];
|
||||
if (_list)
|
||||
{
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSAssert2(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
[listValue class]);
|
||||
countValue=[listValue count];
|
||||
};
|
||||
if (_count)
|
||||
{
|
||||
id tmpCountValue=[_count valueInComponent:component];
|
||||
int tmpCount=0;
|
||||
NSAssert2(!tmpCountValue || [tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) (of class:%@) doesn't respond to 'intValue'",
|
||||
_count,
|
||||
[tmpCountValue class]);
|
||||
tmpCount=[tmpCountValue intValue];
|
||||
if (_list)
|
||||
countValue=min(tmpCount,countValue);
|
||||
else
|
||||
countValue=tmpCount;
|
||||
};
|
||||
for(i=0;!element && i<countValue;i++)
|
||||
{
|
||||
[self startOneIterationWithIndex:i
|
||||
list:listValue
|
||||
inContext:context];
|
||||
[context appendZeroElementIDComponent];
|
||||
element=[_childrenGroup invokeActionForRequest:request
|
||||
inContext:context];
|
||||
NSDebugMLLog(@"gswdync",@"element=%@",element);
|
||||
[context deleteLastElementIDComponent];
|
||||
[self stopOneIterationWithIndex:i
|
||||
count:countValue
|
||||
isLastOne:(element!=nil)
|
||||
inContext:context];
|
||||
#ifndef NDEBUG
|
||||
if (![debugElementID isEqualToString:[context_ elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context_ elementID]=%@",[self class],debugElementID,[context_ elementID]);
|
||||
|
||||
};
|
||||
if (![debugElementID isEqualToString:[context elementID]])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"class=%@ debugElementID=%@ [context elementID]=%@",[self class],debugElementID,[context elementID]);
|
||||
};
|
||||
#endif
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"_element=%@",_element);
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"element=%@",element);
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWRepetion _fastInvokeActionForRequest: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context elementID]elementsNb],@"GSWRepetion _fastInvokeActionForRequest: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)stopOneIterationWithIndex:(int)index_
|
||||
count:(int)count_
|
||||
isLastOne:(BOOL)isLastOne_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)stopOneIterationWithIndex:(int)currentIndex
|
||||
count:(int)count
|
||||
isLastOne:(BOOL)isLastOne
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if (index_==(count_-1) || isLastOne_)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
GSWComponent* _component=[context_ component];
|
||||
if (list && item)
|
||||
[item setValue:nil //??
|
||||
inComponent:_component];
|
||||
if (index)
|
||||
[index setValue:[NSNumber numberWithShort:0]
|
||||
inComponent:_component];
|
||||
[context_ deleteLastElementIDComponent];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In stopOneIterationWithIndex");
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
if (currentIndex==(count-1) || isLastOne)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
GSWComponent* component=[context component];
|
||||
if (_list && _item)
|
||||
[_item setValue:nil //??
|
||||
inComponent:component];
|
||||
if (_index)
|
||||
[_index setValue:[NSNumber numberWithShort:0]
|
||||
inComponent:component];
|
||||
[context deleteLastElementIDComponent];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In stopOneIterationWithIndex");
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)startOneIterationWithIndex:(unsigned int)index_
|
||||
list:(NSArray*)list_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)startOneIterationWithIndex:(unsigned int)currentIndex
|
||||
list:(NSArray*)list
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWComponent* _component=nil;
|
||||
GSWComponent* component=nil;
|
||||
LOGObjectFnStart();
|
||||
NS_DURING
|
||||
{
|
||||
_component=[context_ component];
|
||||
NSDebugMLLog(@"gswdync",@"item=%@",item);
|
||||
if (list && item)
|
||||
[item setValue:[list_ objectAtIndex:index_]
|
||||
inComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"index_=%d",index_);
|
||||
NSDebugMLLog(@"gswdync",@"index=%@",index);
|
||||
if (index)
|
||||
[index setValue:[NSNumber numberWithShort:index_]
|
||||
inComponent:_component];
|
||||
if (index_==0)
|
||||
[context_ appendZeroElementIDComponent];
|
||||
else
|
||||
[context_ incrementLastElementIDComponent];
|
||||
}
|
||||
{
|
||||
component=[context component];
|
||||
NSDebugMLLog(@"gswdync",@"_item=%@",_item);
|
||||
if (_list && _item)
|
||||
[_item setValue:[list objectAtIndex:currentIndex]
|
||||
inComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"currentIndex=%d",currentIndex);
|
||||
NSDebugMLLog(@"gswdync",@"_index=%@",_index);
|
||||
if (_index)
|
||||
[_index setValue:[NSNumber numberWithShort:currentIndex]
|
||||
inComponent:component];
|
||||
if (currentIndex==0)
|
||||
[context appendZeroElementIDComponent];
|
||||
else
|
||||
[context incrementLastElementIDComponent];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In startOneIterationWithIndex");
|
||||
[localException raise];
|
||||
}
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In startOneIterationWithIndex");
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
|
|
@ -52,7 +52,9 @@ static char rcsId[] = "$Id$";
|
|||
[self _initCookieDictionary];//NDFN
|
||||
applicationNumber=-9999;
|
||||
{
|
||||
NSString* _adaptorVersion=[self headerForKey:GSWHTTPHeader_AdaptorVersion];
|
||||
NSString* _adaptorVersion=[self headerForKey:GSWHTTPHeader_AdaptorVersion[GSWebNamingConv]];
|
||||
if (!_adaptorVersion)
|
||||
_adaptorVersion=[self headerForKey:GSWHTTPHeader_AdaptorVersion[GSWebNamingConvInversed]];
|
||||
NSDebugMLLog(@"requests",@"_adaptorVersion=%@",_adaptorVersion);
|
||||
[self _setIsUsingWebServer:(_adaptorVersion!=nil)];//??
|
||||
};
|
||||
|
@ -198,42 +200,46 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)urlProtocol
|
||||
{
|
||||
//TODO
|
||||
NSString* _urlProtocol=[uri urlProtocol];
|
||||
if (!_urlProtocol)
|
||||
_urlProtocol=GSWProtocol_HTTP;
|
||||
return _urlProtocol;
|
||||
NSString* urlProtocol=[uri urlProtocol];
|
||||
if (!urlProtocol)
|
||||
urlProtocol=GSWProtocol_HTTP;
|
||||
return urlProtocol;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSString*)urlHost
|
||||
{
|
||||
NSString* _urlHost=[uri urlHost];
|
||||
if (!_urlHost)
|
||||
_urlHost=[self headerForKey:GSWHTTPHeader_ServerName];
|
||||
return _urlHost;
|
||||
NSString* urlHost=[uri urlHost];
|
||||
if (!urlHost)
|
||||
urlHost=[self headerForKey:GSWHTTPHeader_ServerName[GSWebNamingConv]];
|
||||
if (!urlHost)
|
||||
urlHost=[self headerForKey:GSWHTTPHeader_ServerName[GSWebNamingConvInversed]];
|
||||
return urlHost;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSString*)urlPortString
|
||||
{
|
||||
NSString* _urlPortString=[uri urlPortString];
|
||||
if (!_urlPortString)
|
||||
{
|
||||
_urlPortString=[self headerForKey:GSWHTTPHeader_ServerPort];
|
||||
};
|
||||
return _urlPortString;
|
||||
NSString* urlPortString=[uri urlPortString];
|
||||
if (!urlPortString)
|
||||
urlPortString=[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConv]];
|
||||
if (!urlPortString)
|
||||
urlPortString=[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConvInversed]];
|
||||
return urlPortString;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(int)urlPort
|
||||
{
|
||||
int _port=[uri urlPort];
|
||||
if (!_port)
|
||||
_port=[[self headerForKey:GSWHTTPHeader_ServerPort]intValue];
|
||||
return _port;
|
||||
int port=[uri urlPort];
|
||||
if (!port)
|
||||
port=[[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConv]]intValue];
|
||||
if (!port)
|
||||
port=[[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConvInversed]]intValue];
|
||||
return port;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -516,7 +522,7 @@ method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultF
|
|||
NSString* _remoteInvocationPost=nil;
|
||||
BOOL _isFromClientComponent=NO;
|
||||
LOGObjectFnStart();
|
||||
_remoteInvocationPost=[self formValueForKey:GSWFormValue_RemoteInvocationPost];
|
||||
_remoteInvocationPost=[self formValueForKey:GSWFormValue_RemoteInvocationPost[GSWebNamingConv]];
|
||||
_isFromClientComponent=(_remoteInvocationPost!=nil);
|
||||
LOGObjectFnStop();
|
||||
return _isFromClientComponent;
|
||||
|
@ -696,7 +702,9 @@ method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultF
|
|||
NSDictionary* _uriElements=nil;
|
||||
LOGObjectFnStart();
|
||||
_uriElements=[self uriOrFormOrCookiesElements];
|
||||
_sessionID=[_uriElements objectForKey:GSWKey_SessionID];
|
||||
_sessionID=[_uriElements objectForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!_sessionID)
|
||||
_sessionID=[_uriElements objectForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
||||
LOGObjectFnStop();
|
||||
return _sessionID;
|
||||
};
|
||||
|
@ -734,7 +742,9 @@ method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultF
|
|||
if (applicationNumber==-9999)
|
||||
{
|
||||
NSDictionary* _uriElements=[self uriOrFormOrCookiesElements];
|
||||
NSString* _applicationNumber=[_uriElements objectForKey:GSWKey_InstanceID];
|
||||
NSString* _applicationNumber=[_uriElements objectForKey:GSWKey_InstanceID[GSWebNamingConv]];
|
||||
if (!_applicationNumber)
|
||||
_applicationNumber=[_uriElements objectForKey:GSWKey_InstanceID[GSWebNamingConvInversed]];
|
||||
applicationNumber=[_applicationNumber intValue];
|
||||
};
|
||||
return applicationNumber;
|
||||
|
@ -903,20 +913,32 @@ method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultF
|
|||
//--------------------------------------------------------------------
|
||||
-(BOOL)_isSessionIDinRequest
|
||||
{
|
||||
id ID=nil;
|
||||
NSDictionary* _uriElements=[self uriElements];
|
||||
return ([_uriElements objectForKey:GSWKey_SessionID]!=nil);
|
||||
ID=[_uriElements objectForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!ID)
|
||||
ID=[_uriElements objectForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
||||
return (ID!=nil);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)_isSessionIDinCookies
|
||||
{
|
||||
return ([self cookieValueForKey:GSWKey_SessionID]!=nil);
|
||||
id ID=nil;
|
||||
ID=[self cookieValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!ID)
|
||||
ID=[self cookieValueForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
||||
return (ID!=nil);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)_isSessionIDinFormValues
|
||||
{
|
||||
return ([self formValueForKey:GSWKey_SessionID]!=nil);
|
||||
id ID=nil;
|
||||
ID=[self formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!ID)
|
||||
ID=[self formValueForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
||||
return (ID!=nil);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -1544,16 +1566,24 @@ into
|
|||
// pageName
|
||||
-(NSString*)pageName
|
||||
{
|
||||
NSString* pageName=nil;
|
||||
NSDictionary* _uriElements=[self uriOrFormOrCookiesElements];
|
||||
return [_uriElements objectForKey:GSWKey_PageName];
|
||||
pageName=[_uriElements objectForKey:GSWKey_PageName[GSWebNamingConv]];
|
||||
if (!pageName)
|
||||
pageName=[_uriElements objectForKey:GSWKey_PageName[GSWebNamingConvInversed]];
|
||||
return pageName;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// senderID
|
||||
-(NSString*)senderID
|
||||
{
|
||||
NSString* senderID=nil;
|
||||
NSDictionary* _uriElements=[self uriOrFormOrCookiesElements];
|
||||
return [_uriElements objectForKey:GSWKey_ElementID];
|
||||
senderID=[_uriElements objectForKey:GSWKey_ElementID[GSWebNamingConv]];
|
||||
if (!senderID)
|
||||
senderID=[_uriElements objectForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
||||
return senderID;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -1565,7 +1595,9 @@ into
|
|||
NSDictionary* _uriElements=nil;
|
||||
LOGObjectFnStart();
|
||||
_uriElements=[self uriOrFormOrCookiesElements];
|
||||
_contextID=[_uriElements objectForKey:GSWKey_ContextID];
|
||||
_contextID=[_uriElements objectForKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
if (!_contextID)
|
||||
_contextID=[_uriElements objectForKey:GSWKey_ContextID[GSWebNamingConvInversed]];
|
||||
LOGObjectFnStop();
|
||||
return _contextID;
|
||||
};
|
||||
|
@ -1578,58 +1610,136 @@ into
|
|||
NSMutableDictionary* _uriElements=nil;
|
||||
LOGObjectFnStart();
|
||||
_uriElements=[self uriElements];
|
||||
if (![_uriElements objectForKey:GSWKey_SessionID])
|
||||
if (![_uriElements objectForKey:GSWKey_SessionID[GSWebNamingConv]])
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_SessionID];
|
||||
if (!_tmp)
|
||||
_tmp=[self cookieValueForKey:GSWKey_SessionID];
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_SessionID];
|
||||
_tmp=[_uriElements objectForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
};
|
||||
if (![_uriElements objectForKey:GSWKey_ContextID])
|
||||
if (![_uriElements objectForKey:GSWKey_ContextID[GSWebNamingConv]])
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ContextID];
|
||||
if (!_tmp)
|
||||
_tmp=[self cookieValueForKey:GSWKey_ContextID];
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_ContextID];
|
||||
_tmp=[_uriElements objectForKey:GSWKey_ContextID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ContextID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_ContextID[GSWebNamingConvInversed]];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
};
|
||||
if (![_uriElements objectForKey:GSWKey_ElementID])
|
||||
if (![_uriElements objectForKey:GSWKey_ElementID[GSWebNamingConv]])
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ElementID];
|
||||
if (!_tmp)
|
||||
_tmp=[self cookieValueForKey:GSWKey_ElementID];
|
||||
_tmp=[_uriElements objectForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ElementID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_ElementID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_ContextID];
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
};
|
||||
|
||||
if (![_uriElements objectForKey:GSWKey_ElementID])
|
||||
if (![_uriElements objectForKey:GSWKey_ElementID[GSWebNamingConv]])
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ElementID];
|
||||
if (!_tmp)
|
||||
_tmp=[self cookieValueForKey:GSWKey_ElementID];
|
||||
_tmp=[_uriElements objectForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ElementID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_ElementID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_ContextID];
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
};
|
||||
if (![_uriElements objectForKey:GSWKey_InstanceID])
|
||||
if (![_uriElements objectForKey:GSWKey_InstanceID[GSWebNamingConv]])
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_InstanceID];
|
||||
if (!_tmp)
|
||||
_tmp=[self cookieValueForKey:GSWKey_InstanceID];
|
||||
_tmp=[_uriElements objectForKey:GSWKey_InstanceID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_InstanceID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_InstanceID[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_InstanceID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self cookieValueForKey:GSWKey_InstanceID[GSWebNamingConvInversed]];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_InstanceID];
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_InstanceID[GSWebNamingConv]];
|
||||
};
|
||||
if (![_uriElements objectForKey:GSWKey_Data])
|
||||
if (![_uriElements objectForKey:GSWKey_Data[GSWebNamingConv]])
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_Data];
|
||||
_tmp=[_uriElements objectForKey:GSWKey_Data[GSWebNamingConvInversed]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_Data[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
{
|
||||
_tmp=[self formValueForKey:GSWKey_Data[GSWebNamingConvInversed]];
|
||||
};
|
||||
};
|
||||
if (_tmp)
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_Data];
|
||||
[_uriElements setObject:_tmp
|
||||
forKey:GSWKey_Data[GSWebNamingConv]];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _uriElements;
|
||||
|
@ -1654,7 +1764,9 @@ into
|
|||
_dict=[NSMutableDictionary new];
|
||||
//NEW//TODO
|
||||
_requestHandlerKey=[((GSWDynamicURLString*)[self uri]) urlRequestHandlerKey];
|
||||
if (!_requestHandlerKey || ![_requestHandlerKey isEqualToString:GSWDirectActionRequestHandlerKey])
|
||||
if (!_requestHandlerKey
|
||||
|| (![_requestHandlerKey isEqualToString:GSWDirectActionRequestHandlerKey[GSWebNamingConv]]
|
||||
&&![_requestHandlerKey isEqualToString:GSWDirectActionRequestHandlerKey[GSWebNamingConvInversed]]))
|
||||
{
|
||||
_requestHandlerPathArray=[self requestHandlerPathArray];
|
||||
NSDebugMLLog(@"requests",@"_requestHandlerPathArray=%@",_requestHandlerPathArray);
|
||||
|
@ -1662,12 +1774,18 @@ into
|
|||
{
|
||||
tmp=[_requestHandlerPathArray objectAtIndex:_index];
|
||||
NSDebugMLLog(@"requests",@"tmp=%@",tmp);
|
||||
if ([tmp hasSuffix:GSWPagePSuffix])
|
||||
{
|
||||
_gswpage=[tmp stringWithoutSuffix:GSWPagePSuffix];
|
||||
NSDebugMLLog(@"requests",@"_gswpage=%@",_gswpage);
|
||||
_index++;
|
||||
};
|
||||
if ([tmp hasSuffix:GSWPagePSuffix[GSWebNamingConv]])
|
||||
{
|
||||
_gswpage=[tmp stringWithoutSuffix:GSWPagePSuffix[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"requests",@"_gswpage=%@",_gswpage);
|
||||
_index++;
|
||||
}
|
||||
else if ([tmp hasSuffix:GSWPagePSuffix[GSWebNamingConvInversed]])
|
||||
{
|
||||
_gswpage=[tmp stringWithoutSuffix:GSWPagePSuffix[GSWebNamingConvInversed]];
|
||||
NSDebugMLLog(@"requests",@"_gswpage=%@",_gswpage);
|
||||
_index++;
|
||||
};
|
||||
if ([_requestHandlerPathArray count]>_index)
|
||||
{
|
||||
_gswsid=[_requestHandlerPathArray objectAtIndex:_index];
|
||||
|
@ -1710,30 +1828,32 @@ into
|
|||
|
||||
if (_gswpage)
|
||||
[_dict setObject:_gswpage
|
||||
forKey:GSWKey_PageName];
|
||||
forKey:GSWKey_PageName[GSWebNamingConv]];
|
||||
|
||||
if (_gswsid)
|
||||
[_dict setObject:_gswsid
|
||||
forKey:GSWKey_SessionID];
|
||||
forKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
|
||||
if (_gswcid)
|
||||
[_dict setObject:_gswcid
|
||||
forKey:GSWKey_ContextID];
|
||||
forKey:GSWKey_ContextID[GSWebNamingConv]];
|
||||
|
||||
if (_gsweid)
|
||||
[_dict setObject:_gsweid
|
||||
forKey:GSWKey_ElementID];
|
||||
forKey:GSWKey_ElementID[GSWebNamingConv]];
|
||||
|
||||
_applicationNumber=[uri urlApplicationNumber];
|
||||
if (_applicationNumber<0)
|
||||
{
|
||||
NSString* _tmp=[self cookieValueForKey:GSWKey_InstanceID];
|
||||
NSString* _tmp=[self cookieValueForKey:GSWKey_InstanceID[GSWebNamingConv]];
|
||||
if (!_tmp)
|
||||
_tmp=[self cookieValueForKey:GSWKey_InstanceID[GSWebNamingConvInversed]];
|
||||
if (_tmp)
|
||||
_applicationNumber=[_gswinst intValue];
|
||||
_applicationNumber=[_gswinst intValue];
|
||||
};
|
||||
if (_applicationNumber>=0)
|
||||
[_dict setObject:[NSString stringWithFormat:@"%d",_applicationNumber]
|
||||
forKey:GSWKey_InstanceID];
|
||||
forKey:GSWKey_InstanceID[GSWebNamingConv]];
|
||||
|
||||
NSDebugMLLog(@"requests",@"AA _dict=%@",_dict);
|
||||
LOGObjectFnStop();
|
||||
|
|
|
@ -453,23 +453,15 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _language=nil;
|
||||
int i=0;
|
||||
int _count=0;
|
||||
#if !GSWEB_STRICT
|
||||
int iFramework=0;
|
||||
NSArray* _frameworks=nil;
|
||||
#endif
|
||||
NSString* _frameworkName=nil;
|
||||
LOGObjectFnStart();
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
_count=[languages_ count];
|
||||
NSDebugMLLog(@"resmanager",@"languages_=%@",languages_);
|
||||
NSDebugMLLog(@"resmanager",@"_frameworks=%@",_frameworks);
|
||||
|
@ -479,20 +471,16 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_language=[languages_ objectAtIndex:i];
|
||||
else
|
||||
_language=nil;
|
||||
#if !GSWEB_STRICT
|
||||
for(iFramework=0;!_string && iFramework<[_frameworks count];iFramework++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:iFramework];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
_frameworkName=nil;
|
||||
_string=[self lockedCachedStringForKey:key_
|
||||
inTableNamed:tableName_
|
||||
inFramework:_frameworkName
|
||||
language:_language];
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _string;
|
||||
|
@ -509,40 +497,30 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _language=nil;
|
||||
int i=0;
|
||||
int _count=0;
|
||||
#if !GSWEB_STRICT
|
||||
int iFramework=0;
|
||||
NSArray* _frameworks=nil;
|
||||
#endif
|
||||
NSString* _frameworkName=nil;
|
||||
LOGObjectFnStart();
|
||||
_count=[languages_ count];
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
for(i=0;!_stringsTable && i<_count;i++)
|
||||
{
|
||||
_language=[languages_ objectAtIndex:i];
|
||||
#if !GSWEB_STRICT
|
||||
for(iFramework=0;!_stringsTable && iFramework<[_frameworks count];iFramework++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:iFramework];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
_stringsTable=[self lockedCachedStringsTableWithName:tableName_
|
||||
inFramework:_frameworkName
|
||||
language:_language];
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _stringsTable;
|
||||
|
@ -559,40 +537,30 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _language=nil;
|
||||
int i=0;
|
||||
int _count=0;
|
||||
#if !GSWEB_STRICT
|
||||
int iFramework=0;
|
||||
NSArray* _frameworks=nil;
|
||||
#endif
|
||||
NSString* _frameworkName=nil;
|
||||
LOGObjectFnStart();
|
||||
_count=[languages_ count];
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
for(i=0;!_stringsTableArray && i<_count;i++)
|
||||
{
|
||||
_language=[languages_ objectAtIndex:i];
|
||||
#if !GSWEB_STRICT
|
||||
for(iFramework=0;!_stringsTableArray && iFramework<[_frameworks count];iFramework++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:iFramework];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
_stringsTableArray=[self lockedCachedStringsTableArrayWithName:tableName_
|
||||
inFramework:_frameworkName
|
||||
language:_language];
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _stringsTableArray;
|
||||
|
@ -659,33 +627,25 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _path=nil;
|
||||
GSWDeployedBundle* _bundle=nil;
|
||||
NSString* _resourceName=nil;
|
||||
#if !GSWEB_STRICT
|
||||
int i=0;
|
||||
NSArray* _frameworks=nil;
|
||||
#endif
|
||||
NSString* _frameworkName=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"resmanager",@"tableName_=%@ frameworkName_=%@ language_=%@",tableName_,frameworkName_,language_);
|
||||
_resourceName=[tableName_ stringByAppendingString:GSWStringTablePSuffix];
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
for(i=0;!_path && i<[_frameworks count];i++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:i];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
if (_frameworkName)
|
||||
{
|
||||
// NSDebugMLLog(@"resmanager",@"frameworkName=%@",frameworkName_);
|
||||
|
@ -714,9 +674,7 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_path=[_applicationPath stringByAppendingPathComponent:_relativePath];
|
||||
};
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
// NSDebugMLLog(@"resmanager",@"_path=%@",_path);
|
||||
if (_path)
|
||||
{
|
||||
|
@ -747,33 +705,26 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _path=nil;
|
||||
GSWDeployedBundle* _bundle=nil;
|
||||
NSString* _resourceName=nil;
|
||||
#if !GSWEB_STRICT
|
||||
int i=0;
|
||||
NSArray* _frameworks=nil;
|
||||
#endif
|
||||
NSString* _frameworkName=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"resmanager",@"tableName_=%@ frameworkName_=%@ language_=%@",tableName_,frameworkName_,language_);
|
||||
_resourceName=[tableName_ stringByAppendingString:GSWStringTableArrayPSuffix];
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
for(i=0;!_path && i<[_frameworks count];i++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:i];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
|
||||
if (_frameworkName)
|
||||
{
|
||||
// NSDebugMLLog(@"resmanager",@"frameworkName=%@",frameworkName_);
|
||||
|
@ -802,9 +753,7 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_path=[_applicationPath stringByAppendingPathComponent:_relativePath];
|
||||
};
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
// NSDebugMLLog(@"resmanager",@"_path=%@",_path);
|
||||
if (_path)
|
||||
{
|
||||
|
@ -864,11 +813,11 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_path=[NSString stringWithFormat:@"ERROR_NOT_FOUND_framework_*%@*_filename_%@",
|
||||
frameworkName_,
|
||||
name_];
|
||||
_url=[_request _urlWithRequestHandlerKey:GSWResourceRequestHandlerKey
|
||||
_url=[_request _urlWithRequestHandlerKey:GSWResourceRequestHandlerKey[GSWebNamingConv]
|
||||
path:nil
|
||||
queryString:[NSString stringWithFormat:
|
||||
@"%@=%@",
|
||||
GSWKey_Data,
|
||||
GSWKey_Data[GSWebNamingConv],
|
||||
_path]];//TODO Escape
|
||||
};
|
||||
// NSDebugMLLog(@"resmanager",@"[frameworkProjectBundlesCache count]=%d",[frameworkProjectBundlesCache count]);
|
||||
|
@ -886,32 +835,24 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _url=nil;
|
||||
NSString* _relativePath=nil;
|
||||
GSWDeployedBundle* _bundle=nil;
|
||||
#if !GSWEB_STRICT
|
||||
int i=0;
|
||||
NSArray* _frameworks=nil;
|
||||
#endif
|
||||
NSString* _frameworkName=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"resmanager",@"name_=%@ frameworkName_=%@ languages_=%@",name_,frameworkName_,languages_);
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
for(i=0;!_url && i<[_frameworks count];i++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:i];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
if (_frameworkName)
|
||||
{
|
||||
// NSDebugMLLog(@"resmanager",@"frameworkName=%@",_frameworkName);
|
||||
|
@ -952,9 +893,7 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_url=[_url stringByAppendingPathComponent:_relativePath];
|
||||
};
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
if (!_url)
|
||||
{
|
||||
LOGSeriousError(@"No URL for resource named: %@ in framework named: %@ for languages: %@",
|
||||
|
@ -977,37 +916,30 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _path=nil;
|
||||
NSString* _relativePath=nil;
|
||||
GSWDeployedBundle* _bundle=nil;
|
||||
#if !GSWEB_STRICT
|
||||
int i=0;
|
||||
NSArray* _frameworks=nil;
|
||||
NSString* _frameworkName=nil;
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"resmanager",@"name_=%@ frameworkName_=%@ languages_=%@",name_,frameworkName_,languages_);
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
NSDebugMLLog(@"resmanager",@"frameworks=%@",_frameworks);
|
||||
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
for(i=0;!_path && i<[_frameworks count];i++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:i];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
if (_frameworkName)
|
||||
{
|
||||
// NSDebugMLLog(@"resmanager",@"frameworkName=%@",_frameworkName);
|
||||
_bundle=[self lockedCachedBundleForFrameworkNamed:_frameworkName];
|
||||
NSDebugMLLog(@"resmanager",@"bundle=%@",_bundle);
|
||||
if (_bundle)
|
||||
{
|
||||
// NSDebugMLLog(@"resmanager",@"found cached bundle=%@",_bundle);
|
||||
|
@ -1032,9 +964,7 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_path=[_applicationPath stringByAppendingPathComponent:_relativePath];
|
||||
};
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
// NSDebugMLLog(@"resmanager",@"_path=%@",_path);
|
||||
LOGObjectFnStop();
|
||||
return _path;
|
||||
|
@ -1234,33 +1164,26 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSString* _path=nil;
|
||||
NSString* _relativePath=nil;
|
||||
GSWDeployedBundle* _bundle=nil;
|
||||
#if !GSWEB_STRICT
|
||||
int i=0;
|
||||
NSArray* _frameworks=nil;
|
||||
#endif
|
||||
NSString* _frameworkName=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"resmanager",@"name_=%@ frameworkName_=%@ language_=%@",name_,frameworkName_,language_);
|
||||
// NSDebugMLLog(@"resmanager",@"frameworkProjectBundlesCache=%@",frameworkProjectBundlesCache);
|
||||
#if !GSWEB_STRICT
|
||||
if ([frameworkName_ isEqualToString:GSWFramework_all])
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
#else
|
||||
_frameworkName=frameworkName_;
|
||||
#endif
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
for(i=0;!_path && i<[_frameworks count];i++)
|
||||
{
|
||||
_frameworkName=[_frameworks objectAtIndex:i];
|
||||
if ([_frameworkName length]==0)
|
||||
_frameworkName=nil;
|
||||
#endif
|
||||
|
||||
if (_frameworkName)
|
||||
{
|
||||
// NSDebugMLLog(@"resmanager",@"frameworkName=%@",_frameworkName);
|
||||
|
@ -1289,9 +1212,7 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_path=[_applicationPath stringByAppendingPathComponent:_relativePath];
|
||||
};
|
||||
};
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
#endif
|
||||
// NSDebugMLLog(@"resmanager",@"_path=%@",_path);
|
||||
LOGObjectFnStop();
|
||||
return _path;
|
||||
|
|
|
@ -39,7 +39,7 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStart();
|
||||
_elements=[request_ uriOrFormOrCookiesElements];
|
||||
NSDebugMLog(@"_elements=%@",_elements);
|
||||
_gswdata=[_elements objectForKey:GSWKey_Data];
|
||||
_gswdata=[_elements objectForKey:GSWKey_Data[GSWebNamingConv]];
|
||||
NSDebugMLog(@"_gswdata=%@",_gswdata);
|
||||
if (_gswdata)
|
||||
_response=[self _responseForDataCachedWithKey:_gswdata];
|
||||
|
|
|
@ -327,13 +327,29 @@ NSStringEncoding globalDefaultEncoding=NSISOLatin1StringEncoding;
|
|||
|
||||
-(void)appendContentString:(NSString*)string_
|
||||
{
|
||||
NSData* newData=nil;
|
||||
NSString* _string=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"low",@"response=%p string_:%@",self,string_);
|
||||
_string=[NSString stringWithObject:string_];
|
||||
newData=[_string dataUsingEncoding:contentEncoding];
|
||||
[contentData appendData:newData];
|
||||
NSDebugMLLog(@"low",@"response=%p contentEncoding=%d",self,(int)contentEncoding);
|
||||
if (string_)
|
||||
{
|
||||
NSData* newData=nil;
|
||||
NSString* _string=nil;
|
||||
_string=[NSString stringWithObject:string_];
|
||||
NSAssert(_string,@"Can't get string from object");
|
||||
#ifndef NDEBUG
|
||||
NSAssert3(![_string isKindOfClass:[NSString class]] || [_string canBeConvertedToEncoding:contentEncoding],
|
||||
@"string %s (of class %@) can't be converted to encoding %d",
|
||||
[_string lossyCString],
|
||||
[_string class],
|
||||
contentEncoding);
|
||||
#endif
|
||||
newData=[_string dataUsingEncoding:contentEncoding];
|
||||
NSAssert3(newData,@"Can't create data from %@ \"%s\" using encoding %d",
|
||||
[_string class],
|
||||
([_string isKindOfClass:[NSString class]] ? [_string lossyCString] : @"**Not a string**"),
|
||||
(int)contentEncoding);
|
||||
NSDebugMLLog(@"low",@"newData=%@",newData);
|
||||
[contentData appendData:newData];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -350,6 +366,7 @@ NSStringEncoding globalDefaultEncoding=NSISOLatin1StringEncoding;
|
|||
|
||||
-(void)setContentEncoding:(NSStringEncoding)encoding_
|
||||
{
|
||||
NSDebugMLLog(@"low",@"setContentEncoding:%d",(int)encoding_);
|
||||
contentEncoding=encoding_;
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStart();
|
||||
if ((self = [super init]))
|
||||
{
|
||||
NSTimeInterval _sessionTimeOut=(NSTimeInterval)[[GSWApplication sessionTimeOut] intValue];
|
||||
NSTimeInterval _sessionTimeOut=[GSWApplication sessionTimeOutValue];
|
||||
NSDebugMLLog(@"sessions",@"_sessionTimeOut=%ld",(long)_sessionTimeOut);
|
||||
[self setTimeOut:_sessionTimeOut];
|
||||
[self _initWithSessionID:[NSString stringUniqueIdWithLength:8]]; //TODO
|
||||
|
@ -200,7 +200,7 @@ static char rcsId[] = "$Id$";
|
|||
_domain=[NSString stringWithFormat:@"%@/%@.%@",
|
||||
_adaptorPrefix,
|
||||
_applicationName,
|
||||
GSWApplicationSuffix];
|
||||
GSWApplicationSuffix[GSWebNamingConv]];
|
||||
LOGObjectFnStop();
|
||||
return _domain;
|
||||
};
|
||||
|
@ -315,8 +315,8 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
isTerminating=YES;
|
||||
_sessionID=[self sessionID];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:GSWNotification__SessionDidTimeOutNotification
|
||||
object:_sessionID];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:GSWNotification__SessionDidTimeOutNotification[GSWebNamingConv]
|
||||
object:_sessionID];
|
||||
//goto => GSWApp _sessionDidTimeOutNotification:
|
||||
//call GSWApp _discountTerminatedSession
|
||||
//call GSWApp statisticsStore
|
||||
|
@ -549,13 +549,13 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStart();
|
||||
_domainForIDCookies=[self domainForIDCookies];
|
||||
_sessionID=[self sessionID];
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_SessionID
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_SessionID[GSWebNamingConv]
|
||||
value:_sessionID
|
||||
path:_domainForIDCookies
|
||||
domain:nil
|
||||
expires:[self expirationDateForIDCookies]
|
||||
isSecure:NO]];
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_InstanceID
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_InstanceID[GSWebNamingConv]
|
||||
value:@"-1" //TODO
|
||||
path:_domainForIDCookies
|
||||
domain:nil
|
||||
|
@ -577,14 +577,14 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _sessionID=nil;
|
||||
_domainForIDCookies=[self domainForIDCookies];
|
||||
_sessionID=[self sessionID];
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_SessionID
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_SessionID[GSWebNamingConv]
|
||||
value:_sessionID
|
||||
path:_domainForIDCookies
|
||||
domain:nil
|
||||
expires:[self expirationDateForIDCookies]
|
||||
isSecure:NO]];
|
||||
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_InstanceID
|
||||
[_response addCookie:[GSWCookie cookieWithName:GSWKey_InstanceID[GSWebNamingConv]
|
||||
value:@"1" //TODO
|
||||
path:_domainForIDCookies
|
||||
domain:nil
|
||||
|
@ -599,7 +599,7 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//====================================================================
|
||||
@implementation GSWSession (GSWSessionG)
|
||||
|
||||
extern id gcObjectsToBeVisited;
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_releaseAutoreleasePool
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(sessionTimeOuts);
|
||||
DESTROY(sessionOrderedTimeOuts);
|
||||
DESTROY(sessionTimeOuts);
|
||||
//Do Not Retain ! DESTROY(target);
|
||||
DESTROY(timer);
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
GSWAssociation* dateFormat;
|
||||
GSWAssociation* numberFormat;
|
||||
GSWAssociation* escapeHTML;
|
||||
#if !GSWEB_STRICT
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* convertHTML;
|
||||
GSWAssociation* convertHTMLEntities;
|
||||
#endif
|
||||
// }
|
||||
GSWAssociation* formatter;
|
||||
};
|
||||
|
||||
|
|
|
@ -58,15 +58,16 @@ static char rcsId[] = "$Id$";
|
|||
withDefaultObject:[escapeHTML autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWString: escapeHTML=%@",escapeHTML);
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
convertHTML = [[associations_ objectForKey:convertHTML__Key
|
||||
withDefaultObject:[convertHTML autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWString: convertHTML=%@",convertHTML);
|
||||
|
||||
convertHTMLEntities = [[associations_ objectForKey:convertHTMLEntities__Key
|
||||
withDefaultObject:[convertHTMLEntities autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWString: convertHTMLEntities=%@",convertHTMLEntities);
|
||||
#endif
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
convertHTML = [[associations_ objectForKey:convertHTML__Key
|
||||
withDefaultObject:[convertHTML autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWString: convertHTML=%@",convertHTML);
|
||||
|
||||
convertHTMLEntities = [[associations_ objectForKey:convertHTMLEntities__Key
|
||||
withDefaultObject:[convertHTMLEntities autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWString: convertHTMLEntities=%@",convertHTMLEntities);
|
||||
};
|
||||
|
||||
formatter = [[associations_ objectForKey:formatter__Key
|
||||
withDefaultObject:[formatter autorelease]] retain];
|
||||
|
@ -84,10 +85,8 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(dateFormat);
|
||||
DESTROY(numberFormat);
|
||||
DESTROY(escapeHTML);
|
||||
#if !GSWEB_STRICT
|
||||
DESTROY(convertHTML);
|
||||
DESTROY(convertHTMLEntities);
|
||||
#endif
|
||||
DESTROY(convertHTML); //GSWeb Only
|
||||
DESTROY(convertHTMLEntities); //GSWeb Only
|
||||
DESTROY(formatter);
|
||||
[super dealloc];
|
||||
};
|
||||
|
@ -127,10 +126,8 @@ static char rcsId[] = "$Id$";
|
|||
if (_valueValue)
|
||||
{
|
||||
BOOL _escapeHTMLValue=YES;
|
||||
#if !GSWEB_STRICT
|
||||
BOOL _convertHTMLValue=NO;
|
||||
BOOL _convertHTMLEntitiesValue=NO;
|
||||
#endif
|
||||
NSFormatter* _formatter=[self formatterForComponent:_component
|
||||
value:_valueValue];
|
||||
if (!_formatter)
|
||||
|
@ -142,37 +139,36 @@ static char rcsId[] = "$Id$";
|
|||
_formattedValue=[_formatter stringForObjectValue:_valueValue];
|
||||
};
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
if (convertHTML)
|
||||
if (!WOStrictFlag && convertHTML)
|
||||
_convertHTMLValue=[self evaluateCondition:convertHTML
|
||||
inContext:context_];
|
||||
if (!_convertHTMLValue)
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
if (!_convertHTMLValue)
|
||||
{
|
||||
if (convertHTMLEntities)
|
||||
_convertHTMLEntitiesValue=[self evaluateCondition:convertHTMLEntities
|
||||
inContext:context_];
|
||||
if (!_convertHTMLEntitiesValue)
|
||||
{
|
||||
#endif
|
||||
if (escapeHTML)
|
||||
_escapeHTMLValue=[self evaluateCondition:escapeHTML
|
||||
inContext:context_];
|
||||
#if !GSWEB_STRICT
|
||||
};
|
||||
};
|
||||
#endif
|
||||
}
|
||||
else if (escapeHTML)
|
||||
_escapeHTMLValue=[self evaluateCondition:escapeHTML
|
||||
inContext:context_];
|
||||
|
||||
#if !GSWEB_STRICT
|
||||
if (_convertHTMLValue)
|
||||
if (!WOStrictFlag && _convertHTMLValue)
|
||||
[response_ appendContentHTMLConvertString:_formattedValue];
|
||||
else if (_convertHTMLEntitiesValue)
|
||||
else if (!WOStrictFlag && _convertHTMLEntitiesValue)
|
||||
[response_ appendContentHTMLEntitiesConvertString:_formattedValue];
|
||||
else
|
||||
#endif
|
||||
if (_escapeHTMLValue)
|
||||
[response_ appendContentHTMLString:_formattedValue];
|
||||
else
|
||||
[response_ appendContentString:_formattedValue];
|
||||
else if (_escapeHTMLValue)
|
||||
[response_ appendContentHTMLString:_formattedValue];
|
||||
else
|
||||
[response_ appendContentString:_formattedValue];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
LOGObjectFnStopC("GSWString");
|
||||
|
|
|
@ -36,9 +36,11 @@
|
|||
NSString* _stringPath;
|
||||
NSString* _definitionsString;
|
||||
NSArray* _languages;
|
||||
NSString* _definitionsPath;
|
||||
NSMutableSet* _definitionFilePath;
|
||||
GSWElement* _template;
|
||||
NSDictionary* _definitions;
|
||||
int gswebTagN;
|
||||
int tagN;
|
||||
}
|
||||
|
||||
+(GSWElement*)templateNamed:(NSString*)name_
|
||||
|
@ -79,16 +81,16 @@
|
|||
-(NSDictionary*)parseDefinitionsString:(NSString*)localDefinitionstring_
|
||||
named:(NSString*)localDefinitionName_
|
||||
inFrameworkNamed:(NSString*)localFrameworkName_
|
||||
fromPath:(NSString*)localDefinitionPath_;
|
||||
processedFiles:(NSMutableSet*)processedFiles;
|
||||
|
||||
-(NSDictionary*)parseDefinitionInclude:(NSString*)includeName_
|
||||
fromFrameworkNamed:(NSString*)fromFrameworkName_
|
||||
definitionPath:(NSString*)localDefinitionPath_;
|
||||
processedFiles:(NSMutableSet*)processedFiles;
|
||||
|
||||
-(NSDictionary*)processIncludes:(NSArray*)definitionsIncludes_
|
||||
named:(NSString*)localDefinitionsName_
|
||||
inFrameworkNamed:(NSString*)localFrameworkName_
|
||||
definitionPath:(NSString*)localDefinitionPath_;
|
||||
processedFiles:(NSMutableSet*)processedFiles;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
GSWElement* resultTemplate=nil;
|
||||
Class parserClass=Nil;
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"low",@"definitionPath_=%@",definitionPath_);
|
||||
if (parserClassName)
|
||||
{
|
||||
parserClass=NSClassFromString(parserClassName);
|
||||
|
@ -110,6 +111,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
GSWTemplateParser* templateParser=nil;
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"low",@"template named:%@ frameworkName:%@ pageDefString=%@",name_,frameworkName_,pageDefString);
|
||||
NSDebugMLLog(@"low",@"definitionPath_=%@",definitionPath_);
|
||||
if (!parserClass)
|
||||
{
|
||||
parserClass=[self defaultParserClass];
|
||||
|
@ -148,7 +150,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
ASSIGN(_stringPath,HTMLPath);
|
||||
ASSIGN(_definitionsString,pageDefString);
|
||||
ASSIGN(_languages,languages_);
|
||||
ASSIGN(_definitionsPath,languages_);
|
||||
ASSIGN(_definitionFilePath,definitionPath_);
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
@ -162,7 +164,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
DESTROY(_stringPath);
|
||||
DESTROY(_definitionsString);
|
||||
DESTROY(_languages);
|
||||
DESTROY(_definitionsPath);
|
||||
DESTROY(_definitionFilePath);
|
||||
DESTROY(_template);
|
||||
DESTROY(_definitions);
|
||||
[super dealloc];
|
||||
|
@ -251,16 +253,18 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
LOGObjectFnStart();
|
||||
if (!_definitions)
|
||||
{
|
||||
NSDebugMLLog(@"low",@"_definitionFilePath=%@",_definitionFilePath);
|
||||
if ([_definitionsString length]==0)
|
||||
{
|
||||
ASSIGN(_definitions,[NSDictionary dictionary]);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSMutableSet* processedFiles=[NSMutableSet setWithObject:_definitionFilePath];
|
||||
NSDictionary* tmpDefinitions=[self parseDefinitionsString:_definitionsString
|
||||
named:_templateName
|
||||
inFrameworkNamed:_frameworkName
|
||||
fromPath:_definitionsPath];
|
||||
processedFiles:processedFiles];
|
||||
if (tmpDefinitions)
|
||||
ASSIGN(_definitions,[NSDictionary dictionaryWithDictionary:tmpDefinitions]);
|
||||
};
|
||||
|
@ -273,7 +277,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
-(NSDictionary*)parseDefinitionsString:(NSString*)localDefinitionstring_
|
||||
named:(NSString*)localDefinitionName_
|
||||
inFrameworkNamed:(NSString*)localFrameworkName_
|
||||
fromPath:(NSString*)localDefinitionPath_
|
||||
processedFiles:(NSMutableSet*)processedFiles
|
||||
{
|
||||
NSDictionary* returnedLocalDefinitions=nil;
|
||||
NSMutableDictionary* localDefinitions=nil;
|
||||
|
@ -293,6 +297,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
definitionsTokenBuffer=[ANTLRTokenBuffer tokenBufferWithTokenizer:definitionsLexer];
|
||||
definitionsParser=[[[GSWPageDefParser alloc] initWithTokenBuffer:definitionsTokenBuffer]
|
||||
autorelease];
|
||||
NSDebugMLLog(@"low",@"processedFiles=%@",processedFiles);
|
||||
NSDebugMLLog(@"low",@"name:%@ definitionsString=%@",
|
||||
localDefinitionName_,
|
||||
localDefinitionstring_);
|
||||
|
@ -349,11 +354,11 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
NSDebugMLLog(@"low",@"definitionsIncludes:%@\n",definitionsIncludes);
|
||||
NSDebugMLLog(@"low",@"localDefinitionName_:%@\n",localDefinitionName_);
|
||||
NSDebugMLLog(@"low",@"localFrameworkName_:%@\n",localFrameworkName_);
|
||||
NSDebugMLLog(@"low",@"localDefinitionPath_:%@\n",localDefinitionPath_);
|
||||
NSDebugMLLog(@"low",@"processedFiles:%@\n",processedFiles);
|
||||
tmpDefinitions=[self processIncludes:definitionsIncludes
|
||||
named:localDefinitionName_
|
||||
inFrameworkNamed:localFrameworkName_
|
||||
definitionPath:localDefinitionPath_];
|
||||
processedFiles:processedFiles];
|
||||
NSDebugMLLog(@"low",@"tmpDefinitions:%@\n",tmpDefinitions);
|
||||
if (tmpDefinitions)
|
||||
[localDefinitions addDefaultEntriesFromDictionary:tmpDefinitions];
|
||||
|
@ -377,7 +382,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)parseDefinitionInclude:(NSString*)includeName_
|
||||
fromFrameworkNamed:(NSString*)fromFrameworkName_
|
||||
definitionPath:(NSString*)localDefinitionPath_
|
||||
processedFiles:(NSMutableSet*)processedFiles
|
||||
{
|
||||
NSDictionary* returnedLocalDefinitions=nil;
|
||||
NSMutableDictionary* localDefinitions=nil;
|
||||
|
@ -390,6 +395,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
GSWResourceManager* _resourceManager=nil;
|
||||
NSString* _path=nil;
|
||||
int iLanguage=0;
|
||||
int iName=0;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswcomponents",@"includeName_=%@",includeName_);
|
||||
_resourceManager=[GSWApp resourceManager];
|
||||
|
@ -401,85 +407,114 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
localFrameworkName=fromFrameworkName_;
|
||||
NSDebugMLLog(@"gswcomponents",@"localFrameworkName=%@",localFrameworkName);
|
||||
|
||||
_resourceName=[localDefinitionName stringByAppendingString:GSWPagePSuffix];
|
||||
localDefinitionResourceName=[localDefinitionName stringByAppendingString:GSWComponentDefinitionPSuffix];
|
||||
NSDebugMLLog(@"gswcomponents",@"_resourceName=%@",_resourceName);
|
||||
|
||||
for(iLanguage=0;iLanguage<=[_languages count] && !_path;iLanguage++)
|
||||
{
|
||||
if (iLanguage<[_languages count])
|
||||
_language=[_languages objectAtIndex:iLanguage];
|
||||
else
|
||||
_language=nil;
|
||||
_path=[_resourceManager pathForResourceNamed:_resourceName
|
||||
inFramework:localFrameworkName
|
||||
language:_language];
|
||||
NSDebugMLLog(@"gswcomponents",@"Search In Page Component: _language=%@ _path=%@ localDefinitionPath=%@",
|
||||
_language,
|
||||
_path,
|
||||
localDefinitionPath_);
|
||||
if (_path)
|
||||
_path=[_path stringByAppendingPathComponent:localDefinitionResourceName];
|
||||
else
|
||||
for(iName=0;!_path && iName<2;iName++)
|
||||
{
|
||||
_path=[_resourceManager pathForResourceNamed:localDefinitionResourceName
|
||||
_resourceName=[localDefinitionName stringByAppendingString:GSWPagePSuffix[GSWebNamingConvForRound(iName)]];
|
||||
localDefinitionResourceName=[localDefinitionName stringByAppendingString:GSWComponentDefinitionPSuffix[GSWebNamingConvForRound(iName)]];
|
||||
NSDebugMLLog(@"gswcomponents",@"_resourceName=%@ localDefinitionResourceName=%@ localDefinitionName=%@",
|
||||
_resourceName,
|
||||
localDefinitionResourceName,
|
||||
localDefinitionName);
|
||||
NSDebugMLLog(@"gswcomponents",@"Search %@ Language=%@",_resourceName,_language);
|
||||
_path=[_resourceManager pathForResourceNamed:_resourceName
|
||||
inFramework:localFrameworkName
|
||||
language:_language];
|
||||
NSDebugMLLog(@"gswcomponents",@"Search in Component Definition _language=%@ _path=%@ (localDefinitionPath=%@)",
|
||||
NSDebugMLLog(@"gswcomponents",@"Search In Page Component: _language=%@ _path=%@ processedFiles=%@",
|
||||
_language,
|
||||
_path,
|
||||
localDefinitionPath_);
|
||||
};
|
||||
if ([_path isEqualToString:localDefinitionPath_])
|
||||
{
|
||||
_path=nil;
|
||||
iLanguage=[_languages count]-1;
|
||||
processedFiles);
|
||||
if (_path)
|
||||
{
|
||||
_path=[_path stringByAppendingPathComponent:localDefinitionResourceName];
|
||||
NSDebugMLLog(@"gswcomponents",@"Found %@ Language=%@ : %@",_resourceName,_language,_path);
|
||||
if ([processedFiles containsObject:_path])
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",@"path=%@ already processed",_path);
|
||||
_path=nil;
|
||||
if (_language)
|
||||
iLanguage=[_languages count]-1;//For directly go to no language search so we don't include (for exemple) an English file for a french file
|
||||
};
|
||||
};
|
||||
if (!_path)
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",@"Direct Search %@ Language=%@",localDefinitionResourceName,_language);
|
||||
_path=[_resourceManager pathForResourceNamed:localDefinitionResourceName
|
||||
inFramework:localFrameworkName
|
||||
language:_language];
|
||||
if (_path)
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",@"Direct Found %@ Language=%@ : %@",localDefinitionResourceName,_language,_path);
|
||||
if ([processedFiles containsObject:_path])
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",@"path=%@ already processed",_path);
|
||||
_path=nil;
|
||||
if (_language)
|
||||
iLanguage=[_languages count]-1;//For directly go to no language search so we don't include (for exemple) an English file for a french file
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"gswcomponents",@"Direct Search in Component Definition _language=%@ _path=%@ (processedFiles=%@)",
|
||||
_language,
|
||||
_path,
|
||||
processedFiles);
|
||||
};
|
||||
NSDebugMLLog(@"gswcomponents",@"Search In Page Component: _language=%@ _path=%@ processedFiles=%@",
|
||||
_language,
|
||||
_path,
|
||||
processedFiles);
|
||||
};
|
||||
};
|
||||
if (_path)
|
||||
{
|
||||
NSString* _pageDefString=nil;
|
||||
NSDebugMLLog(@"low",@"_path=%@",_path);
|
||||
[processedFiles addObject:_path];
|
||||
//NSString* pageDefPath=[path stringByAppendingString:_definitionPath];
|
||||
//TODO use encoding !
|
||||
_pageDefString=[NSString stringWithContentsOfFile:_path];
|
||||
NSDebugMLLog(@"low",@"path=%@: _pageDefString:%@\n",_path,_pageDefString);
|
||||
if (_pageDefString)
|
||||
{
|
||||
tmpDefinitions=[self parseDefinitionsString:_pageDefString
|
||||
named:includeName_
|
||||
inFrameworkNamed:localFrameworkName
|
||||
fromPath:_path];
|
||||
processedFiles:processedFiles];
|
||||
NSDebugMLLog(@"low",@"tmpDefinitions:%@\n",tmpDefinitions);
|
||||
if (tmpDefinitions)
|
||||
localDefinitions=[NSMutableDictionary dictionaryWithDictionary:tmpDefinitions];
|
||||
else
|
||||
{
|
||||
LOGError(@"%@ Template componentDefinition parse failed for included file:%@ in framework:%@ (definitionPath=%@)",
|
||||
LOGError(@"%@ Template componentDefinition parse failed for included file:%@ in framework:%@ (processedFiles=%@)",
|
||||
[self logPrefix],
|
||||
includeName_,
|
||||
localFrameworkName,
|
||||
localDefinitionPath_);
|
||||
processedFiles);
|
||||
};
|
||||
NSDebugMLLog(@"low",@"localDefinitions:%@\n",localDefinitions);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExceptionRaise(@"GSWTemplateParser",
|
||||
@"%@ Can't load included component definition named:%@ in framework:%@ (definitionPath=%@)",
|
||||
@"%@ Can't load included component definition named:%@ in framework:%@ (processedFiles=%@)",
|
||||
[self logPrefix],
|
||||
includeName_,
|
||||
localFrameworkName,
|
||||
localDefinitionPath_);
|
||||
processedFiles);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
ExceptionRaise(@"GSWTemplateParser",
|
||||
@"%@ Can't find included component definition named:%@ in framework:%@ (definitionPath=%@)",
|
||||
@"%@ Can't find included component definition named:%@ in framework:%@ (processedFiles=%@)",
|
||||
[self logPrefix],
|
||||
includeName_,
|
||||
localFrameworkName,
|
||||
localDefinitionPath_);
|
||||
processedFiles);
|
||||
};
|
||||
NSDebugMLLog(@"low",@"localDefinitions:%@\n",localDefinitions);
|
||||
if (localDefinitions)
|
||||
|
@ -492,7 +527,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
-(NSDictionary*)processIncludes:(NSArray*)definitionsIncludes_
|
||||
named:(NSString*)localDefinitionsName_
|
||||
inFrameworkNamed:(NSString*)localFrameworkName_
|
||||
definitionPath:(NSString*)localDefinitionPath_
|
||||
processedFiles:(NSMutableSet*)processedFiles
|
||||
{
|
||||
int _count=0;
|
||||
NSDictionary* returnedLocalDefinitions=nil;
|
||||
|
@ -516,7 +551,7 @@ Class GSWTemplateParser_DefaultParserClass=Nil;
|
|||
_includeName);
|
||||
tmpDefinitions=[self parseDefinitionInclude:_includeName
|
||||
fromFrameworkNamed:localFrameworkName_
|
||||
definitionPath:localDefinitionPath_];
|
||||
processedFiles:processedFiles];
|
||||
NSDebugMLLog(@"low",@"Template componentDefinition _includeName:%@ tmpDefinitions=%@",
|
||||
_includeName,
|
||||
tmpDefinitions);
|
||||
|
|
|
@ -323,8 +323,8 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog0(@"low",@"Found Open Tag");
|
||||
tagAttrs=[self getTagAttrsFor:_currentAST];
|
||||
NSDebugMLLog(@"low",@"tagAttrs=%@",tagAttrs);
|
||||
if ([tagName caseInsensitiveCompare:@"gsweb"]==NSOrderedSame
|
||||
|| [tagName caseInsensitiveCompare:@"webobject"]==NSOrderedSame)
|
||||
if ([tagName caseInsensitiveCompare:GSWTag_Name[GSWNAMES_INDEX]]==NSOrderedSame
|
||||
|| [tagName caseInsensitiveCompare:GSWTag_Name[WONAMES_INDEX]]==NSOrderedSame)
|
||||
{
|
||||
NSDebugMLLog0(@"low",@"Found GSWeb Tag");
|
||||
NSDebugMLLog(@"low",@"tagAttrs=%@",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
//====================================================================
|
||||
@interface GSWTemplateParserSAXHandler : GSHTMLSAXHandler
|
||||
{
|
||||
GSWTemplateParser* _templateParser;
|
||||
GSWTemplateParser* _templateParser;
|
||||
};
|
||||
|
||||
+(void)lock;
|
||||
|
@ -51,15 +51,23 @@
|
|||
-(id)init;
|
||||
-(xmlParserInputPtr)resolveEntity:(NSString*)publicIdEntity
|
||||
systemID:(NSString*)systemIdEntity;
|
||||
-(void)warning:(NSString*)message;
|
||||
-(void)error:(NSString*)message;
|
||||
-(void)fatalError:(NSString*)message;
|
||||
-(void)warning:(NSString*)message
|
||||
colNumber:(int)colNumber
|
||||
lineNumber:(int)lineNumber;
|
||||
-(void)error:(NSString*)message
|
||||
colNumber:(int)colNumber
|
||||
lineNumber:(int)lineNumber;
|
||||
-(void)fatalError:(NSString*)message
|
||||
colNumber:(int)colNumber
|
||||
lineNumber:(int)lineNumber;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWTemplateParserXML : GSWTemplateParser
|
||||
{
|
||||
GSXMLDocument* _xmlDocument;
|
||||
BOOL _isHTMLTag;
|
||||
BOOL _isBodyTag;
|
||||
}
|
||||
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -364,25 +364,42 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)warning:(NSString*)message
|
||||
colNumber:(int)colNumber
|
||||
lineNumber:(int)lineNumber
|
||||
{
|
||||
[[GSWApplication application] logWithFormat:@"%@ Warning: %@",
|
||||
[[GSWApplication application] logWithFormat:@"%@ Warning (col %d,line %d): %@",
|
||||
[_templateParser logPrefix],
|
||||
colNumber,
|
||||
lineNumber,
|
||||
message];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)error: (NSString*)message
|
||||
colNumber:(int)colNumber
|
||||
lineNumber:(int)lineNumber
|
||||
{
|
||||
[[GSWApplication application] logErrorWithFormat:@"%@ Error: %@",
|
||||
[_templateParser logPrefix],
|
||||
message];
|
||||
NSString* testMessage=[[message lowercaseString] stringByTrimmingSpaces];
|
||||
if (![testMessage isEqualToString:@"tag webobject invalid"]
|
||||
&& ![testMessage isEqualToString:@"tag gsweb invalid"])
|
||||
{
|
||||
[[GSWApplication application] logErrorWithFormat:@"%@ Error (col %d,line %d): %@",
|
||||
[_templateParser logPrefix],
|
||||
colNumber,
|
||||
lineNumber,
|
||||
message];
|
||||
};
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)fatalError: (NSString*)message
|
||||
colNumber:(int)colNumber
|
||||
lineNumber:(int)lineNumber
|
||||
{
|
||||
[[GSWApplication application] logErrorWithFormat:@"%@ Fatal Error: %@",
|
||||
[[GSWApplication application] logErrorWithFormat:@"%@ Fatal Error (col %d,line %d): %@",
|
||||
[_templateParser logPrefix],
|
||||
colNumber,
|
||||
lineNumber,
|
||||
message];
|
||||
};
|
||||
|
||||
|
@ -415,19 +432,23 @@ static NSString* TabsForLevel(int level)
|
|||
atLevel:(int)level
|
||||
{
|
||||
NSString* dumpString=[NSString string];
|
||||
LOGObjectFnStart();
|
||||
while (node)
|
||||
{
|
||||
dumpString=[dumpString stringByAppendingFormat:@"%@%@ [Type:%@] [%@]:\n%@\n",
|
||||
const char* content=[[node content] lossyCString];
|
||||
dumpString=[dumpString stringByAppendingFormat:@"%@%@ [Type:%@] [%@]%s%s\n",
|
||||
TabsForLevel(level),
|
||||
[node name],
|
||||
[node typeDescription],
|
||||
[node propertiesAsDictionary],
|
||||
[node content]];
|
||||
(content ? ":\n" : ""),
|
||||
(content ? content : "")];
|
||||
if ([node children])
|
||||
dumpString=[dumpString stringByAppendingString:[self dumpNode:[node children]
|
||||
atLevel:level+1]];
|
||||
node=[node next];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return dumpString;
|
||||
};
|
||||
|
||||
|
@ -447,37 +468,41 @@ static NSString* TabsForLevel(int level)
|
|||
stringEncoding=NSISOLatin1StringEncoding;
|
||||
|
||||
sax=[GSWTemplateParserSAXHandler handlerWithTemplateParser:self];
|
||||
//NSLog(@"SAX=%p",sax);
|
||||
NSLog(@"self class=%@",[self class]);
|
||||
if ([self isKindOfClass:[GSWTemplateParserXMLHTML class]])
|
||||
parser=[GSHTMLParser parserWithSAXHandler:sax
|
||||
withData:[_string dataUsingEncoding:stringEncoding]];
|
||||
{
|
||||
NSRange tagRange=NSMakeRange(NSNotFound,0);
|
||||
tagRange=[_string rangeOfString:@"<HTML"
|
||||
options:NSCaseInsensitiveSearch];
|
||||
//NSDebugMLog(@"HTML Tag Range length=%d",tagRange.length);
|
||||
if (tagRange.length>0)
|
||||
_isHTMLTag=YES;
|
||||
tagRange=[_string rangeOfString:@"<BODY"
|
||||
options:NSCaseInsensitiveSearch];
|
||||
//NSDebugMLog(@"BODY Tag Range length=%d",tagRange.length);
|
||||
if (tagRange.length>0)
|
||||
_isBodyTag=YES;
|
||||
parser=[GSHTMLParser parserWithSAXHandler:sax
|
||||
withData:[_string dataUsingEncoding:stringEncoding]];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSString* xmlHeader=nil;
|
||||
NSRange docTypeRange=NSMakeRange(NSNotFound,0);
|
||||
NSString* stringToParse=nil;
|
||||
//NSLog(@"stringEncoding=%d",(int)stringEncoding);
|
||||
NSString* encodingString=nil;
|
||||
//NSLog(@"_string=%@",_string);
|
||||
encodingString=[GSXMLParser xmlEncodingStringForStringEncoding:stringEncoding];
|
||||
//NSLog(@"encodingString=%@",encodingString);
|
||||
if (encodingString)
|
||||
encodingString=[NSString stringWithFormat:@" encoding=\"%@\"",encodingString];
|
||||
else
|
||||
encodingString=@"";
|
||||
//NSLog(@"encodingString=%@",encodingString);
|
||||
xmlHeader=[NSString stringWithFormat:@"<?xml version=\"%@\"%@?>\n",
|
||||
@"1.0",
|
||||
encodingString];
|
||||
//NSLog(@"xmlHeader=%@",xmlHeader);
|
||||
//NSLog(@"_string=%@",_string);
|
||||
docTypeRange=[_string rangeOfString:@"<!DOCTYPE"];
|
||||
if (docTypeRange.length==0)
|
||||
stringToParse=[@"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">\n" stringByAppendingString:_string];
|
||||
else
|
||||
stringToParse=_string;
|
||||
//NSLog(@"stringToParse=%@",stringToParse);
|
||||
stringToParse=[xmlHeader stringByAppendingString:stringToParse];
|
||||
NSLog(@"stringToParse=%@",stringToParse);
|
||||
parser=[GSXMLParser parserWithSAXHandler:sax
|
||||
|
@ -524,9 +549,11 @@ static NSString* TabsForLevel(int level)
|
|||
{
|
||||
NSString* dumpString=[self dumpNode:node
|
||||
atLevel:0];
|
||||
NSDebugMLLog0(@"low",@"Will dump _xmlDocument");
|
||||
NSDebugMLLog(@"low",@"%@ _xmlDocument=\n%@",
|
||||
[self logPrefix],
|
||||
dumpString);
|
||||
NSDebugMLLog0(@"low",@"_xmlDocument dumped");
|
||||
};
|
||||
#endif
|
||||
/* if (node->type!=XML_DTD_NODE)
|
||||
|
@ -536,22 +563,49 @@ static NSString* TabsForLevel(int level)
|
|||
[nodeTypes objectForKey:[NSString stringWithFormat:@"%d",(int)XML_DTD_NODE]]);
|
||||
};
|
||||
*/
|
||||
NSDebugMLog(@"Test Root");
|
||||
// NSDebugMLog(@"Test Root");
|
||||
if ([node type]!=XML_ELEMENT_NODE)
|
||||
node=[node children];
|
||||
NSDebugMLog(@"Test Root children");
|
||||
// NSDebugMLog(@"Test Root children");
|
||||
NSAssert1(node,@"%@ Empty Document ([root children])",
|
||||
[self logPrefix]);
|
||||
if ([node type]!=XML_ELEMENT_NODE)
|
||||
node=[node next];
|
||||
NSDebugMLog(@"Test Root children Next");
|
||||
// NSDebugMLog(@"Test Root children Next");
|
||||
NSAssert1(node,@"%@ Empty Document ([[root children] next])",
|
||||
[self logPrefix]);
|
||||
//Remove html and body node when they have been added by html parser
|
||||
if (!_isHTMLTag || !_isBodyTag)
|
||||
{
|
||||
BOOL cont=YES;
|
||||
while (node && cont)
|
||||
{
|
||||
cont=NO;
|
||||
if ([node type]==XML_ELEMENT_NODE)
|
||||
{
|
||||
NSString* nodeName=[node name];
|
||||
//NSDebugMLog(@"node name=%@",nodeName);
|
||||
/*NSDebugMLog(@"_isHTMLTag=%s _isBodyTag=%s",
|
||||
(_isHTMLTag ? "YES" : "NO"),
|
||||
(_isBodyTag ? "YES" : "NO"));
|
||||
*/
|
||||
if ((!_isHTMLTag && [nodeName caseInsensitiveCompare:@"html"]==NSOrderedSame)
|
||||
|| (!_isBodyTag && [nodeName caseInsensitiveCompare:@"body"]==NSOrderedSame))
|
||||
{
|
||||
//NSDebugMLog(@"==> Children");
|
||||
node=[node children];
|
||||
cont=YES;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (node)
|
||||
{
|
||||
NSDebugMLog(@"Call createElementsFromNode:");
|
||||
//NSDebugMLog(@"Call createElementsFromNode:");
|
||||
NS_DURING
|
||||
{
|
||||
gswebTagN=0;
|
||||
tagN=0;
|
||||
elements=[self createElementsFromNode:node];
|
||||
}
|
||||
NS_HANDLER
|
||||
|
@ -606,53 +660,78 @@ text [Type:XML_TEXT_NODE] [{}] ####
|
|||
while(currentNode)
|
||||
{
|
||||
GSWElement* elem=nil;
|
||||
NSDebugMLog(@"BEGIN node=%p %@ [Type:%@] [%@] ##%@##\n",
|
||||
NSDebugMLog(@"BEGIN node=%p %@ [Type:%@] [%@] ##%s##\n",
|
||||
currentNode,
|
||||
[currentNode name],
|
||||
[currentNode typeDescription],
|
||||
[currentNode propertiesAsDictionary],
|
||||
[currentNode content]);
|
||||
[[currentNode content] lossyCString]);
|
||||
switch([currentNode type])
|
||||
{
|
||||
case XML_TEXT_NODE:
|
||||
{
|
||||
NSDebugMLog0(@"TEXT");
|
||||
elem=[GSWHTMLBareString elementWithString:
|
||||
[NSString stringWithCString:
|
||||
[[[currentNode content]
|
||||
stringByConvertingToHTMLEntities]
|
||||
lossyCString]]];//Because XML Parser decode characters
|
||||
NSDebugMLog(@"TEXT element=%@",elem);
|
||||
};
|
||||
break;
|
||||
case XML_CDATA_SECTION_NODE:
|
||||
{
|
||||
NSDebugMLog0(@"CDATA_SECTION");
|
||||
elem=[GSWHTMLBareString elementWithString:[currentNode content]];
|
||||
NSDebugMLog(@"TEXT element=%@",elem);
|
||||
};
|
||||
break;
|
||||
case XML_COMMENT_NODE:
|
||||
{
|
||||
elem=[GSWHTMLBareString elementWithString:[currentNode content]];
|
||||
NSDebugMLog0(@"COMMENT");
|
||||
elem=[GSWHTMLBareString elementWithString:[NSString stringWithFormat:@"<!-- %s -->",[[currentNode content] lossyCString]]];
|
||||
NSDebugMLog(@"COMMENT element=%@",elem);
|
||||
};
|
||||
break;
|
||||
default:
|
||||
{
|
||||
int currentGSWebTagN=0;
|
||||
int currentTagN=0;
|
||||
NSArray* children=nil;
|
||||
NSDictionary* nodeAttributes=nil;
|
||||
NSString* nodeName=nil;
|
||||
NSString* nodeNameAttribute=nil;
|
||||
nodeName=[currentNode name];
|
||||
NSDebugMLog(@"DEFAULT (%@)",nodeName);
|
||||
if ([currentNode children])
|
||||
{
|
||||
children=[self createElementsFromNode:[currentNode children]];
|
||||
NSDebugMLog(@"node=%p children=%@",currentNode,children);
|
||||
};
|
||||
NSDebugMLog(@"DEFAULT (name=%@ type=%@)",nodeName,[currentNode typeDescription]);
|
||||
//if (currentNode->type==XML_ELEMENT_NODE)
|
||||
{
|
||||
nodeAttributes=[currentNode propertiesAsDictionaryWithKeyTransformationSel:@selector(lowercaseString)];
|
||||
nodeAttributes=[currentNode propertiesAsDictionaryWithKeyTransformationSel:@selector(lowercaseString)];
|
||||
nodeNameAttribute=[nodeAttributes objectForKey:@"name"];
|
||||
NSDebugMLog(@"node=%p nodeAttributes=%@",currentNode,nodeAttributes);
|
||||
NSDebugMLog(@"node=%p nodeNameAttribute=%@",currentNode,nodeNameAttribute);
|
||||
if ([nodeName caseInsensitiveCompare:@"gsweb"]==NSOrderedSame)
|
||||
NSDebugMLog(@"node=%p nodeNameAttribute=%@",currentNode,nodeNameAttribute);
|
||||
tagN++;
|
||||
if ([nodeName caseInsensitiveCompare:GSWTag_Name[GSWNAMES_INDEX]]==NSOrderedSame
|
||||
||[nodeName caseInsensitiveCompare:GSWTag_Name[WONAMES_INDEX]]==NSOrderedSame)
|
||||
gswebTagN++;
|
||||
currentGSWebTagN=gswebTagN;
|
||||
currentTagN=tagN;
|
||||
if ([currentNode children])
|
||||
{
|
||||
children=[self createElementsFromNode:[currentNode children]];
|
||||
NSDebugMLog(@"node=%p children=%@",currentNode,children);
|
||||
};
|
||||
if ([nodeName caseInsensitiveCompare:GSWTag_Name[GSWNAMES_INDEX]]==NSOrderedSame
|
||||
||[nodeName caseInsensitiveCompare:GSWTag_Name[WONAMES_INDEX]]==NSOrderedSame)
|
||||
{
|
||||
GSWPageDefElement* definitionsElement=nil;
|
||||
if (!nodeNameAttribute)
|
||||
{
|
||||
ExceptionRaise(@"GSWTemplateParser",
|
||||
@"%@ No element name for gsweb tag",
|
||||
[self logPrefix]);
|
||||
@"%@ No element name for gsweb tag (%@) [#%d,#%d]",
|
||||
[self logPrefix],
|
||||
nodeName,
|
||||
currentGSWebTagN,
|
||||
currentTagN);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -664,9 +743,11 @@ text [Type:XML_TEXT_NODE] [{}] ####
|
|||
if (!definitionsElement)
|
||||
{
|
||||
ExceptionRaise(@"GSWTemplateParser",
|
||||
@"%@ No element definition for tag named:%@",
|
||||
@"%@ No element definition for tag named:%@ [#%d,#%d]",
|
||||
[self logPrefix],
|
||||
nodeNameAttribute);
|
||||
nodeNameAttribute,
|
||||
currentGSWebTagN,
|
||||
currentTagN);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -676,10 +757,12 @@ text [Type:XML_TEXT_NODE] [{}] ####
|
|||
if (!className)
|
||||
{
|
||||
ExceptionRaise(@"GSWTemplateParser",
|
||||
@"%@No class name in page definition for tag named:%@ definitionsElement=%@",
|
||||
@"%@No class name in page definition for tag named:%@ definitionsElement=%@ [#%d,#%d]",
|
||||
[self logPrefix],
|
||||
nodeNameAttribute,
|
||||
definitionsElement);
|
||||
definitionsElement,
|
||||
currentGSWebTagN,
|
||||
currentTagN);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -709,12 +792,12 @@ text [Type:XML_TEXT_NODE] [{}] ####
|
|||
currentNode,
|
||||
nodeNameAttribute,
|
||||
children);
|
||||
NSDebugMLog(@"node=%p %@ [Type:%@] [%@] ##%@##\n",
|
||||
NSDebugMLog(@"node=%p %@ [Type:%@] [%@] ##%s##\n",
|
||||
currentNode,
|
||||
[currentNode name],
|
||||
[currentNode typeDescription],
|
||||
[currentNode propertiesAsDictionary],
|
||||
[currentNode content]);
|
||||
[[currentNode content] lossyCString]);
|
||||
elem=[GSWApp dynamicElementWithName:className
|
||||
associations:_associations
|
||||
template:[[[GSWHTMLStaticGroup alloc]initWithContentElements:children]autorelease]
|
||||
|
@ -734,44 +817,61 @@ text [Type:XML_TEXT_NODE] [{}] ####
|
|||
}
|
||||
else
|
||||
{
|
||||
NSDictionary* _associations=nil;
|
||||
NSEnumerator* _nodeAttributesEnum = [nodeAttributes keyEnumerator];
|
||||
id _tagAttrKey=nil;
|
||||
id _tagAttrValue=nil;
|
||||
NSMutableDictionary* _addedAssoc=nil;
|
||||
NSDebugMLog(@"node=%p Create nodeName=%@",currentNode,nodeName);
|
||||
while ((_tagAttrKey = [_nodeAttributesEnum nextObject]))
|
||||
//It's a hack to remove html & body elements where there's not in the template (HTML parser add them when there are missing)
|
||||
if ((!_isHTMLTag
|
||||
&& [nodeName caseInsensitiveCompare:@"html"]==NSOrderedSame
|
||||
&& [nodeAttributes count]==0)
|
||||
|| (!_isBodyTag
|
||||
&& [nodeName caseInsensitiveCompare:@"body"]==NSOrderedSame
|
||||
&& [nodeAttributes count]==0))
|
||||
{
|
||||
if (![_tagAttrKey isEqualToString:@"name"] && ![_associations objectForKey:_tagAttrKey])
|
||||
NSDebugMLog(@"node=%p StaticElement: children=%@",currentNode,children);
|
||||
elem=[[[GSWHTMLStaticElement alloc]initWithName:nil
|
||||
attributeDictionary:nil
|
||||
contentElements:children]autorelease];
|
||||
NSDebugMLog(@"node=%p element=%@",currentNode,elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDictionary* _associations=nil;
|
||||
NSEnumerator* _nodeAttributesEnum = [nodeAttributes keyEnumerator];
|
||||
id _tagAttrKey=nil;
|
||||
id _tagAttrValue=nil;
|
||||
NSMutableDictionary* _addedAssoc=nil;
|
||||
NSDebugMLog(@"node=%p Create nodeName=%@",currentNode,nodeName);
|
||||
while ((_tagAttrKey = [_nodeAttributesEnum nextObject]))
|
||||
{
|
||||
if (!_addedAssoc)
|
||||
_addedAssoc=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
_tagAttrValue=[nodeAttributes objectForKey:_tagAttrKey];
|
||||
[_addedAssoc setObject:[GSWAssociation associationWithValue:_tagAttrValue]
|
||||
forKey:_tagAttrKey];
|
||||
if (![_tagAttrKey isEqualToString:@"name"] && ![_associations objectForKey:_tagAttrKey])
|
||||
{
|
||||
if (!_addedAssoc)
|
||||
_addedAssoc=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
_tagAttrValue=[nodeAttributes objectForKey:_tagAttrKey];
|
||||
[_addedAssoc setObject:[GSWAssociation associationWithValue:_tagAttrValue]
|
||||
forKey:_tagAttrKey];
|
||||
};
|
||||
};
|
||||
if (_addedAssoc)
|
||||
{
|
||||
_associations=[NSDictionary dictionaryWithDictionary:_addedAssoc];
|
||||
};
|
||||
NSDebugMLog(@"node=%p StaticElement: children=%@",currentNode,children);
|
||||
elem=[[[GSWHTMLStaticElement alloc]initWithName:nodeName
|
||||
attributeDictionary:_associations
|
||||
contentElements:children]autorelease];
|
||||
NSDebugMLog(@"node=%p element=%@",currentNode,elem);
|
||||
};
|
||||
if (_addedAssoc)
|
||||
{
|
||||
_associations=[NSDictionary dictionaryWithDictionary:_addedAssoc];
|
||||
};
|
||||
NSDebugMLog(@"node=%p StaticElement: children=%@",currentNode,children);
|
||||
elem=[[[GSWHTMLStaticElement alloc]initWithName:nodeName
|
||||
attributeDictionary:_associations
|
||||
contentElements:children]autorelease];
|
||||
NSDebugMLog(@"node=%p element=%@",currentNode,elem);
|
||||
};
|
||||
};
|
||||
};
|
||||
break;
|
||||
};
|
||||
[_elements addObject:elem];
|
||||
NSDebugMLog(@"END node=%p %@ [Type:%@] [%@] ##%@##\n",
|
||||
NSDebugMLog(@"END node=%p %@ [Type:%@] [%@] ##%s##\n",
|
||||
currentNode,
|
||||
[currentNode name],
|
||||
[currentNode typeDescription],
|
||||
[currentNode propertiesAsDictionary],
|
||||
[currentNode content]);
|
||||
[[currentNode content] lossyCString]);
|
||||
currentNode=[currentNode next];
|
||||
};
|
||||
DESTROY(arp);
|
||||
|
|
|
@ -74,22 +74,23 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
GSWComponent* _component=[context_ component];
|
||||
id _formValue=[request_ formValueForKey:[context_ elementID]];
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[value setValue:_formValue
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[value setValue:_formValue
|
||||
inComponent:_component];
|
||||
#endif
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
[value setValue:_formValue
|
||||
inComponent:_component];
|
||||
};
|
||||
[super takeValuesFromRequest:request_
|
||||
inContext:context_];
|
||||
|
|
|
@ -123,22 +123,23 @@ static char rcsId[] = "$Id$";
|
|||
_resultValue=_value;
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"_resultValue=%@",_resultValue);
|
||||
#if !GSWEB_STRICT
|
||||
NS_DURING
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[value setValue:_resultValue
|
||||
inComponent:_component];
|
||||
inComponent:_component];
|
||||
};
|
||||
NS_HANDLER
|
||||
NS_HANDLER
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context_];
|
||||
inContext:context_];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
#else
|
||||
[value setValue:_resultValue
|
||||
inComponent:_component];
|
||||
#endif
|
||||
}
|
||||
else
|
||||
[value setValue:_resultValue
|
||||
inComponent:_component];
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -71,9 +71,9 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _queryString=nil;
|
||||
GSWDynamicURLString* _url=nil;
|
||||
LOGObjectFnStart();
|
||||
_queryString=[NSString stringWithFormat:@"%@=%@",GSWKey_Data,[self key]];
|
||||
_queryString=[NSString stringWithFormat:@"%@=%@",GSWKey_Data[GSWebNamingConv],[self key]];
|
||||
NSDebugMLog(@"_queryString=%@",_queryString);
|
||||
_url=[context_ urlWithRequestHandlerKey:GSWResourceRequestHandlerKey
|
||||
_url=[context_ urlWithRequestHandlerKey:GSWResourceRequestHandlerKey[GSWebNamingConv]
|
||||
path:nil
|
||||
queryString:_queryString];
|
||||
NSDebugMLog(@"_url=%@",_url);
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#ifdef __FreeBSD__
|
||||
#include <float.h>
|
||||
#endif
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSValue.h>
|
||||
#include <Foundation/NSString.h>
|
||||
|
@ -200,6 +201,7 @@
|
|||
#include <GSWeb/GSWResourceManager.h>
|
||||
#include <GSWeb/GSWSession.h>
|
||||
#include <GSWeb/GSWSessionStore.h>
|
||||
#include <GSWeb/GSWSessionTimeOut.h>
|
||||
#include <GSWeb/GSWStatisticsStore.h>
|
||||
#include <GSWeb/GSWAdaptor.h>
|
||||
#include <GSWeb/GSWDefaultAdaptor.h>
|
||||
|
@ -273,5 +275,6 @@
|
|||
#include <GSWeb/GSWGeometricRegion.h>
|
||||
#include <GSWeb/GSWFileUpload.h>
|
||||
#include <GSWeb/GSWResourceURL.h>
|
||||
#include <GSWeb/GSWWOCompatibility.h>
|
||||
|
||||
#endif //_GSWeb_h__
|
||||
|
|
|
@ -93,17 +93,21 @@
|
|||
// If no data is available, returns nil. Does not block.
|
||||
-(NSData*)readDataOfLengthNonBlocking:(unsigned int)length
|
||||
{
|
||||
NSData* _data=nil;
|
||||
NSData* data=nil;
|
||||
unsigned int readLength;
|
||||
LOGObjectFnStart();
|
||||
|
||||
readLength = [self _availableByteCountNonBlocking];
|
||||
NSDebugMLog(@"readLength=%u",readLength);
|
||||
readLength = (readLength < length) ? readLength : length;
|
||||
|
||||
if (readLength>0)
|
||||
_data=[self readDataOfLength: readLength];
|
||||
{
|
||||
data=[self readDataOfLength: readLength];
|
||||
NSDebugMLog(@"[data length]=%u",[data length]);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _data;
|
||||
return data;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -82,12 +82,16 @@ typedef enum
|
|||
@end
|
||||
|
||||
//====================================================================
|
||||
struct objc_ivar* GSGetInstanceVariableStruct(id obj,NSString *iVarName)
|
||||
struct objc_ivar* GSGetInstanceVariableStruct(id obj,
|
||||
NSString* iVarName,
|
||||
BOOL underscored)
|
||||
{
|
||||
const char* name=NULL;
|
||||
Class class;
|
||||
struct objc_ivar_list *ivars=NULL;
|
||||
struct objc_ivar *ivar=NULL;
|
||||
if (underscored)
|
||||
iVarName=[NSString stringWithFormat:@"_%@",iVarName];
|
||||
name=[iVarName cString];
|
||||
class=[obj class];
|
||||
while (class && !ivar)
|
||||
|
@ -108,9 +112,11 @@ struct objc_ivar* GSGetInstanceVariableStruct(id obj,NSString *iVarName)
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
const char* GSGetInstanceVariableType(id obj, NSString *iVarName)
|
||||
const char* GSGetInstanceVariableType(id obj,
|
||||
NSString *iVarName,
|
||||
BOOL underscored)
|
||||
{
|
||||
struct objc_ivar *ivar = GSGetInstanceVariableStruct(obj,iVarName);
|
||||
struct objc_ivar *ivar = GSGetInstanceVariableStruct(obj,iVarName,underscored);
|
||||
if (ivar)
|
||||
return ivar->ivar_type;
|
||||
else
|
||||
|
@ -344,17 +350,19 @@ void IdToPData(const char* retType,id _value,void* pdata)
|
|||
void* pdata=objc_atomic_malloc(objc_sizeof_type(retType));
|
||||
if (!pdata)
|
||||
{
|
||||
NSAssert(pdata,@"No ret value buffer");
|
||||
//TODO
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog(@"low",
|
||||
@"getIVarNamed %@ in %@ %p (superClass:%@) with invocation (retType=%s)",
|
||||
name_,
|
||||
[self class],
|
||||
self,
|
||||
[self superclass],
|
||||
retType);
|
||||
@"getIVarNamed %@ in %@ %p (superClass:%@) with invocation %@ (retType=%s)",
|
||||
name_,
|
||||
[self class],
|
||||
self,
|
||||
[self superclass],
|
||||
ivarAccess_->infos.invocation,
|
||||
retType);
|
||||
[ivarAccess_->infos.invocation getReturnValue:pdata];
|
||||
_value=PDataToId(retType,pdata);
|
||||
objc_free(pdata);
|
||||
|
@ -382,6 +390,7 @@ void IdToPData(const char* retType,id _value,void* pdata)
|
|||
else
|
||||
{
|
||||
//TODO
|
||||
NSAssert(NO,@"no pdata");
|
||||
};
|
||||
};
|
||||
break;
|
||||
|
@ -452,6 +461,7 @@ void IdToPData(const char* retType,id _value,void* pdata)
|
|||
else
|
||||
{
|
||||
const char* retType=[_sig methodReturnType];
|
||||
NSDebugMLLog(@"low",@"retType=%s",retType);
|
||||
if (!retType)
|
||||
{
|
||||
_exception=[NSException exceptionWithName:@"NSObject IVar"
|
||||
|
@ -471,6 +481,7 @@ void IdToPData(const char* retType,id _value,void* pdata)
|
|||
else
|
||||
{
|
||||
NSInvocation* _invocation = [NSInvocation invocationWithMethodSignature:_sig];
|
||||
NSDebugMLLog(@"low",@"_invocation methodSignature methodReturnType=%s",[[_invocation methodSignature] methodReturnType]);
|
||||
[_invocation setSelector:sel];
|
||||
_ivarAccess->accessType=NSObjectIVarsAccessType_Invocation;
|
||||
_ivarAccess->infos.invocation=_invocation;
|
||||
|
@ -482,7 +493,9 @@ void IdToPData(const char* retType,id _value,void* pdata)
|
|||
}
|
||||
else
|
||||
{
|
||||
struct objc_ivar* ivar=GSGetInstanceVariableStruct(self,name_);
|
||||
struct objc_ivar* ivar=GSGetInstanceVariableStruct(self,name_,YES);
|
||||
if (!ivar)
|
||||
ivar=GSGetInstanceVariableStruct(self,name_,NO);
|
||||
if (ivar)
|
||||
{
|
||||
_ivarAccess->accessType=NSObjectIVarsAccessType_Direct;
|
||||
|
@ -723,7 +736,9 @@ void IdToPData(const char* retType,id _value,void* pdata)
|
|||
}
|
||||
else
|
||||
{
|
||||
struct objc_ivar* ivar=GSGetInstanceVariableStruct(self,name_);
|
||||
struct objc_ivar* ivar=GSGetInstanceVariableStruct(self,name_,YES);
|
||||
if (!ivar)
|
||||
ivar=GSGetInstanceVariableStruct(self,name_,NO);
|
||||
if (ivar)
|
||||
{
|
||||
_ivarAccess->accessType=NSObjectIVarsAccessType_Direct;
|
||||
|
|
|
@ -191,7 +191,7 @@ static char rcsId[] = "$Id$";
|
|||
if ([object_ isKindOfClass:[NSString class]])
|
||||
_string=[[object_ copy] autorelease];
|
||||
else if ([object_ isKindOfClass:[EONull class]])
|
||||
_string=nil;
|
||||
_string=@"";
|
||||
else if ([object_ respondsToSelector:@selector(stringValue)])
|
||||
_string=[object_ stringValue];
|
||||
else if ([object_ respondsToSelector:@selector(description)])
|
||||
|
|
Loading…
Reference in a new issue