Wednesday, December 30, 2009

Masked Editing, Auto Completion, Inline Record Insertion, New Themes

We are ending the year 2009 with a bang!

Here is list of features available in the latest update.

Grid View Allows Inserting New Rows Inline

Action New is now supported in grid views.

image

Here is a record in “New” mode displayed alongside of the other records in the grid view.

image

Masked Editing

Masked editing is supported by components of Ajax Control Toolkit, which provides the foundation for Data Aquarium Framework. Now you can easily enable masked editing in Code OnTime Designer with a a few clicks of a mouse on any field of any data controller. Read about mask format here.

image

Here you can see the masked editing in action:

image

Auto-Completion In Views

New attribute Auto Complete Prefix Length on a data field of a view controls the minimum prefix length for auto-completion to start.

You can quickly define this parameter on a data fields with the help of Code OnTime Designer. Pictured below is the data field City of editForm1 view in Customers data controller. The value of the prefix is set to 1.

image

Here you can see the auto-completion in action:

image

Server-Side Formatting Of Values

Data Aquarium Framework takes every opportunity to offload the processing of presentation logic to the client browser. The standard formatting of values is controlled by the data field property Data Format String. The actual formatting is done via JavaScript String.format function, which has powerful but limited capabilities if compared to .NET System.String.Format.

Now you can simply un-check the Format On Client box in Code OnTime Designer and additional processing will be performed on the server. The data controller will create a dynamic data field and will provide a formatted value for it. The actual field is aliased to present the dynamic data field in read-only mode.

image

Here you can see the [Product].[Discount] field formatted in the column five according to the data format string 00.00 shown in the previous screen shot. Note that this particular data format string is not compatible with the JavaScript implementation of String.format.

image

Html Encoding

Data Aquarium Framework makes sure that user data will not break the presentation when HTML compatible character sequences are entered as field values. Sometimes you might want to have them displayed as an actual HTML.

Suppose you have entered a product category as follows:

Cheeses <b>are great</b>

If you disable HTML encoding for the data controller field directly in the data controller or in Code OnTime Designer then the following will be presented with the phrase “are great” displayed in “bold” font in the Description column of the second grid row.

image

Improved blob Processing

File upload has just became easier with this release. Now you can simply select a file and the uploading starts instantly. A nice AJAX-style animated image is indicating process.

The previous implementation required user to additionally click on submit button next to the file input control.

Five New Themes

Users with Code OnTime Designer subscription are now able to create applications styled with five new themes. You can see samples of these themes presented in various browsers in this very post.

Masked Edit Format

Data Aquarium Framework supports client-side masked editing in all views through the JavaScript component MaskedEditBehavior avaiable in  Ajax Control Toolkit. You can see a live sample of this component in action here.

Mask Type 

Type of validation to perform:
None - No validation
Number - Number validation
Date - Date validation
Time - Time validation
DateTime - Date and time validation

Mask Characters and Delimiters

9 - Only a numeric character
L - Only a letter
$ - Only a letter or a space
C - Only a custom character (case sensitive)
A - Only a letter or a custom character
N - Only a numeric or custom character
? - Any character
/ - Date separator
: - Time separator
. - Decimal separator
, - Thousand separator
\ - Escape character
{ - Initial delimiter for repetition of masks
} - Final delimiter for repetition of masks

Examples:

9999999 - Seven numeric characters
99\/99 - Four numeric characters separated in the middle by a "/"

Here is how you can define a mask directly in the data controller descriptor:

<field name="Phone" type="String" label="Phone" 
maskType="None" mask="999-999-9999" />

Code OnTime Designer fully supports both mask and maskType.

Sunday, December 27, 2009

Batch/Mass Editing of Multiple Records

Learn how to enable batch/mass editing in ASP.NET AJAX applications created with Code OnTime Generator and Web Site Factory. Batch editing will allow your end-users to modify multiple records at the same time.

Watch this video on our YouTube channel at http://www.youtube.com/user/codeontime#p/a/u/3/8AJp5ZgMmfw.

Live Demo

You can see live “batch edit” at the following URLs:

http://dev.codeontime.com/demo/websitefactory1/pages/customers.aspx
http://dev.codeontime.com/demo/websitefactory2/pages/customers.aspx
http://dev.codeontime.com/demo/websitefactory3/pages/customers.aspx
http://dev.codeontime.com/demo/websitefactory4/pages/customers.aspx
http://dev.codeontime.com/demo/websitefactory5/pages/customers.aspx

Enter admin/admin123% for user name and password if requested.

Details

“Batch Edit” action command allows mass updates of multiple records selected in grid or form view. You need to configure an action that executes BatchEdit command.

If no command is specified then an inline batch editing is enabled in a grid view. If the name for the form is specified as an argument then the action will open the form in “batch edit” mode.

A check box with “update” label is displayed under each field. User must manually include every field that must be propagated to all selected records. The record with sample field values does not have to be selected/included in batch edit.
Multiple records are edited inline in a grid view.

image

Multiple records are edited in a form.

image

Security: Pages, Fields, Actions

Learn to secure Web Site Factory and Data Aquarium Framework applications with Code OnTime Designer.

Part 1: Pages

Standard ASP.NET Membership provides an excellent mechanism to protect the pages of your site. Web Site Factory projects rely on ASP.NET Membership to ensure secure role-based page access.

Watch this video on our YouTube channel at  http://www.youtube.com/watch?v=KPvqcDS44jE

Part 2: Fields

Standard ASP.NET Membership roles are used to control who is allowed to read/write field values. Use Code OnTime Designer to quickly set up the field-level security.

Watch this video on our YouTube channel at http://www.youtube.com/watch?v=yr5OznRdVJ0

Part 3: Actions

Learn to secure availability of actions in data views of ASP.NET AJAX applications created with Web Site Factory and Code OnTime Generator. Standard ASP.NET Membership roles are used to control who is allowed to execute actions.

Watch this video on our YouTube channel at http://www.youtube.com/watch?v=uBpLlsEZviI

Monday, December 21, 2009

Date, Time, and DateTimeOffset Data Types

The latest update of the premium projects includes an improved handling of Microsoft SQL Server 2008 data types date, time, and datetimeoffset in generated code and Code OnTime Designer.

Adaptive filtering now works correctly with time and datetimeoffset. Filtering of datetimeoffset fields has been improved to automatically perform range filtering by including in the filtered results any matching dates in a range –14 hours to + 14 hours from the selected date.

Styling of tabs in  Web Site Factory applications has been slightly improved to make them “seem” large even though only 1 pixel of height has been added to tabs. You can see the current styling at http://dev.codeontime.com/demo/WebSiteFactory1/Pages/Home.aspx.

Coming Soon

The upcoming updates will include support for HtmlEncode attribute on fields to allow display of HTML markup stored in the database in the client-side views. The encoding occurs by default. It will be possible to turn it off.

We will be providing additional themes for Web Site Factory applications. The themes will be available to Code OnTime Designer subscribers only.

We are working on support for actions sets. An action set is a collection of action groups that you normally find in data controllers. It will be possible to develop custom action sets and link them to data controllers. This will make data controllers much smaller and will make it easier to maintain large projects.

Tuesday, December 15, 2009

AJAX Action State Machine in Web Site Factory Apps

Learn to configure the client-side action state machine to create complex AJAX-enabled user interface workflow sequences without writing a single line of code in Web Site Factory and Data Aquarium Framework web applications.

Part 1

We will implement a Navigate action that brings the user to a dedicated Customer Information page in a Web Site Factory web application.

Working With Actions in AJAX Web Apps (Part 1)

Watch this video on our YouTube channel at http://www.youtube.com/user/codeontime#p/u/2/M45hyY185Ck.

Part 2

We will implement custom Save and Cancel actions that return the user to the previous page.

Working With Actions in AJAX Web Apps (Part 2)

Watch this video on our YouTube channel at http://www.youtube.com/user/codeontime#p/u/0/9sCgZLZ4kEE.

Business Rules in AJAX Web Applications

Learn to attach server-side business rules to AJAX-enabled user interface of Web Site Factory applications. Implement business rules to execute custom SQL statements or stored procedures in response to user actions.

 

Business Rules in AJAX Web Applications

Watch this video on our YouTube channel at http://www.youtube.com/user/codeontime#p/u/2/M45hyY185Ck.

Adding External Links to Your Web Site Factory Application

Learn how to extend the navigation system of your Web Site Factory application with links to external web sites and how to force the external link to be displayed in the new window.

Adding External Links to Your Web Site Factory Application

Watch this video on our YouTube channel at http://www.youtube.com/user/codeontime#p/u/3/ByZ62XT5RT8.

User Controls in ASP.NET AJAX Applications

Create custom ASP.NET User Controls in ASP.NET AJAX applications generated with Code OnTime Generator and Web Site Factory for ASP.NET / AJAX.

We will create a new site page with Code OnTime Designer and add four ASP.NET User Controls arranged in two rows.

User Controls in ASP.NET AJAX Applications

Watch this video on our YouTube channel at http://www.youtube.com/user/codeontime#p/u/4/8WLl_p-lM1Y.

Monday, December 14, 2009

Field Alignment, Layout Engine, Duplicate, Designer Updates

The update brings further improvements to Data Aquarium Framework and Code OnTime Designer.

The Framework layout engine is more accurate in detecting conditions that cause resizing of the page content and make the page rendering look very smooth.

Additional styles are now automatically aligning numeric fields to the right as shown in the picture below. You can see Unit Price, Units In Stock, Units On Order, and Reorder Level fields aligned to the right in both read-only and edit modes.

image

The new standard action Duplicate is now supported in the applications. Select any row in a grid and choose Duplicate. The data controller will switch to the new record mode and fill all fields with the matching fields of the selected record. The new option is shown in the picture above. The screen below shows a new record with selected data.

image

Code OnTime Designer has introduced full customization of generated pages with custom user controls. Also numerous additional options were exposed in configuration pages of the project. We will be posted video tutorials to illustrate these features.

Tuesday, December 8, 2009

Custom RDLC Reports for AJAX Web Apps

Data Aquarium Framework automatically creates RDLC reports in WYSIWYG style at runtime for any data grid views and replicates sort order and filters specified by the end users.

Try it live at http://dev.codeontime.com/demo/websitefactory1/pages/products.aspx.

You can quickly create custom reports that have the same behavioral properties.

Custom RDLC Reports for AJAX Web Apps (Data Aquarium Framework)

Watch this video on our YouTube channel at http://www.youtube.com/user/codeontime#p/u/5/Gli45vikyOU.

The Framework automatically creates in-memory report definitions by applying standard ~/Reports/Template.xslt stylesheet to XML data controllers of your application at runtime when a user requests a report.  Such reports are created in RDLC format. RDLC is the technology available in Microsoft Reporting Services, a component of Microsoft SQL Server.

Learn more about Microsoft Reporting Services:
http://www.amazon.com/gp/search?ie=UTF8&tag=ie8search-20&index=blended&linkCode=qs&camp=1789&creative=9325&keywords=reporting+services+2008.

First, the Framework creates a System.Data.DataTable class instance and populates it with the data displayed in the grid with filters and sort order applied. Next, the instance of Microsoft.Reporting.WebForms.LocalReport class is created and supplied with the report definition, data table, and output format. The instance of this object will render the actual report file.

The code of the report engine that performs these steps is in ~/Report.ashx file in the root of project created by Code OnTime Generator.

The custom report option in the video can be also defined without Code OnTime Designer as shown in the snippet of ~/Controllers/Products.xml data controller.

<actionGroup id="ag7" scope="ActionBar" headerText="Report">
  <action id="a1" commandName="ReportAsPdf" headerText="PDF Document" 
        description="View items as Adobe PDF document.&lt;br/&gt;Requires a compatible reader." />
  <action id="a2" commandName="ReportAsImage" headerText="Multipage Image" 
        description="View items as a multipage TIFF image." />
  <action id="a3" commandName="ReportAsExcel" headerText="Spreadsheet" 
        description="View items in a formatted&lt;br/&gt;Microsoft Excel spreadsheet." />
  <action id="a100" commandName="ReportAsPdf" commandArgument="Products.rdlc" headerText="Custom Products Report" causesValidation="true" 
        description="This is a custom report" />
</actionGroup>

If the command argument does not include path information then the framework makes an assumption that the report is in ~/Reports folder. You can store reports in any other location under the root of your website. Just make sure that the relative path of the report is included along with the report name (for example, ~/MyLocation/MyFolder/MyReport.rdlc).

You can also customize the standard ~/Reports/Template.xslt and create alternative automatic templates. If the XSLT stylesheet name is specified as a command argument of action then Data Aquarium Framework will attempt to create a report definition on the fly using your custom stylesheet and then proceed with rendering of report in the specified output format.

Monday, December 7, 2009

Aggregates in Grid Views

Learn how to enable aggregates in applications created with Web Site Factory code generation project and Code OnTime Designer. Aggregates deliver business intelligence and work with adaptive filtering.

Aggregates in ASP.NET/AJAX Web Applications

Here is a snippet of Products data controller that enables aggregates for grid1 view as shown in video.

<view id="grid1" type="Grid" commandId="command1" label="Products">
  <headerText>This is a list of products. </headerText>
  <dataFields>
    <dataField fieldName="ProductName" columns="40" />
    <dataField fieldName="SupplierID" aliasFieldName="SupplierCompanyName" aggregate="Count"/>
    <dataField fieldName="CategoryID" aliasFieldName="CategoryCategoryName" />
    <dataField fieldName="QuantityPerUnit" columns="20" />
    <dataField fieldName="UnitPrice" dataFormatString="c" columns="15" aggregate="Average"/>
    <dataField fieldName="UnitsInStock" columns="15" aggregate="Sum"/>
    <dataField fieldName="UnitsOnOrder" columns="15" />
    <dataField fieldName="ReorderLevel" columns="15" />
    <dataField fieldName="Discontinued" />
  </dataFields>
</view>

Saturday, December 5, 2009

Adaptive Filtering in ASP.NET/AJAX Applications

Learn how your users can take advantage of adaptive filtering and sorting features available in applications created with Data Aquarium Framework and Web Site Factory from Code OnTime, the premier provider of code generation software for ASP.NET / AJAX.

AJAX-Style Adaptive Filtering and Sorting

Wednesday, December 2, 2009

Batch Edit, “Row” Scope, Multiple Row Selection, Actions And Security Settings in Designer

The latest release includes a host of new features in Data Aquarium Framework and Code OnTime Designer.

  • New “Row” action group scope makes it easier to edit records in grid view. Actions in this scope are visible only in grids and are displayed as push buttons under the selected row. Standard actions in this scope are presented as OK (Update) and Cancel buttons.
    image
  • New “Batch Edit” action command allows mass updates of multiple records selected in grid or form view. You need to configure an action that executes BatchEdit command.

    If no command is specified then an inline batch editing is enabled in a grid view. If the name for the form is specified as an argument then the action will open the form in “batch edit” mode.

    A check box with “update” label is displayed under each field. User must manually include every field that must be propagated to all selected records. The record with sample field values does not have to be selected/included in batch edit.

    Multiple records are edited inline in a grid view.
    image
    Multiple records are edited in a form.
    image

    You can see live “batch edit” at the following URLs:
    http://dev.codeontime.com/demo/websitefactory1/pages/customers.aspx
    http://dev.codeontime.com/demo/websitefactory2/pages/customers.aspx
    http://dev.codeontime.com/demo/websitefactory3/pages/customers.aspx
    http://dev.codeontime.com/demo/websitefactory4/pages/customers.aspx
    http://dev.codeontime.com/demo/websitefactory5/pages/customers.aspx

    Enter admin/admin123% for user name and password if requested.
  • Previous screen shots demonstrate multiple row selection feature that can be enabled on demand. See the live demos above to explore multiple row selection.

    The only action that supports multiple selection by default is Delete.

    You can create business rules and respond to custom actions by processing the list of selected keys.

    Multiple selection can be enabled in Designer if you select All Pages, click on a page, and the select a data view that must provide ability to select multiple records.
  • Actions can now be fully edited in Designer.

    Here is a screen shot of data controller action groups.
    image

    Here is a screen shot of actions for standard action group displayed in “Form” scope with two last actions responsible for “Update Selection” and “Cancel” actions displayed when you edit multiple records in a form.
    image

    New “when…” conditions allow to control availability of actions based on last action command and argument, when at least one row is selected, when URL of the page in a browser is matched to a regular expression, when view name (grid1, editForm1, etc.) or new property of data view extender Tag is matched to a regular expression. 

    Actions form a powerful and easy to control state machine that automatically exposes actions on action bar, in grid row, in a from, or grid context menu. Automatic verification of “when…” conditions is performed without the need to write a single line of code.
  • Ability to specify roles is now fully supported by Designer for pages, fields (read/write), and actions. Read more about security at http://blog.codeontime.com/search/label/Security.
You can find more about Code OnTime Generator, Data Aquarium Framework, and other great products here.


© 2010 Code OnTime LLC. Intelligent code generation software for ASP.NET. Visit us at http://codeontime.com