r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Graham
22-Aug-2010
[8780x2]
This is a little odd .... I created a PDF and sent it back to the 
browser using the response, and application pdf, and the browser's 
security prevents it from downloading ....on some of the user's PC's 
( at a hospital ), but if I write the pdf to the disk and then redirect 
the browser to the file in the www directory, there's no complaint!
so, the browser is treating a PDF differently that is being sent 
directly via the response, as opposed to fetching the PDF using GET
Oldes
23-Aug-2010
[8782]
check the header.. probably using some other content-type.
Graham
23-Aug-2010
[8783x2]
it displays as a PDF for me ....
content-type is application/pdf
Oldes
23-Aug-2010
[8785]
Use wireshark and check for differencies
Graham
23-Aug-2010
[8786x2]
I used Firefox headers ...
The difference is between a GET and POST ... I wonder if the hospital 
has configure their security this way
Oldes
23-Aug-2010
[8788]
And cannot you store the generated PDF in temp and redirect to it's 
location using the GET request?
Graham
23-Aug-2010
[8789]
That's what I am having to do ...
florin
24-Aug-2010
[8790x5]
Graham, how'd you go about doing it?
Graham: Terry, I'm trying to get away from mixing html and rebol 
inside the view part of the page ...  this type of stuff   Hello 
<%= select session/content 'username %> ... looks hard to maintain.
Is the app-init.r file the place to map a template file (.html) to 
a mirror .r file? If so, we could use the response/buffer to have 
access to the dom. I tried to use the app-init.r file yet it did 
not work for me.
Wicket and Click are great example of how to get away from using 
scripting inside template files or even tags.
If I find a framework that does this for rebol, it will be the reason 
I'm looking for.
Graham
24-Aug-2010
[8795x2]
What's the question?
I pretty much gave up on using the app-init.r file ... it is supposed 
to be local to the app, but I found variables spilling to other apps
florin
24-Aug-2010
[8797]
The question is the remark you make to Terry: I'm trying to get away 
from mixing html and rebol inside the view part of the page ...  
this type of stuff   Hello <%= select session/content 'username %> 
... looks hard to maintain.
Graham
24-Aug-2010
[8798]
That's my remark ... what's your question?  :)
florin
24-Aug-2010
[8799x2]
What need for clean templeting is access to the html source file. 
I'd use the element ID to match with a backing .r file variable / 
component model. No scripting, no tags in the html file. So the question 
is, how can cheyenne let me map these two files?
/path-to-file/page.html mapping to /same-path/page.r. From here, 
page.r works on the response/buffer.
Graham
24-Aug-2010
[8801x2]
So chyenne loads page.html and does what?
You want cheyenne to load page.r instead?
florin
24-Aug-2010
[8803x2]
allows a mapped file to access the response/buffer before it returns 
it.
Yes, where page.r manipulates page.thml
Graham
24-Aug-2010
[8805]
maybe you need this http://cheyenne-server.org/docs/rsp-api.html#def-56
florin
24-Aug-2010
[8806]
exactly. I tried that tonight as I look at cheyenne for the first 
time. However, the on-page-start/end do not seem to work (in debug 
mode). The instructions are so simple I wonder why it would not work 
though.
Graham
24-Aug-2010
[8807x2]
are you using rsp pages?
And is it inside a webapp?
florin
24-Aug-2010
[8809x2]
Aha. No. I guess that's where it is. I used .htm. Yet I found that 
the script in the .htm file also is processed. So there is a difference.
Yes, inside a webapp.
Graham
24-Aug-2010
[8811x3]
It sounds like you want to do what I'm doing here http://rebol.wik.is/Cheyenne/Page_Title/HTML_dialect_demo
 

but have the html page act as the template
whereas i put both together
the element id or divs are used to control the layout of the template
florin
24-Aug-2010
[8814x2]
Yep. Yet, to my mind, it does not achieve my objective.
There is no way a page designer would get into this mess. Appealing 
though.
Graham
24-Aug-2010
[8816]
in that case .. the rsp page would just load the html ... no real 
difference
florin
24-Aug-2010
[8817]
What I need, is a clean html page that my code would not touch directly.
Graham
25-Aug-2010
[8818x2]
well, this has limitations.. what say you want to update all the 
javascript ??
and most html is dynamically generated for me ...
florin
25-Aug-2010
[8820]
From the html page? The javascript would only execute after the response 
buffer is closed.
Graham
25-Aug-2010
[8821x2]
I'm assuming that the JS and HTML are part of your template
so say your library updates . .you have to update all the pages that 
use the js libraries
florin
25-Aug-2010
[8823x3]
The JS is executed by the browser once the buffer is returned to 
the browser. What I want is a mapped .r file to process the DOM source 
on the server side. I don't see where the JS concern.
Graham: so say your library updates . .you have to update all the 
pages that use the js libraries" . The answer is yes. The html file 
would generally behave as any other html file that is not backed 
up by any server side.
There could be a application.r file that allows for global / conditional 
page includes. What I care most is that the html file remains as 
a designer wants it - no scripting.
Graham
25-Aug-2010
[8826]
well, the current rsp script name may be accessible ..and if so, 
you can just load in the html page
florin
25-Aug-2010
[8827x2]
Good. What route do I go to show the .html extension in the browser 
though?
bind-extern RSP to [.htm .j .rsp] ?
Graham
25-Aug-2010
[8829]
sounds like it