GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATA::TREEDUMPER::RENDERER::DHTML (3)

.ds Aq ’

NAME

Data::TreeDumper::Renderer::DHTML - DHTML renderer for Data::TreeDumper

CONTENTS

SYNOPSIS



  use Data::TreeDumper ;
 
  #-------------------------------------------------------------------------------
 
  my $style ;
  my $body = DumpTree
                (
                GetData(), Data,
                DISPLAY_ROOT_ADDRESS => 1,
                DISPLAY_PERL_ADDRESS => 1,
                DISPLAY_PERL_SIZE => 1,
                RENDERER =>
                        {
                        NAME => DHTML,
                        STYLE => \$style,
                        BUTTON =>
                                {
                                COLLAPSE_EXPAND => 1,
                                SEARCH => 1,
                                },
                        },
                ) ;
               
               
  print <<EOT;
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!DOCTYPE html
       PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  >
 
  <html>
 
  <!--
  Automatically generated by Perl and Data::TreeDumper::DHTML
  -->
 
  <head>
  <title>Data</title>
 
  $style
  </head>
  <body>
  $body
 
  <p>
     <img src=http://www.w3.org/Icons/valid-xhtml10 alt=Valid HTML 4.01! height="15" width=44 />
  </p>
 
  </body>
  </html>
  EOT



DESCRIPTION

Simple DHTML renderer for <B>Data::TreeDumperB>.

Thanks to Stevan Little author of Tree::Simple::View for giving me the idea and providing some code I could snatch.

EXAMPLE

Check <B>dhtml_test.plB> for a complete example of two structure dumps within the same HTML file.

OPTIONS

    Style

CSS style is dumped to $setup->{RENDERER}{STYLE} (a ref to a scalar) if it exists. This allows you to collect all the CSS then output it at the top of the HTML code.



  my $style ;
  my $body = DumpTree
                (
                ...
               
                RENDERER =>
                        {
                        NAME => DHTML,
                        STYLE => \$style,
                        },
                ) ;



{RENDERER}{NO_STYLE} removes style section generation. This is usefull when you defined your styles by hand.



  my $style ;
  my $body = DumpTree
                (
                ...
               
                RENDERER =>
                        {
                        NAME => DHTML,
                        NO_STYLE => 1,
                        },
                ) ;



    Class

The output will use class ’data_tree_dumper_dhtml’ for <li> and <ul>. The class can be renamed with the help of {RENDERER}{CLASS}. This allows you to dump multiple data structures and display them with a diffrent styles.



  my $style ;
  my $body = DumpTree
                (
                ...
               
                RENDERER =>
                        {
                        NAME => DHTML,
                        CLASS => my_class_name,
                        },
                ) ;



    Glyphs

<B>Data::TreeDumperB> outputs the tree lines as ASCII text by default. If {RENDERER}{NO_GLYPH} and RENDERER}{NO_STYLE} are defined, no lines are output and the indentation will be the default <li> style. If you would like to specify a specific style for your tree dump, defined you own CSS and set the appropriate class through {RENDERER}{CLASS}.

    Expand/Collapse

Setting {RENDERER}{COLLAPSED} to a true value will display the tree collapsed. this is false by default.



  $setup->{RENDERER}{COLLAPSED}++ ;



If {RENDERER}{BUTTON}{COLLAPSE_EXPAND} is set, the rendered will add a button to allow the user to collapse and expand the tree.



  $setup->{RENDERER}{BUTTON}{COLLAPSE_EXPAND}



    Search

If {RENDERER}{BUTTON}{SEARCH} is set, the rendered will add a button to allow the user to search the tree. This is a primitive search and has no other value than for test.

Bugs

I’ll hapilly hand this module over to someone who knows what he does :-)

Check the TODO file.

EXPORT

None

AUTHORS

Khemir Nadim ibn Hamouda. <nadim@khemir.net>

Staffan Maahle\k:'\h |\n:un.



  Copyright (c) 2003 Nadim Ibn Hamouda el Khemir and
  Staffan Maahle\k:'All rights reserved.
 
  This program is free software; you can redistribute
  it and/or modify it under the same terms as Perlitself.



If you find any value in this module, mail me! All hints, tips, flames and wishes are welcome at <nadim@khemir.net>.

SEE ALSO

<B>Data::TreeDumperB>.

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 669: Non-ASCII character seen before =encoding in ’Maahle\k:'Assuming ISO8859-1
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DHTML (3) 2008-12-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.