The CHT Blogger

Thanks for your interest in The Clarion Handy Tools, an awesome collection of productivity enhancements for Clarion developers. These tools consist of an ever-expanding set of Clarion Templates and OOP Classes that extend or complement the normal functionality of the Clarion Application Development System from SoftVelocity.

Tuesday, August 4, 2009

CHT Build 13C1.00 New Features Review

ClientServerBrowseListBox Template


The previous three CHT Build 13C1.00 New Features Review parts dealt primarily with server side template changes with brief references to the Client side where server changes impact the client application. A new feature on the ClientServerBrowseListBox template described in this Part 4 posting, affects only the client. To find the feature, open the ClientServerBrowseListBox template dialog as in the image below.


aug_09_007.gif




The fields listed in this dialog may be manually entered, but usually they are simply imported from work already completed on the matching VIEW created in your server by the HandyJDODataAdapter + ClientServerDataBuilder template combination. If you need a checkbox in your list box to display a boolean on/off condition a new control on the ClientServerBrowseListBox template's "Hot Fields" dialog (see image below) lets you implement a checkbox icon without coding on your Client Server Listbox browse.


aug_09_008.gif



Check the "Display Checkbox" switch on this "Hot Fields" dialog and you're done - however, don't forget to set the icons switch for the matching column in your listbox design.

ClientServerBrowseListBox_XCL Template


Client-Side Cancelled-Insert Deletion



In my CHT Build 13C1.00 New Features Review Part 3 posting, I discussed deleting cancelled-insert records either from the server side with "Garbage Collection" or from from the client side. In the image displayed below, on the "Form Procedure" dialog of the ClientServerBrowseListBox_XCL template, there is an optional (OPT) configuration which when completed is used to signal to the template that it should handle cancelled inserts by deleting the record inserted and then cancelled. Insert the SysID of your table record here to trigger client-side cancelled-insert deletion. Or leave the field blank if you plan to implement server-side "Garbage Collection" for this view (see image below).

Insert Mode Cross-Priming Prefetches



When a newly inserted record needs to be cross-primed from another record in the same table or in a different table, your client needs to signal that to the server in
the form of a "FetchFilter" passed to the server. The server then uses this filter to fetch the matching record from the correct table and keep it in the data buffer(or in a history buffer) before a new table record is inserted. Please re-read my CHT Build 13C1.00 New Features Review Part 3 posting if you don't know how to
handle this situation on the server application. To configure the client form for server-side cross-priming and pre-fetching, complete the SYSID of an existing record available to your form's browse and in the update form record buffer. The existing record can be in the same table or in another, joined table as the case may be (see image below).


aug_10_006.gif



The generated code resulting from the cross-priming configuration discussed above is in the next image.




aug_09_011.gif



In an unprimed "RequestInsert()" the "Prefetch" filter component is left blank. In the above example, because the template cross-prime field has been completed, the "RequestInsert()" call includes a prefetch filter.

That completes Build 13C1.00 New Features Review Part 4.

Cheers...
Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
August 4, 2009

No comments: