[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8159 - trunk/gnue-appserver/extensions/webfrontend
From: |
jan |
Subject: |
[gnue] r8159 - trunk/gnue-appserver/extensions/webfrontend |
Date: |
Fri, 10 Feb 2006 09:05:58 -0600 (CST) |
Author: jan
Date: 2006-02-10 09:05:57 -0600 (Fri, 10 Feb 2006)
New Revision: 8159
Modified:
trunk/gnue-appserver/extensions/webfrontend/gnue-forms.js
Log:
update webfrontend for use with appserver (version>0.4.3).
But because the persistent connection doesn't work through the standart
proxy, some additional tricks will be needed (signed script or gnurpc extension)
Modified: trunk/gnue-appserver/extensions/webfrontend/gnue-forms.js
===================================================================
--- trunk/gnue-appserver/extensions/webfrontend/gnue-forms.js 2006-02-10
11:28:33 UTC (rev 8158)
+++ trunk/gnue-appserver/extensions/webfrontend/gnue-forms.js 2006-02-10
15:05:57 UTC (rev 8159)
@@ -133,7 +133,7 @@
this._showTree = function (spaces) {
// indent
for (j=0;j<spaces;j++) {
- doc.write("�");
+ doc.write("?");
}
// type+attributs
@@ -319,40 +319,90 @@
// XMLRPC.DEBUG = true;
- this.version = '0.0.1';
+ this.version = '0.0.2';
+ this.rpcinterfacetype = '4.3';
this.host=host;
this.open = function (authentification) {
- return XMLRPC.call(this.host,'open',authentification);
+ var x;
+ x = XMLRPC.call(this.host,'open',authentification);
+ alert(x + x.__rpc_datatype__ + x.__id__);
+ if (x.__rpc_datatype__ == 'object') {
+ this.rpcinterfacetype = '4.4';
+ // return x.__id__;
+ return x
+ } else {
+ return x
+ };
};
- this.close = function (session_id,commit) {
- return XMLRPC.call(this.host,'close',session_id,commit);
+ this.close = function (sessionid,commit) {
+ if (this.rpcinterfacetype=='4.4') {
+ return XMLRPC.call(this.host,'_call',sessionid,'close',commit);
+ } else {
+ return XMLRPC.call(this.host,'close',sessionid,commit);
+ }
};
- this.commit = function (session_id) {
- return XMLRPC.call(this.host,'commit',session_id);
+ this.commit = function (sessionid) {
+ if (this.rpcinterfacetype=='4.4') {
+ return XMLRPC.call(this.host,'_call',sessionid,'commit');
+ } else {
+ return XMLRPC.call(this.host,'commit',sessionid);
+ };
};
- this.rollback = function (session_id) {
- return XMLRPC.call(this.host,'rollback',session_id);
+ this.rollback = function (sessionid) {
+ if (this.rpcinterfacetype=='4.4') {
+ return XMLRPC.call(this.host,'_call',sessionid,'rollback');
+ } else {
+ return XMLRPC.call(this.host,'rollback',sessionid);
+ };
};
this.request = function
(sessionid,classname,conditions,sortorder,propertylist) {
- return
XMLRPC.call(this.host,'request',sessionid,classname,conditions,sortorder,propertylist);
+ if (this.rpcinterfacetype=='4.4') {
+ return
XMLRPC.call(this.host,'_call',sessionid,'request',classname,conditions,sortorder,propertylist);
+ } else {
+ return
XMLRPC.call(this.host,'request',sessionid,classname,conditions,sortorder,propertylist);
+ }
};
this.count = function (sessionid,listid) {
- return XMLRPC.call(this.host,'count',sessionid,listid);
+ if (this.rpcinterfacetype=='4.4') {
+ return XMLRPC.call(this.host,'_call',listid,'count');
+ } else {
+ return XMLRPC.call(this.host,'count',sessionid,listid);
+ }
};
this.fetch = function (sessionid,listid,start,count) {
- return XMLRPC.call(this.host,'fetch',sessionid,listid,start,count);
+ if (this.rpcinterfacetype=='4.4') {
+ return XMLRPC.call(this.host,'_call',listid,'fetch',start,count);
+ } else {
+ return XMLRPC.call(this.host,'fetch',sessionid,listid,start,count);
+ }
};
this.load = function (sessionid,classname,objids,propertylist) {
- return
XMLRPC.call(this.host,'load',sessionid,classname,objids,propertylist);
+ if (this.rpcinterfacetype=='4.4') {
+ return
XMLRPC.call(this.host,'_call',sessionid,'load',classname,objids,propertylist);
+ } else {
+ return
XMLRPC.call(this.host,'load',sessionid,classname,objids,propertylist);
+ };
};
this.store = function (sessionid,classname,objids,propertylist,data) {
- return
XMLRPC.call(this.host,'store',sessionid,classname,objids,propertylist,data);
+ if (this.rpcinterfacetype=='4.4') {
+ return
XMLRPC.call(this.host,'_call',sessionid,'store',classname,objids,propertylist,data);
+ } else {
+ return
XMLRPC.call(this.host,'store',sessionid,classname,objids,propertylist,data);
+ };
};
this.call = function (sessionid,classname,objids,methodname,parameters) {
- return
XMLRPC.call(this.host,'call',sessionid,classname,objids,methodname,parameters);
+ if (this.rpcinterfacetype=='4.4') {
+ return
XMLRPC.call(this.host,'_call',sessionid,'call',classname,objids,methodname,parameters);
+ } else {
+ return
XMLRPC.call(this.host,'call',sessionid,classname,objids,methodname,parameters);
+ };
};
this.dodelete = function (sessionid,classname,objids) {
- return XMLRPC.call(this.host,'delete',sessionid,classname,objids);
+ if (this.rpcinterfacetype=='4.4') {
+ return
XMLRPC.call(this.host,'_call',sessionid,'delete',classname,objids);
+ } else {
+ return XMLRPC.call(this.host,'delete',sessionid,classname,objids);
+ };
};
this.getFilters = function (language) {
return XMLRPC.call(this.host,'getFilters',language);
@@ -738,7 +788,10 @@
// autodetect connection
rpc_addr=location.protocol+location.host;
rpc_addr="http://"+location.host+":8765/";
- proxy="http://"+location.host+"/cgi-bin/rpcproxy.cgi";
+ proxy="http://"+location.host+"/cgi-bin/rpcproxy.cgi";
+ if (location.host=='gnue-webfrontend') {
+ rpc_addr='http://localhost:8765/';
+ };
}
// 3. if that doesnt work, ask user
// TODO: Implement fetchrpc addr+login test loop
@@ -1008,33 +1061,33 @@
return b;
}
this.showNavigationBar=function() {
- r = '<center><br><img src="img/gnue.png"><br>�</center>'+
+ r = '<center><br><img src="img/gnue.png"><br>?</center>'+
'<TABLE BGCOLOR="#EEEEEE" ALIGN="CENTER"><TR><TD>'+
'</TD><TD>'
r+=this.showButton('tb_save',"commit","Commit","form.commit();",'n');
r+=this.showButton('tb_new',"newrec","New Record","form.newrec();",'n');
r+=this.showButton('tb_trash',"trash","Mark for
Removal","form.del();",'n');
- r+='</TD><TD>�</TD><TD>'
+ r+='</TD><TD>?</TD><TD>'
r+=this.showButton('tb_left_arrow',"prev","Previous
Record","form.prev();",'');
r+=this.showButton('tb_right_arrow',"next","Next
Record","form.next();",'');
- r+='</TD><TD>�</TD><TD>'
+ r+='</TD><TD>?</TD><TD>'
r+=this.showButton('tb_preferences',"prepq","Prepare
Query","form.prepQ();",'');
r+=this.showButton('tb_search',"query","Execute Query","form.execQ();",'');
- r+='</TD><TD>�</TD><TD>'
+ r+='</TD><TD>?</TD><TD>'
r+=this.showButton('tb_undo',"rollback","Rollback","form.rollback();",'');
- r+='</TD><TD>�</TD><TD>'
+ r+='</TD><TD>?</TD><TD>'
r+=this.showButton('tb_help',"help","About","form.about();",'');
- r+='</TD><TD>�</TD><TD>'
+ r+='</TD><TD>?</TD><TD>'
r+=this.showButton('tb_close',"close","","form.close();",'');
- r+='</TD><TD>�</TD></TR><TABLE><BR>';
+ r+='</TD><TD>?</TD></TR><TABLE><BR>';
return r;
}
this.showStatusBar=function() {
var r="";
r+='<BR><TABLE BGCOLOR="#EEEEEE" ALIGN="CENTER">';
r+='<tr style="border-top-width: 5mm; border-top-style: solid;">';
- r+='<td><div id="status"></div></td><td>�|�</td>';
- r+='<td><div id="pos"></div></td><td>�|�</td>';
+ r+='<td><div id="status"></div></td><td>?|?</td>';
+ r+='<td><div id="pos"></div></td><td>?|?</td>';
r+='<td><div id="max"></div></td></tr></table>';
return r;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8159 - trunk/gnue-appserver/extensions/webfrontend,
jan <=