[Twisted-web] nevow livepage - where are my parameters (request.args) gone?

Peter Arwanitis spex66 at gmx.net
Wed Oct 19 11:07:40 MDT 2005


Hi,

OK, the riddle of the lost parameters is solved

part of my fault... cause I'm not able to render my nevow Page with 
plain-html (problem:1), Ive taken the the shortcut via hook in 
livepage.goingLive and
client.send(set('idOfMyDiv', plainHTMLasString), eol)

Fact is: in goingLive my parameters appended to the url (and visible in 
browser!) are LOST!!!

hacking down to liveglue.js they are abviously cut-of and trashed

my solution (pragmatic and without knowledge about sense and further 
sideeffects):

/* hacking liveglue.js * /
...
/* route parameter to server site */
var queryParam = '';
if (queryParamIndex != -1) {
  queryParam = '&' + base_url.substring(queryParamIndex+1, base_url.length);
  base_url = base_url.substring(0, queryParamIndex);
 }
...
function connect(outputNum) {
...
  /* building the url in connect() --> appending extracted parameter if any
     mysite/livepage_client/output?outputNum=0&when=20051010
*/
  var U = base_url + nevow_clientHandleId + "/output?outputNum=" + 
outputNum + queryParam;
...

now I can retrieve my parameters during goingLive (problem:2) solved

any hints for a better (existing) solution???
recommendations for (problem:1)?

bye
Peter
(=PA=)

Peter Arwanitis schrieb:

> Hi there,
>
> first: Thanks for nevow 0.5!
> JIT :) for evaluation and integration in an ongoing project of mine.
>
> Searching for AJAX features with python-support the "chatola" example 
> is an amazing eye-opener!!!
>
> The bi-directional support is stunning! And the code is compact...
>
> Hacking through the roughs, I have
> * migrated my existing twisted.web.server to nevow.appserver stuff: 
> DONE (cannot have them both, cause of interface-adaption-hell)
> * sucessful broadcasting from wxPython/twisted.reactor-application to 
> connected browsers, via send()
> * ...
>
> Problems I cannot hack:
> (problem:1) using nevow:render="store" and appropriate render_store() 
> method. I'm returning plain string WITH rendered html (from existing 
> code) --> HOW can I avoid the escaping of all '<' '&' and '>'??? No, 
> it's not sure that ii is xhtml.
> (problem:2) Problem using href-links form inside my lifepage with 
> additional parameters http://localhost:8080/lifesite?when=20051010 
> (not AJAX -> plain request)
> Where does my parameters gone??? only things like ('livepage_client', 
> '0', 'output') occuring?
>
> thanks for hints
> Peter
> (=PA=)
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Twisted-web mailing list
>Twisted-web at twistedmatrix.com
>http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>  
>




More information about the Twisted-web mailing list