<!---
LICENSE INFORMATION:

Copyright 2007, Joe Rinehart
 
Licensed under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance with the License. 

You may obtain a copy of the License at 

	http://www.apache.org/licenses/LICENSE-2.0 
	
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
CONDITIONS OF ANY KIND, either express or implied. See the License for the 
specific language governing permissions and limitations under the License.

VERSION INFORMATION:

This file is part of Model-Glue Model-Glue 2.0 (2.0.302).

The version number in parenthesis is in the format versionNumber.subversion.revisionNumber.
--->


<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<head>
<title>How To Add A Scaffold</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
<link rel="stylesheet" href="../../default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='../../default.css'>");}
//-->
</script>
<style type="text/css">
<!--
ol.whs1 { list-style:decimal; }
p.whs2 { font-size:12pt; font-family:Arial, sans-serif; }
-->
</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="../../whmsg.js"></script>
<script type="text/javascript" language="javascript" src="../../whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="../../whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="../../whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="../../whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("How To's\nHow To Use Scaffolds\nHow To Add A Scaffold");
addButton("show",BTN_TEXT,"Show","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if (window.setRelStartPage)
	{
	setRelStartPage("../../Model-Glue.htm");
addSearchFormHref("javascript:document.ehelpform.submit()");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();
//-->
</script>
<h1>How To Add A Scaffold</h1>

<p>To add a scaffold:</p>

<p>&nbsp;</p>

<ol type="1" class="whs1">
	
	<li class=kadov-P><p>Add a table to your database. &nbsp;At 
 present, it (and any tables it uses in relationships) may only have one 
 column acting as a primary key. &nbsp;For 
 the sake of example, we'll pretend we've added a table named &quot;Contact&quot;</p></li>
	
	<li class=kadov-P><p>If the table is related to other tables in a one-to-many 
 or many-to-many manner, add those relationships to the Reactor.xml file 
 using &lt;object&gt;, &lt;hasMany&gt;, &lt;hasOne&gt;, and related tags. 
 &nbsp;Full documentation 
 for this is available in Reactor's documentation.</p></li>
	
	<li class=kadov-P><p>Add the following tag to your ModelGlue.xml:<br>
	<br>
	<span style="font-size: 10pt; font-family: 'Courier New', monospace;"><font size=2 style="font-size:10pt;">&lt;scaffold 
 object=&quot;contact&quot; /&gt;<br>&nbsp;</font></span></p></li>
</ol>

<p class="whs2">By default, 
 this will create the following event handlers:<br>&nbsp;</p>

<ol type="1" class="whs1">
	
	<li style="/*begin!kadov{{*/ font-size: 12pt; font-family: Arial, sans-serif; /*}}end!kadov*/ "
		class=kadov-P><p class="whs2">Contact.List 
 - Lists all contacts from the contact table</p></li>
	
	<li style="/*begin!kadov{{*/ font-size: 12pt; font-family: Arial, sans-serif; /*}}end!kadov*/ "
		class=kadov-P><p class="whs2">Contact.View 
 - Displays a specific contact in a read-only manner</p></li>
	
	<li style="/*begin!kadov{{*/ font-size: 12pt; font-family: Arial, sans-serif; /*}}end!kadov*/ "
		class=kadov-P><p class="whs2">Contact.Edit 
 - Provides a form to edit a contact</p></li>
	
	<li style="/*begin!kadov{{*/ font-size: 12pt; font-family: Arial, sans-serif; /*}}end!kadov*/ "
		class=kadov-P><p class="whs2">Contact.Commit 
 - Saves a contact to the database</p></li>
	
	<li style="/*begin!kadov{{*/ font-size: 12pt; font-family: Arial, sans-serif; /*}}end!kadov*/ "
		class=kadov-P><p class="whs2">Contact.Delete 
 - Deletes a given contact</p></li>
</ol>

<p class="whs2">&nbsp;</p>

<p class="whs2">&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
	writeIntopicBar(0);
//-->
</script>
<form method="POST" action="http://www.helpcommunity.com/ehelpapi.asp?cmd=WebSave" name="ehelpform" target="_top" style="display:'none';">
<input type="hidden" name="data" value=" ">
</form>
</body>
</html>
