End User Recipe: Meeting Details


If a meeting request is successful and no conflicting meetings are found, a confirmation page is displayed. The meeting_details page is almost identical to the meeting_conflict pageeven down to the recordsetwith two important differences. First, on the meeting_details page there is no error message to inform the user of a problem, and second, a link is provided so that the record details can be edited.

This page is also available through the search meetings application discussed later in this recipe.

Note

For the sake of completeness, all the steps for creating the meeting_details page are presented here. However, you could save a fair amount of work by opening the meeting_conflict page and saving it as meeting_details. Then, all you would need to do is change the text on the page from Meeting Conflict to Meeting Detail, remove the error message, and add the link to the edit_meetingrequest page.


Step 1: Implement Meeting Details Design

The meeting_details page uses only a series of dynamic text elements and a link to an edit page.

1.

Create a basic dynamic page, either by hand or derived from a template.

In the ConferenceRoomScheduler folder, locate the folder for your server model and open the meeting_details page found there.

2.

Add a table to the content region of your page to contain the interface elements for the application.

From the Snippets panel, drag the Recipes > ConferenceRoom > Wireframes > Meeting Details - Wireframe snippet into the Content editable region.

3.

Add the table area to hold the dynamic text for the record details and a link to a page for modifying the record.

Place your cursor in the row below the words MEETING DETAILS and insert the Recipes > ConferenceRoom > ContentTables > Meeting Details - Content Table snippet [r3-7].

r3-7.


4.

Be sure to save the file before proceeding.

Step 2: Add Database Components

As with the meeting_conflict page, only one data source is required for this page. In fact, it's the same recordset based on the same view and filtered in the same way. Accordingly, the setup is different for the various server models.

For ASP and ColdFusion

1.

From the Bindings panel, choose Add (+) and select Recordset (Query).

2.

In the simple Recordset dialog, enter an appropriate name.

Enter Conferences in the Name field.

3.

Select the data source connection.

Choose Recipes from the Connection (Data Source) list.

4.

Choose the needed view.

From the Tables list, select ConferenceDisplay.

5.

Leaving the Columns option set to All, set the four Filter list elements like this:

ConferenceID

= (Equals)

URL Parameter

ID


6.

Keep the Sort option set to None and click OK to close the dialog.

For PHP

Again, PHP users have two obstacles to overcome when defining this recordset: the lack of views in MySQL, and the date formatting incompatibilities with the Dreamweaver server model implementation. As with the previous recipe, a temporary recordset is first created to allow placement of the data fields. After that, the proper code is inserted.

To prepare for this step, first place your cursor in a text string in Design view. Then, right-click (Control-click) the Recipes > ConferenceRoom > SQL > Meeting Conflict - PHP SQL Statement snippet and select the Copy Snippet command.

1.

From the Bindings panel, choose Add (+) and select Recordset (Query) from the list.

2.

In the advanced Recordset dialog, enter an appropriate name for the recordset.

Enter Conferences in the Recordset field.

3.

Choose the data source.

Select Recipes from the Connections list.

4.

Enter the proper SQL statement:

In the SQL area, press Ctrl-V (Command-V) to paste the code copied from the snippet.

[View full width]

SELECT conferences.ConferenceID, rooms.RoomName, rooms.RoomID, rooms.RoomDescription, conferences .ConferenceName, conferences.ConferenceDescription, conferences.ConferenceStart, TIME_FORMAT (conferences.ConferenceDuration,'%k:%i') AS ConferenceDuration, conferences.ConferenceBy, DATE_FORMAT (conferences.ConferenceStart,'%k:%i %p') AS StartTime, DATE_FORMAT(conferences .ConferenceStart,'%c/%d/%Y') AS StartDate, (INTERVAL HOUR(conferences.ConferenceDuration) HOUR + INTERVAL MINUTE(conferences.ConferenceDuration) MINUTE + conferences.ConferenceStart) AS ConferenceEnd FROM conferences, rooms WHERE conferences.ConferenceRoom = rooms.RoomID AND conferences.ConferenceID = IDParam


5.

In the Variables section, choose Add (+) and enter the following details in the Add Parameter dialog:

Name:

IDParam

Default Value:

0

Run-time Value:

$_GET['ID']


6.

Click OK to close the dialog and insert the recordset.

7.

Save your page.

Step 3: Data Binding Process

With the recordset defined, you're ready to incorporate the seven dynamic text elements.

1.

From the Bindings panel, expand the Conferences recordset.

2.

Place the data source fields onto the page in their respective areas:

Drag ConferenceName to the cell next to the Meeting Name label.

 

Drag ConferenceBy to the cell next to the Meeting Owner label.

 

Drag ConferenceDescription to the cell next to the Meeting Description label.

 

Drag StartDate to the cell next to the Meeting Date label.

 

Drag StartTime to the cell next to the Start Time label.

 

Drag ConferenceDuration to the cell next to the Duration label. Add the text Hours after the dynamic text to give the run-time value a label.

 

Drag Room Name to the cell next to the Conference Room label.


3.

Save your page.

We're now ready for the next step: linking to a record edit page.

Step 4: Link to Update Meeting

The final step for the meeting_detail page is to provide a way for users to change the details if they see a problem. To accomplish this, we link to an update page and pass the ID number as a URL argument.

Note

If you're a Windows user who has files set to open with one click, click anywhere in the file list window without choosing a file; otherwise, selecting a file will automatically accept your choice and close the dialog, and you'll need to open it again for the next step.


1.

Select the text or image you want to use as a link.

Select the text update meeting in the top row of the content table.

2.

In the Property inspector, click Browse for File, the folder icon next to the Link field.

3.

In the Select File dialog, choose the file you want to handle the update.

Choose the edit_meetingrequest file for your server model.

4.

Select Parameters from the Select File dialog.

5.

In the Parameters dialog, enter ID under the Value column.

6.

Under the Value column, click the lightning bolt icon to open the Dynamic Data dialog and choose ConferenceID [r3-8].

r3-8.


7.

Click OK to close the Dynamic Data, Parameters, and Select File dialogs.

8.

Save the page.

The meeting_details page is now ready for testing. To test this page, request a new meeting that does not conflict with an existing one. After the meeting request is added to the data source, this pagethe meeting detailsis presented.




Macromedia Dreamweaver 8 Recipes
Macromedia Dreamweaver 8 Recipes
ISBN: 0321393910
EAN: 2147483647
Year: 2003
Pages: 121

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net