AJAX

Labels
AJAX(112) App Studio(9) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(178) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(9) OAuth Scopes(1) OAuth2(13) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(11) PKCE(2) Postgre SQL(1) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(184) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(81) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) SSO(1) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(3) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
AJAX
Wednesday, December 2, 2009PrintSubscribe
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 /blog/search/label/Security.
Sunday, November 8, 2009PrintSubscribe
Row Selection Mode

Component DataViewExtender allows control over selection mode of rows displayed in data controller grid views via SelectionMode property. The default property value is Single.

Here is the snippet of DataViewExtender definition from Customers.aspx page generated with Web Site Factory premium project from Northwind database. The SelectionMode property is set to Multiple.

<div factory:activator="Tab|Customers">
    <div id="view1" runat="server">
    </div>
    <aquarium:DataViewExtender ID="view1Extender" runat="server" 
TargetControlID="view1" Controller="Customers" View="grid1"
ShowInSummary="true" SelectionMode="Multiple" /> </div>

Here is how the page is displayed in a web browser.

image

We will also change the data controller ~/Controllers/Customers.xml to expose a new action a6 with command argument MyCommand on the action bar.

<actionGroup id="ag5" scope="ActionBar" headerText="Actions">
    <action id="a1" commandName="ExportCsv" headerText="Download" 
description="Download items in CSV format." /> <action id="a2" /> <action id="a3" commandName="ExportRowset" headerText="Export to Spreadsheet"
description="Analyze items with spreadsheet&lt;br/&gt; application." /> <action id="a4" commandName="ExportRss" headerText="View RSS Feed"
description="Syndicate items with an RSS reader." /> <action id="a5"/> <action id="a6" commandName="Custom" commandArgument="MyCommand"
headerText="MyCommand" description="My custom command."/> </actionGroup>

You can see the action displayed as a menu option on action bar of the grid view grid1.

image

Let’s add a business rule class Class1 and link it to the ~/Customers/Customers.xml data controller via /dataController/@handler attribute as described at /blog/2009/04/filtering-and-business-rules.html and /blog/2009/04/externalfilter-and-modal-views.html.

using System;
using System.Collections.Generic;
using System.Web;
using MyCompany.Data;

public class Class1: BusinessRules
{
    [ControllerAction("Customers", "grid1", "Custom", "MyCommand", ActionPhase.Execute)]
    public void MyCommand()
    {
        foreach (string customerId in Arguments.SelectedValues)
        {
            // do something here
        }
    }
}

Property SelectedValues is an array of string values. You might need to convert each value to the appropriate data type when writing custom business rules.

Set the breakpoint inside of foreach loop, open the page in a web browser, select a few records, and execute the action. The Visual Studio debugger will show the selected values as pictured below.

ControllerActionWebSiteFact

Sunday, November 1, 2009PrintSubscribe
Web Site Factory Preview 3

The new premium project Web Site Factory has been released and available to active premium project subscribers. Web Site Factory is based on Data Aquarium Framework and features sophisticated page layouts and professional user interface themes modeled after Microsoft SharePoint. The entire source code is included.

The final release supports four different standard page layouts that are consistently applied to all automatically generated pages. You can use Code OnTime Designer to modify this pages and to create the new ones.

You will find the live demo projects at:

Simple Page Layout

Simple layout provides a single data view on each page. A field summary of the selected record is displayed on the side bar on left-hand side of the page.

image

Tabbed Layout

Tabbed master-detail layout will place each data view on a dedicated tab so that only one data view is visible at any time. The details of the selected master record are automatically displayed on the side bar.

image

Inline Page Layout

Inline master-detail layout is similar to the tabbed layout with one exception. The tabs are not displayed. A set of tasks named after each data view is displayed at the top of the side bar instead. The details of the selected master record are automatically displayed on the side bar.

image

Stacked Layout

Stacked master-detail layout lists all data views. This allows simultaneous access to all master and child records. The details of the selected master record are automatically displayed on the side bar. Stacked pages are usually longer than the height of the window. The side bar summary automatically keeps itself in the view when browser window content is scrolled.

image

Conclusion

Learn more about Web Site Factory project features at /blog/2009/10/web-site-factory-preview-2.html. The article provides screenshots of Web Site Factory applications displayed in major modern web browsers.