OpenInteract2::Manual::Widgets

OpenInteract2::Manual::Widgets Perl module contains template widgets in OpenInteract.
Download

OpenInteract2::Manual::Widgets Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Chris Winters
  • Publisher web site:
  • http://search.cpan.org/~cwinters/SPOPS-0.87/SPOPS/SQLInterface.pm

OpenInteract2::Manual::Widgets Tags


OpenInteract2::Manual::Widgets Description

OpenInteract2::Manual::Widgets Perl module contains template widgets in OpenInteract. OpenInteract2::Manual::Widgets Perl module contains template widgets in OpenInteract.OpenInteract2 supports using templates as a simple graphical widget. A widget is a common element into which you can just plug in text or parameters to customize it. For example, an 'INPUT' element of type 'TEXT' is a particular type of widget -- you can customize its size, name, and default value. (Some widget implementations will maintain state for you across requests, have validation, etc. These don't do that.)Widgets can also include other widgets. Such as a row that uses the 'INPUT TEXT' widget described above to create a labeled input field, with a label on the left and the input widget on the right.One of the main benefits of using these over HTML is centralization -- a change in one place enacts changes throughout your site. All column headers can look a certain way and be changed easily, all textboxes can be consistent and you can create widgets specific to your site and needs -- such as for inputting dates or money, or displaying addresses-- for a consistent user interface.Here's an example: < input type="text" name="" value="" size="" maxlength="" > And you would reference this like: And when the template is processed, get in return: < input type="text" name="batting_average" value=".389" size="5" maxlength="50" >Calling widgets from other widgets is just as simple: < /td >< /tr >Here we call three separate items, two of which ('label_row_begin' and 'data_cell_begin') aren't really 'widgets' but rather just named areas for common code. This might be called: And result in: < tr valign="middle" > < td align="right" >< b >Batting Average< /b >< /td > < td align="right" > < input type="text" name="batting_average" value=".389" size="5" maxlength="50" > < /td > < /tr >And you're not restricted to simple fill-in elements either. You can represent a common data-oriented widget -- such as a drop-down box representing countries your company services -- in this manner as well. Here's how such a call might look: Using this, the page designer doesn't care how many countries the company services, whether a new one has been added to the list, etc. Just make the call and the graphic element will be created the same way every time.Using these template widgets you can build a library of display elements very quickly. Requirements: · Perl


OpenInteract2::Manual::Widgets Related Software