The application administrator uses the ASWPRODONE.A5W page to view or edit a product record.
The ASWPRODONE.A5W page receives the pid parameter in the calling URL. pid must be a valid value from the product_ID field. For example: prodone.a5w?pid=P001 .
This page includes an override of the static contents of the Ship Avail drop down list. The expression that generates the list also establishes the sort order for the list's values.
ASWPRODONE.A5W contains the NAV_INT navigation and GRD_PRODDET grid components.
The Sales > Sales History entry of the NAV_INT navigation component displays the ASWSALESHIST.A5W page. The Description link on the Sales by Quantity tab displays the ASWPRODONE.A5W page.
ASWPRODONE.A5W in the WYSIWYG tab of the HTML Editor [Picture]
ASWPRODONE.A5W in the Browser [Picture]
Edits to the Page Source
When you look at ASWPRODONE.A5W with the Source tab of the HTML Editor, you will see a large amount of HTML and Xbasic code. The HTML Editor placed almost all of it there automatically, as we used the WYSIWYG tab to place the tables, text, graphics, and components on the page. There are a few interesting exceptions, where we changed the page code through the Source tab.
The LOGINTEST.A5W page returns values for LoginID, LoginType, and LoginLevel. If the LoginType is not "I" (internal), the user is sent to the LOGIN.A5W page.
if logintype <> "I" ' not an internal user
If the pid variable was not provided in the URL, it is defined and set to NULL.
if eval_valid("pid") = .F.
pid = ""
The TABLE.EXTERNAL_RECORD_CONTENT_GET() method returns a list of product availability time windows into the dropavail variable.
dropavail = table.external_record_content_get("[PathAlias.ADB_Path]\lk_avail", "alltrim(Ship_Avail)", "Ship_ord")
The following code overrides the DBF.filter property of the grid to display only the record defined by pid. The dropavail list becomes the choices displayed in the Ship Avail list of the GRD_PRODDET grid component.
DBF.filter = "Product_Id=\"" + pid + "\""
.DropdownBox.Choices = dropavail
componentName = "GRD_PRODDET"
The A5W_INCLUDE() statement is in the top row of the table. It loads TOPPAGE.A5W and displays a standard page header.
<table cellSpacing=0 cellPadding=0 width="800" border=0>
<td colspan="2"> <%a5 a5w_include("toppage.a5w") %> </td>
Alpha Five Version 7 and Above