>
>I don't understand the Widget::Controller.  Can you say more about this?
>
>Also will we require XML to configure? Or is this also an optional feature 
>that you more or less want for yourself but others can choose to not use?
>

Hi,

Below is running code for the Perl Widget Library.
So far, there are only two widgets.

  * a generic Widget::HTML::Element
  * a drop-down menu Widget::HTML::Select

Are there early comments on the interface from Perl?
Is this shaping up into what was desired?

Stephen

shark:/usr/ov/acoc/dev/src/Widget/examples> more Widget.xml Widget.2
::::::::::::::
Widget.xml
::::::::::::::
<config>
  <widget      name="first_name" tag='input' type='text' size='14'
maxlength='99'/>
  <widget      name="last_name"  widget-class='Widget::HTML::Element'
tag='input' type='text' size='14' maxlength='99'/>
  <widget      name="birth_dt"   widget-type='date'/>
  <widget      name="sex"        widget-type='sex'/>
  <widget-type name="date" tag='input' type='text' size='14' maxlength='99'/>
  <widget-type name="sex"  widget-class='Widget::HTML::Select' domain='sex'/>
  <domain      name="sex">
    <item      name="M" label="Male"/>
    <item      name="F" label="Female"/>
  </domain>
</config>
::::::::::::::
Widget.2
::::::::::::::
#!/usr/local/bin/perl

use lib "..";

   use Widget;

   my ($wc, $widget, @widgets);
   $wc = Widget->controller();

   $widget = $wc->widget("first_name");
   print "First Name: ", $widget->html(), "\n";

   $widget = $wc->widget("last_name");
   print "Last Name: ", $widget->html(), "\n";

   $widget = $wc->widget("birth_dt");
   print "Birth Date: ", $widget->html(), "\n";

   $widget = $wc->widget("sex");
   print "Sex: ", $widget->html(), "\n";

shark:/usr/ov/acoc/dev/src/Widget/examples> Widget.2
First Name: <input name='first_name' maxlength='99' size='14' type='text'/>
Last Name: <input name='last_name' maxlength='99' size='14' type='text'/>
Birth Date: <input name='birth_dt' maxlength='99' size='14' type='text'/>
Sex: <select name='sex'>
  <option value='M'>Male</option>
  <option value='F'>Female</option>
</select>



Reply via email to