CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Wishes

 Dynamic Includes

Print topic Send  topic

Author Message
materix

Posts: 161
Posted: 05/12/2008, 7:06 AM

It would be great if it could be set dynamically if a page should be included or not.
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/13/2008, 7:20 AM

disclaimer: I am not trying to outsmart anyone.

Could you please elaborate on your wish:
1/ A page has several included pages, and you want to control wether to show (some of) them or not.
2/ A page is made as an includable page, and you want to be able to dynamically set the page to be an includable or a normal page.
3/ something else......

I solve
1/ on the main page I put a panel for each includable page, on the panel I put the includable page.
Then I dynamically set Panel visible or not.

2/Create a page, set it includable.
Create another page and add the includable page, this page will function as the 'normal page'.
Anywhere else I like to use the includable page, I just add it to that page.

3/.....

Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
materix

Posts: 161
Posted: 05/13/2008, 7:35 AM

Hi Walter.

Thanks for the reply.

I was thinking about no. 1. Your idea to use Panels to control if a include page is visible or not, sound like a good idea. Have not thought about that.
But, as I understand this, then all pages are still included but not shown. This can become a problem with bigger applications, where you would have a lot of different include pages. At least it would affect performance. A "cleaner" option would be if the pages were not included at all, for "views" where they are not needed.
View profile  Send private message
wkempees


Posts: 1679
Posted: 05/13/2008, 8:01 AM

Ok, so for option1:

You are right, the IncludedPage is
  
//Include Page implementation @85-91036813  
include_once(RelativePath . "/NewIncludablePage1.php");  
//End Include Page implementation  

in the main page Initialize it is initialized as well
  
$IncludePanel = & new clsPanel("IncludePanel", $MainPage);  
$NewIncludablePage1 = & new clsNewIncludablePage1("", "NewIncludablePage1", $MainPage);  
$NewIncludablePage1->Initialize();  

The $NewIncludablePage1->Initialize however returns if not Visible

So no actual processing is taking place.
[correction]
I just added a
  
//Initialize Method @2-90E704C5  
    function Initialize()  
    {  
        if(!$this->Visible) return;  
		print ('HEY HALLO');  
  
and it happily displayed itself................
There is no way to set visible True/False for an included page!

I agree however you are carrying around some overhead (times n)
And now I even have to agree on to much processing being performed........

Still, I wonder if a better mechanism is viable, as the described method does properly initialize and cleanup....

We'll wait and see what other responses we might have triggered!

Walter



_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.