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 -> IDE/GUI

 Restricting SQL Execution PHP

Print topic Send  topic

Author Message
greengraduate

Posts: 6
Posted: 08/24/2006, 8:40 AM

HI,

I am trying to get the list of components hidden on a form, the components are hidden using panels.

1. This seems to be the Java code for doing this:

for (Iterator it = e.getPage().getPanel("Panel1").getComponents().iterator();
it.hasNext(); ) {
Object obj = it.next();
if (obj instanceof Component) {
((Component) obj).setAllowRead(false);
}

}

Qn. Is there equivalent PHP code for doing this?

2. General PHP question.

A class variable can be accessed like this:

$object_name->inner_object_name->var_name

Is there a way of accessing var name dynamically, i.e. someting like

$object_name->inner_object_name['var_name'] , this doesn't work of course, I am looking for something like it.


Thanks.





_________________
'The only constant thing about software is change' - ?
View profile  Send private message
jres
Posted: 08/24/2006, 10:37 PM

1. I have found solution in CCS help: Examples and Techniques -> Programming -> Working with Panels -> Iterating Panel Controls

//Regular page
global $Panel1;

foreach ($Panel1->Components as $Name => $Component) {
$Component->Visible = false;
}

//Includable page:
global $Page1;

foreach ($Page1->Panel1->Components as $Name => $Component) {
$Component->Visible = false;
}
greengraduate

Posts: 6
Posted: 08/25/2006, 1:24 AM

Thanks jres.

Here is a related question. If I have panels, panel1 and panel2 on a page.

How can I get these panels without having to name them literally. That is, is there an array of panels? I looked at the page structure using print_r, but i could not find anything that I could use.

At the moment I am accessing the panels as you suggested, but I guess I am looking for a lazy way out.

If there is a list of panels, such as an array, then I can change the number of panels without changing the code and I can use the same code on all my pages. It basically saves me from placing the panels in an array myself.

Thanks.
_________________
'The only constant thing about software is change' - ?
View profile  Send private message
WKempees
Posted: 08/25/2006, 1:37 AM

Might be useful:
http://forums.codecharge.com/posts.php?post_id=76015&s_keyword=component

Walter


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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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