Recent

Author Topic: Using fpWeb components  (Read 34037 times)

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Using fpWeb components
« Reply #15 on: February 28, 2009, 01:26:17 am »
Maybe return with the html code for the login page again?

or if you don't need an error message displayed then

AResponse.Content :=
  '<html><head><title>Redirection</title>' +
  '<meta http-equiv="refresh" content="0; url=' + 'URL where I wanna redirect' +'">' +
  '</head><body>Please wait...</body></html>';

or something similar


PS: Start new threads for new questions so this thread will not be a project development and hiccup history :)

sandeep_c24

  • Full Member
  • ***
  • Posts: 114
Re: Using fpWeb components
« Reply #16 on: March 08, 2009, 11:44:45 am »
Hi bobo

I have now finished my simple website using CGI. It works fine and as expected, but when I converted it to Apache Module it did not work properly.

What is happening is I am getting same page for different web actions. When I go to login page I get Login page correctly but when I click some link on the page, which points to another web action I do not see that page but see the Login page. This works properly in CGI.

I am using Templates as you explained earlier in this thread. But to me it looks like Template is a property of WebModule rather than of Action and for some reason Templates cannot be changed once assigned.

Sandeep

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Using fpWeb components
« Reply #17 on: March 08, 2009, 08:46:41 pm »
Hi,

Yes, there are a few patches I have submitted to correct a bunch of problems, but not yet included in the SVN.
I have attached a zip file (fcl-web-fixes.zip) that you can unzip in your /packages/fcl-web/ directory to have all the fixes.
Just overwrite the files there with the ones in the zip.

Also, in the next post I'll attach a bunch of examples on how to use templates (max upload is only 128KB so had to split into two).
They needed the above bug fixes to work properly.
You can unzip them into the fcl-web directory too.

Included fixes:
http://bugs.freepascal.org/view.php?id=13228
http://bugs.freepascal.org/view.php?id=13250
http://bugs.freepascal.org/view.php?id=13254
http://bugs.freepascal.org/view.php?id=13280
http://bugs.freepascal.org/view.php?id=13287
http://bugs.freepascal.org/view.php?id=13288

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Using fpWeb components
« Reply #18 on: March 08, 2009, 08:47:25 pm »
...here are the examples attached (they require the patches above to work, that are included in the above zip file)

« Last Edit: March 09, 2009, 10:12:11 pm by bobo »

sandeep_c24

  • Full Member
  • ***
  • Posts: 114
Re: Using fpWeb components
« Reply #19 on: March 10, 2009, 09:41:52 am »
Hi bobo

Thanks for that. The web app is working fine. I'll test it a bit more and get back if I find any problem.

Thanks again for the great work.

Sandeep

vfclists

  • Hero Member
  • *****
  • Posts: 827
    • HowTos Considered Harmful?
Re: Using fpWeb components
« Reply #20 on: October 08, 2010, 09:24:56 pm »
Loesje, do you have a good example of THTMLDatasetFormEditProducer working correctly? I tried it and it was all over the place. The form editor would not update the .lfm correctly, and the placement was hardly logical, and the row and column positioning was simply non existent. There is hardly any proper CSS labelling in the output.

Creating objects in code may work, but does laying out rows and columns in the IDE properties really work?

I am using a recent svn update, 27548 to be exact.

Quite a coincidence, I just explained my collegue how to use fpweb.

It totally lacks any documentation, though. And I don't have a simple example. But I can tell you what I told him:

 ----snip--------

Now you probably want somewhat more. Drop a THTMLDatasetFormEditProducer on your module and connect it to a datasource linked to a dataset, as you would do normally. You have to set TableCols and TableRows of the producer and add some columns which are bound to some data-fields.

Now set the 'ContentProducer' property of one of the actions to the THTMLDatasetFormEditProducer you just made. Compile and use your webbrowser to open the page with the right action. If all goes well it will show you some data from your dataset...

 --- snip

Windows - Lazarus 1.0.8/FPC 2.6.0
Linux - Lazarus 1.4.4 /FPC 2.6.4

 

TinyPortal © 2005-2018