[opencms-dev] Urgent-Creating HTML page dynamically in OpenCms

Rene Hinojosa R_Hinojosa at Cityofsouthfield.com
Fri Sep 12 20:40:02 CEST 2003


It's probably caused by the VFS(database) and the real file system. If you create a page in the real filesys, its not automatically transfered into the db. I think the WYSIWYG reads from the database. Thats why you get a blank page. Might want to look at the workplace api to see if there's anything there that might help you or use the syncro module to sync the real and virtual filesystems.

Rene

>>> ivan.jelenic at nbs.yu 09/12/03 09:24AM >>>
Hi,

Maybe this wiil help:

byte[] contents = new byte[something];
Hashtable props = new Hashtable();

try {

  CmsResource newfile =
cms.createResource("/Home/","uputstvo.html","page",props,contents);
  CmsXmlControlFile controlFile = new CmsXmlControlFile(cms,
(CmsFile)newfile);

controlFile.setMasterTemplate("/system/modules/org.opencms.default/templates
/empty");
  controlFile.write();
  out.println("File is created!");

 } catch(Exception e) {

  out.println("Error !!!");

 }

But, when I opened this page in WYSIWYG editor I saw a blank page. In
browser everything is OK and the page is successfully displayed.

Best regards, Ivan.


----- Original Message ----- 
From: "srinivas voleti" <srini_2105 at hotmail.com>
To: <opencms-dev at opencms.org>
Sent: 12 September, 2003 2:54 PM
Subject: [opencms-dev] Urgent-Creating HTML page dynamically in OpenCms


> Hi All:
>
> Is there any way to create a html page dynamically into OpenCms. I have
seen
> a method for doing that
> cmsObject.createResource("/temp/", "1", null, new byte[0], null );
>
> Im trying out with the above method. If anyone has done this before,
please
> respond.
>
> Regards,
> Srini.
>
> _________________________________________________________________
> Get personal loans. It's hassle-free.
>
http://server1.msn.co.in/msnleads/citibankpersonalloan/citibankploanjuly03.asp?type=txt 
> It's approved instantly.
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev 


_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list