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 -> General/Other

 How to get a collection of all labels ?

Print topic Send  topic

Author Message
roeya


Posts: 181
Posted: 02/21/2005, 12:53 PM

Is there an official way to retrieve the collection of all labels in a web page (and if possible in all its includable pages) ?

I can hack the page using a debugger but I prefer the official way to do it (if there is an official way…)

If there is one it is probably relevant to all languages (e.g. Perl, PHP etc). If you know a way good for Perl it is also fine

_________________
http://www.infoneto.com/
View profile  Send private message
peterr


Posts: 5971
Posted: 02/21/2005, 1:49 PM

I don't think that there is an official way to do that in PHP or Perl, but possibly someone in our support could help you figure something out.
A possible solution for ASP was posted here:
http://forums.codecharge.com/posts.php?post_id=46849
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
roeya


Posts: 181
Posted: 02/21/2005, 2:36 PM

after posting I played a little with the code and I found the following ways
1.Change the clsControl class Show method - it works but if it is used it may cause problems in future regenration of the project
2.In the page before show event I used $Tpl to get list of all elements that has specific name prefix (force me to set labels name with prefix) after that using eval I set the Labels values:

  
my $labels = $Tpl->{blocks}->{'/main'};  
my @labels = @$labels;  
my $count = shift @labels;  
for(my $i=1; $i < $count; $i+=2)  
{  
	my $label = $labels[$i];  
	if (substr($label, 0, 4) eq 'lbl_')  
	{  
		my $temp = "\$" . $label . "->{HTML} = 1;";  
		my $val = qq{"<div>$label</div>"};  
		$temp .= "\$" . $label ."->SetValue($val);";  
		eval $temp;  
	}  
}  
  

The problem it forces me to give special names to labels but it scales better

the '/main' map entry is somewhat magic string , does someone knows what possible values it has ? does is always '/main' ?



_________________
http://www.infoneto.com/
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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