April 2010
In this tutorial we demonstrate some very advanced techniques for building a car parts application in Open Web Studio.
Throughout the tutorial we cover form input, validation, how to use dependant drop down lists, populating checkbox lists and introduce a new concept of data level security. Data level security allows you to control which data a user can access within a module.
We demonstrate how to use scripts and regular expressions for validating the input fields of a form, how to maintain field values when forms refresh, how to use SubQuery with the onChange parameter within a Select element and how to create dynamic checkboxes for the DotNetNuke Security Roles, similar to the checkboxes used when editing the security permissions of a module.
We also demonstrate how to use and leverage the login module that we have created in previous tutorials to set global session variables for the users of the DotNetNuke site and also show you how to use queries and output the results of those queries to create comma separated lists.
Common uses for comma separated lists include outputs for Google charts and in this tutorial we create a list of comma separated values for use in session variables.
You can download the latest version of OWS from here:
www.openwebstudio.com
If you are new to OWS we recommend you first of all view the six part series on
How to Build a Knowledge Base Article Module.
The videos contains:
Video 1 - How to Setup Form Validation
- Introduction
- Form validation
- How to ensure form fields are required
- How to test the email is a valid email address
- How to check the form fields before the submit button is clicked
- Enable validation JavaScript in general settings
- The form submit link, onclick parameters
- How to setup the page smart validate for First Name field
- How to setup validation for the Email field
Time Length: 8min 4secs
Video 2 - Car Parts Application, Assigning Security Roles into a Global Session Variable
- A Car Parts Application for demonstrating Categories, Sub Categories and Security
- Demonstration of the Car Parts application
- How to find out which security roles are assigned to a user
- The OWS Login module
- How to setup global session variables using the Login module
- How to assign the security roles for a user into a session variable
- How to query and assign the roles for a SuperUser and standard user
- How to select the user roles assigned to the user
- How to build a comma separated list of the security roles and assign it to a session variable
- How to setup the tables in the database
- How to add the OWS modules to the page
Time Length: 10min 28secs
Video 3 - How to Build the Categories Module with Data Level Security
- The Categories module
- How to setup the variables to protect from SQL injection
- Actions for working with the database
- Actions for the interface
- How to create the layout templates for the categories module
- Detail template
- Security link, Edit link, Delete link
- How to add, delete, edit, update categories
- How to build the edit interface
- How to setup the security in the module
- How to build the security edit interface
- How to create a query to select all security roles in and not in the category role table
- How to build the security roles checkboxes
- How to update the security roles
Time Length: 11min 50secs
Video 4 - How to Build the SubCategories Module and Use SubQuery
- SubCategories and how to link them to Categories
- Demonstration of the SubCategories interface
- How to build the SubCategories interface
- How to setup the variables to protect from SQL injection
- How to create the subcategory query
- How to create the Header, Detail, Footer and No Results templates
- SubQuery
Time Length: 5min 40secs
Video 5 - How to Build the Car Parts List Module
- Demonstration of the Car Parts List module
- How to build the Car Parts module
- The Loading actions
- How to setup the variables to protect from SQL injection
- Delete and Add actions for car parts
- How to build the car parts interface
- The Header, Details, Footer, No Results templates
- The header template
- SubQueries for populating the drop down list filter
- SubQueries dependant on each other
- onChange parameter
- The footer template SubQueries for filtered drop down lists
- Query template select DISTINCT query
Time Length: 8min 17secs
Total Time Length: 44min 19secs
Comments