Wim Dumon wrote:
> 2010/1/16 OvermindDL1 <[email protected]>:
>   
>> On Sat, Jan 16, 2010 at 5:05 AM, Wim Dumon <[email protected]> wrote:
>>     
>>> Hi,
>>>
>>> anchor = new WAnchor(new WFileResource("text/html", "/path/to/file",
>>> this), this);
>>> anchor->setTarget(Wt::TargetNewWindow);
>>> Note that any file in the --docroot=... directory is accessible
>>> through http, so you could also use an anchor without a WResource
>>> (depends a bit on whether this is a public file, or session-specific,
>>> or ...)
>>>       
>> Did not he say "in wt,no html file .some time ,I want to dynamic
>> generate page ,but no need generate a disk file html", which I can
>> only take to mean that he does not want to display an actual file, and
>> he does not want to write a file to disk, but wants to generate it on
>> the fly?
>>
>>     
>
> My apologies, I must have misread the question. In that case, either
> use a WMemoryResource or inherit from WResource and put your
> HTML-generating code there.
>   

For a template based approach I highly recommend 
http://nulidex.com/code/docs/html_template/, I have used it on several 
occasions.

Cheers,
Brad

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to