PHP Class ExampleForm, qcodo

Inheritance: extends QForm
Show file Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$btnAdd
$btnAlert
$btnButton
$btnCalendar
$btnCalendarPopup
$btnCancel
$btnConfirm
$btnDatePicker
$btnDateTimePicker
$btnDateTimeTextBox
$btnDeleteLeft
$btnFocus
$btnForceUpdate1
$btnForceUpdate2
$btnJavaScript
$btnMoveLeft
$btnMoveRight
$btnNew
$btnSave
$btnSave1
$btnSave2
$btnSelect
$btnToggleDisplay
$btnToggleEnable
$btnUpdate
$calCalendar
$calCalendarPopup
$chkScaleCanvasDown
$colFirstName
$colId DataGrid Columns
$colLastName
$ctlCustom
$dtgPerson
$dtgPersons Declare the DataGrid
$dtpDatePicker
$dtpDateTimePicker
$dtxCalendar
$dtxDateTimeTextBox
$flaSample
$imgSample
$intEditPersonId This value is either a Person->Id, "null" (if nothing is being edited), or "-1" (if creating a new Person)
$lblArray
$lblMessage Local declarations of our Qcontrols
$lblResponse
$lblResult
$lblSelected
$lblTimestamp1
$lblTimestamp2
$lstFont
$lstListbox
$objPerson1 Local Person Objects
$objPerson2
$objPersonReference Get the Current Person Object (just for reference)
$pnlCode
$pnlHover
$pnlLeft through using GetChildControls() and AutoRenderChildren
$pnlPanel through using AutoRenderChildren
$pnlRight
$pxyExample RenderAsHref() and RenderAsEvents() on it.
$strMessage For this example, show how the panel can display this strMessage
$tnvExample
$txtArray
$txtDisplay
$txtEnable
$txtFirstName
$txtFirstName1
$txtFirstName2
$txtFocus
$txtHeight
$txtItem
$txtLastName
$txtLastName1
$txtLastName2
$txtMessage1
$txtMessage2
$txtWidth

Public Methods

Method Description
DisplayFullName ( Person $objPerson ) note that DisplayFullName is a PUBLIC function -- because it will be called by the QDataGrid class.
EditColumn_Render ( Person $objPerson ) should be disabled. Otherwise, show the edit button normally.
FirstNameColumn_Render ( Person $objPerson ) show the textbox. Otherwise, display the contents as is.
LastNameColumn_Render ( Person $objPerson ) show the textbox. Otherwise, display the contents as is.
chkSelected_Render ( Person $objPerson ) This method (declared as public) will help with the checkbox column rendering

Protected Methods

Method Description
AddListItem ( )
Form_Create ( )
Form_Load ( )
Form_PreRender ( )
Form_Validate ( ) Let's ensure that a width or a height value is specified -- just so that we don't get people rendering really large versions of the image
MoveTextbox ( $strFormId, $strControlId, $strParameter ) move one of the textboxes from one panel to the other
SavePerson ( $strFormId, $strControlId, $strParameter ) The SavePerson Event Handler
SavePersonForceUpdate ( $strFormId, $strControlId, $strParameter ) The SavePersonForceUpdate Event handler
TextItem_Cancel ( $strFormId, $strControlId, $strParameter )
TextItem_Save ( $strFormId, $strControlId, $strParameter )
btnButton_Click ( $strFormId, $strControlId, $strParameter ) The "btnButton_Click" Event handler
btnCancel_Click ( $strFormId, $strControlId, $strParameter ) Handle the action for the Cancel button being clicked.
btnConfirm_Click ( )
btnDeleteLeft_Click ( $strFormId, $strControlId, $strParameter ) Handle the action to delete a control from pnlLeft
btnEdit_Click ( $strFormId, $strControlId, $strParameter ) we are editing.
btnNew_Click ( $strFormId, $strControlId, $strParameter ) contents of the Firstname and LastName textboxes.
btnSave_Click ( $strFormId, $strControlId, $strParameter ) Handle the action for the Save button being clicked.
btnUpdate_Click ( $strFormId, $strControlId, $strParameter )
chkSelected_Click ( $strFormId, $strControlId, $strParameter ) This btnCopy_Click action will actually perform the copy of the person row being copied
dtgPersons_Bind ( )
lblArray_Click ( $strFormId, $strControlId, $strParameter )
lblMessage_Click ( $strFormId, $strControlId, $strParameter )
lstFont_Change ( $strFormId, $strControlId, $strParameter )
lstListbox_Change ( )
pxyExample_Click ( $strFormId, $strControlId, $strParameter ) Notice how the optional "action parameter" we used in the RenderAsHref() or RenderEvents() call gets passed in as $strParameter here.
tnvExample_AddItems ( $strDirectory, $objParentItem = null )
tnvExample_Change ( $strFormId, $strControlId, $strParameter )
txtItem_KeyPress ( )

Method Details

AddListItem() protected method

protected AddListItem ( )

DisplayFullName() public method

note that DisplayFullName is a PUBLIC function -- because it will be called by the QDataGrid class.
public DisplayFullName ( Person $objPerson )
$objPerson Person

EditColumn_Render() public method

should be disabled. Otherwise, show the edit button normally.
public EditColumn_Render ( Person $objPerson )
$objPerson Person

FirstNameColumn_Render() public method

show the textbox. Otherwise, display the contents as is.
public FirstNameColumn_Render ( Person $objPerson )
$objPerson Person

Form_Create() protected method

protected Form_Create ( )

Form_Load() protected method

protected Form_Load ( )

Form_PreRender() protected method

protected Form_PreRender ( )

Form_Validate() protected method

Let's ensure that a width or a height value is specified -- just so that we don't get people rendering really large versions of the image
protected Form_Validate ( )

LastNameColumn_Render() public method

show the textbox. Otherwise, display the contents as is.
public LastNameColumn_Render ( Person $objPerson )
$objPerson Person

MoveTextbox() protected method

move one of the textboxes from one panel to the other
protected MoveTextbox ( $strFormId, $strControlId, $strParameter )

SavePerson() protected method

The SavePerson Event Handler
protected SavePerson ( $strFormId, $strControlId, $strParameter )

SavePersonForceUpdate() protected method

The SavePersonForceUpdate Event handler
protected SavePersonForceUpdate ( $strFormId, $strControlId, $strParameter )

TextItem_Cancel() protected method

protected TextItem_Cancel ( $strFormId, $strControlId, $strParameter )

TextItem_Save() protected method

protected TextItem_Save ( $strFormId, $strControlId, $strParameter )

btnButton_Click() protected method

The "btnButton_Click" Event handler
protected btnButton_Click ( $strFormId, $strControlId, $strParameter )

btnCancel_Click() protected method

Handle the action for the Cancel button being clicked.
protected btnCancel_Click ( $strFormId, $strControlId, $strParameter )

btnConfirm_Click() protected method

protected btnConfirm_Click ( )

btnDeleteLeft_Click() protected method

Handle the action to delete a control from pnlLeft
protected btnDeleteLeft_Click ( $strFormId, $strControlId, $strParameter )

btnEdit_Click() protected method

we are editing.
protected btnEdit_Click ( $strFormId, $strControlId, $strParameter )

btnNew_Click() protected method

contents of the Firstname and LastName textboxes.
protected btnNew_Click ( $strFormId, $strControlId, $strParameter )

btnSave_Click() protected method

Handle the action for the Save button being clicked.
protected btnSave_Click ( $strFormId, $strControlId, $strParameter )

btnUpdate_Click() protected method

protected btnUpdate_Click ( $strFormId, $strControlId, $strParameter )

chkSelected_Click() protected method

This btnCopy_Click action will actually perform the copy of the person row being copied
protected chkSelected_Click ( $strFormId, $strControlId, $strParameter )

chkSelected_Render() public method

This method (declared as public) will help with the checkbox column rendering
public chkSelected_Render ( Person $objPerson )
$objPerson Person

dtgPersons_Bind() protected method

protected dtgPersons_Bind ( )

lblArray_Click() protected method

protected lblArray_Click ( $strFormId, $strControlId, $strParameter )

lblMessage_Click() protected method

protected lblMessage_Click ( $strFormId, $strControlId, $strParameter )

lstFont_Change() protected method

protected lstFont_Change ( $strFormId, $strControlId, $strParameter )

lstListbox_Change() protected method

protected lstListbox_Change ( )

pxyExample_Click() protected method

Notice how the optional "action parameter" we used in the RenderAsHref() or RenderEvents() call gets passed in as $strParameter here.
protected pxyExample_Click ( $strFormId, $strControlId, $strParameter )

tnvExample_AddItems() protected method

protected tnvExample_AddItems ( $strDirectory, $objParentItem = null )

tnvExample_Change() protected method

protected tnvExample_Change ( $strFormId, $strControlId, $strParameter )

txtItem_KeyPress() protected method

protected txtItem_KeyPress ( )

Property Details

$btnAdd protected property

protected $btnAdd

$btnAlert protected property

protected $btnAlert

$btnButton protected property

protected $btnButton

$btnCalendar protected property

protected $btnCalendar

$btnCalendarPopup protected property

protected $btnCalendarPopup

$btnCancel protected property

protected $btnCancel

$btnConfirm protected property

protected $btnConfirm

$btnDatePicker protected property

protected $btnDatePicker

$btnDateTimePicker protected property

protected $btnDateTimePicker

$btnDateTimeTextBox protected property

protected $btnDateTimeTextBox

$btnDeleteLeft protected property

protected $btnDeleteLeft

$btnFocus protected property

protected $btnFocus

$btnForceUpdate1 protected property

protected $btnForceUpdate1

$btnForceUpdate2 protected property

protected $btnForceUpdate2

$btnJavaScript protected property

protected $btnJavaScript

$btnMoveLeft protected property

protected $btnMoveLeft

$btnMoveRight protected property

protected $btnMoveRight

$btnNew protected property

protected $btnNew

$btnSave protected property

protected $btnSave

$btnSave1 protected property

protected $btnSave1

$btnSave2 protected property

protected $btnSave2

$btnSelect protected property

protected $btnSelect

$btnToggleDisplay protected property

protected $btnToggleDisplay

$btnToggleEnable protected property

protected $btnToggleEnable

$btnUpdate protected property

protected $btnUpdate

$calCalendar protected property

protected $calCalendar

$calCalendarPopup protected property

protected $calCalendarPopup

$chkScaleCanvasDown protected property

protected $chkScaleCanvasDown

$colFirstName protected property

protected $colFirstName

$colId protected property

DataGrid Columns
protected $colId

$colLastName protected property

protected $colLastName

$ctlCustom protected property

protected $ctlCustom

$dtgPerson protected property

protected $dtgPerson

$dtgPersons protected property

Declare the DataGrid
protected $dtgPersons

$dtpDatePicker protected property

protected $dtpDatePicker

$dtpDateTimePicker protected property

protected $dtpDateTimePicker

$dtxCalendar protected property

protected $dtxCalendar

$dtxDateTimeTextBox protected property

protected $dtxDateTimeTextBox

$flaSample protected property

protected $flaSample

$imgSample protected property

protected $imgSample

$intEditPersonId protected property

This value is either a Person->Id, "null" (if nothing is being edited), or "-1" (if creating a new Person)
protected $intEditPersonId

$lblArray protected property

protected $lblArray

$lblMessage protected property

Local declarations of our Qcontrols
protected $lblMessage

$lblResponse protected property

protected $lblResponse

$lblResult protected property

protected $lblResult

$lblSelected protected property

protected $lblSelected

$lblTimestamp1 protected property

protected $lblTimestamp1

$lblTimestamp2 protected property

protected $lblTimestamp2

$lstFont protected property

protected $lstFont

$lstListbox protected property

protected $lstListbox

$objPerson1 protected property

Local Person Objects
protected $objPerson1

$objPerson2 protected property

protected $objPerson2

$objPersonReference protected property

Get the Current Person Object (just for reference)
protected $objPersonReference

$pnlCode protected property

protected $pnlCode

$pnlHover protected property

protected $pnlHover

$pnlLeft protected property

through using GetChildControls() and AutoRenderChildren
protected $pnlLeft

$pnlPanel protected property

through using AutoRenderChildren
protected $pnlPanel

$pnlRight protected property

protected $pnlRight

$pxyExample protected property

RenderAsHref() and RenderAsEvents() on it.
protected $pxyExample

$strMessage protected property

For this example, show how the panel can display this strMessage
protected $strMessage

$tnvExample protected property

protected $tnvExample

$txtArray protected property

protected $txtArray

$txtDisplay protected property

protected $txtDisplay

$txtEnable protected property

protected $txtEnable

$txtFirstName protected property

protected $txtFirstName

$txtFirstName1 protected property

protected $txtFirstName1

$txtFirstName2 protected property

protected $txtFirstName2

$txtFocus protected property

protected $txtFocus

$txtHeight protected property

protected $txtHeight

$txtItem protected property

protected $txtItem

$txtLastName protected property

protected $txtLastName

$txtLastName1 protected property

protected $txtLastName1

$txtLastName2 protected property

protected $txtLastName2

$txtMessage1 protected property

protected $txtMessage1

$txtMessage2 protected property

protected $txtMessage2

$txtWidth protected property

protected $txtWidth