Setting the Length of Page Names Generated by the Application Builder

Products:   
Areas: IDE/GUI 

When the Application Builder generates pages, it automatically truncates any names that are longer than 10 characters in length. For instance, a record page for a database table called TableWithLongName would be assigned the name TableWith_Maint or TableWith_List for the grid page. However, if you specificaly need to have the full table names appear in the resultant page names, you can use the following procedure to increase the number of characters used in the assigned names.

In the CodeCharge Studio installation folder, open the file <CodeChargeStudioHome>\Components\Dialogs\Wizards\Common\common.js and locate the following function:

function convertTableName(name,cutLongNames)
{
var newName = String(name).replace(/^\[/,"").replace(/\]$/,"");
if (newName.length>0)
if (isFinite(newName.charAt(0)))
{
newName = "f_"+newName;
}
newName = newName.replace(/[^A-Za-z0-9]+/g,"_").replace(/^_*/,"").replace(/_*$/,"");
if (getWizardStep)
{
var wizardOptions = getWizardStep("options");
if (!wizardOptions.getData("enableSmartNaming")) return newName;
}
if (cutLongNames)
{
newName = newName.substr(0,10);
newName = newName.replace(/_*$/,"");
}
return newName;
}

Then in the body of the function, change the 10 to a higher value provided that the new value is lower than 255. With this done, you can then run the Application builder and the assigned pages names will have longer names where applicable.

NB: Before making the change in the common.js file, make sure you make a backup of the file in case you need to revert to it.



Viewed 10727 times.   Last updated: 11/22/2002 12:55:38 AM