Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[ANNOUNCEMENT] DB_DataObject_FormBuilder-0.10.0 (beta) Released.
The new PEAR package DB_DataObject_FormBuilder-0.10.0 (beta) has been released at 
http://pear.php.net/.

Release notes
-------------
This version introduces major BC breaks, mostly dealing with the names and l
ocations of configuration variables most of which can be corrected by using 
a provided fix script(s). If you have already used FormBuilder in your curre
nt projects, please read al
l of this very carefully!

MAJOR BC BREAKS -- Please read all comments below before trying to use this 
version!
This checkin is the result of an attempt at unifying the various parts of th
e FormBuilder API, unifying the coding styles, and conforming to PEAR CS. Th
is *will* break your application.

All options are now configurable through the DataObject. Any option that cou
ld be in the FormBuilder can now be in the DataObject.

All options in the DataObject now have a "fb_" prefix to distinguish them fr
om field names.

All options in both the FormBuilder and DataObject were changed to use studl
yCaps instead_of_underscores.

Some few options have changed names. For example, follow_links is now linkDi
splayLevel.

All options may be specified in the [DB_DataObject_FormBuilder] section of t
he ini file. For options that are DataObject specific, these are set as defa
ults. The DataObject may change them through its options. linkDisplayFields 
and linkOrderFields (see be
low) are arrays and set the same as elementTypeMap.

All options in the [DB_DataObject_FormBuilder] section of the ini file are c
opied into the FormBuilder when it is instantiated. Hence, changing $GLOBALS
 ['_DB_DATAOVJECT_FORMBUILDER']['CONFIG']
 after you create your FormBuilder w
ill no longer work.

All options in the DataObject (except for those that start with "select") ar
e copied to the FormBuilder after preGenerateForm is called. This is to cut 
down on the internal complexity of FormBuilder. This means that you cannot c
hange options in the DataOb
ject after preGenerateForm (such as in postGenerateForm). We don't see this 
as a problem as you can set everything up before then and (nearly) all optio
ns are used once postGenerateForm is called. If you know of a problem with t
his, please send us an e-ma
il or a bug report. This also means that you cannot re-use a FormBuilder obj
ect as the settings of the previous FormBuilder will persist.

The database.formBuilder.ini file is no longer used. Select display and orde
r fields should be put in the DO file as linkDisplayFields and linkOrderFiel
ds. The fix0.9.0Files.php script will move these options into your DataObjec
t classes automatically.

If you were previously using the 0.9.0 release, the script in CVS called fix
0.9.0Files.php should be able to fix all BC breaks in your code and ini file
s. If it doesn't please send an e-mail to justinpatrin@php.net so that I can
 fix it. You can download t
he script from this URL: http://cvs.php.net/pear/DB_DataObje... />
0Files.php

If you were previously using a CVS version of FormBuilder.php after 1.36 up 
to 1.52, the script in CVS called fixPre1.52CVSFiles.php should be able to f
ix any BC problems you have. All this script does is rename sleect*Fields to
 link*Fields. You can downl
oad the script from this URL: http://cvs.php.net/pear/DB_DataObje....52CVSFiles.php

For a list of all changes, please see the CVS changelogs for FormBuilder.php
. Of particular interest should be the changelog for CVS version 1.37.

FURTHER IMPROVEMENTS AND MODIFICATIONS:
- Added crossLinkSeparator option
- Added TIME element handling (Thanks to Frank Fahs)
- Added support for ENUM select or radio generation
3 new options: enumFields, enumOptions, and enumOptionsCallback
- Added linkElementTypes option
- selectAddEmpty is now an array which should be filled with link fields tha
t should have an empty option in their select box i.e., the option has moved
 from the linked to the linker
- Removed QuickForm-specific functions from main class and introduced new Qu
ickForm-driver class. A third parameter was added to the factory method to d
etermine which driver is to be used.
- Fixed bug 1829 - date callbacks not called correctly
- Fixed issues with unset member vars and $options array in constructor
- Better array handling for ini-arrays
- Added more ini options to array handling
- Array based options may be single values without a comma
- Array based options which have no need for keys (selectDisplayFields, etc.
) don't need the key
- Fixed bug where linked fields in selectDisplayFields didn't know their own
 selectDisplayFields
- Fixed bug where cross/tripleLinks are frozen if not in userEditableFields 
array
- Added missing createSubmit option
- Fixed Bug #1715 (minutes and seconds are lost in _array2date)
- Got rid of Required QF rule for NOT NULL fields which are frozen
- Fixed bug 1699 (Notice: Undefined property _triple/_crossLinks)
- Fixed bug 1700 (Notice: Array to string conversion)
- Added freezing of triplelink elements accoring to elements_to_freeze
- Added missing code to freeze fields not in userEditableFields (if it exist
s)
- Added code to allow any field to be a link field
- Fixed bug #1500, adding fallback to displaying the primary key in selectbo
xes if a select_display_field cannot be identified (patch by Justin Patrin)
- Fixed bug #1459 (Thanks to Justin Patrin)
- New feature: Add required rule for NOT NULL fields (Bug #1487, thanks to J
ustin Patrin)
- New feature: Add field name to error messages.
- Small change to getDataObjectSelectDisplayValue() making use of getLink() 
instead of links().

The FormBuilder Wiki has up-to-date documentation:
http://opensource.21st.de/tiki-inde...ect_FormBuilder

Package Info
-------------
DB_DataObject_FormBuilder will aid you in rapid application development usin
g the packages DB_DataObject and HTML_QuickForm. For having a quick but work
ing prototype of your application, simply model the database, run DataObject
´s createTable script over
it and write a script that passes one of the resulting objects to the FormBu
ilder class. The FormBuilder will automatically generate a simple but workin
g HTML_QuickForm object that you can use to test your application. It also p
rovides a processing method
that will automatically detect if an insert() or update() command has to be 
executed after the form has been submitted. If you have set up DataObject´s 
links.ini file correctly, it will also automatically detect if a table field
 is a foreign key and will
populate a selectbox with the linked table's entries. There are many optiona
l parameters that you can place in your DataObjects.ini or in the properties
 of your derived classes, that you can use to fine-tune the form-generation,
 gradually turning the pro
totypes into fully-featured forms, and you can take control at any stage of 
the process.

Related Links
-------------
Package home: http://pear.php.net/package/DB_DataObject_FormBuilder
Changelog: http://pear.php.net/package/DB_Data...lder-0.10.0.tgz

Authors
-------------
Norbert Mocsnik (developer)
Markus Wolff <wolff@21st.de> (lead)
Justin Patrin <papercrane@reversefold.com> (lead)

Report this thread to moderator Post Follow-up to this message
Old Post
Pear Announce
08-28-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:52 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.