Monday, December 6, 2010

Custom Theme in 1.6.1

Create folder under App_Themes, then modify or add Custom.ThemeTab, this file controls where the custom theme will appear.

Tuesday, May 12, 2009

Window.onLoad problems

Not related to LODESTAR development but something that annoyed the hell out of me.
On one my pages the Body onLoad stop working, did not fire anymore.
So I used the script window.onload = function.
but first I used window.onload = function() and get a error message
not implemented' javascript error
BECAUSE I USED THE PARENTHESES ........WTF!!

correct syntax = window.onload = function

Thursday, February 19, 2009

Add paging

var PageParams1 = new PageParams(
["SessionId", String, ""],
["Command", String, ""],
["PAGENUMBER", String, "1"],
["ROWPERPAGE", String, "3"]

TableParams.ROWPERPAGE = PageParams1.ROWPERPAGE;
TableParams.PAGENUMBER = PageParams1.PAGENUMBER;

xmlTable = LsdbCommand("LSDB.stored_proc", TableParams);


in code:
<%=Paginator(TableParams["ROWPERPAGE"], TableParams["PAGENUMBER"])%>

Friday, January 16, 2009

Book Suggestion

Once a while I will be including some books that I think are helpful on your way to become a better developer.
Here is the first suggestion.

Oracle PL/SQL Programming, 4th Edition

Product Description
For the past ten years, O'Reilly's "Oracle PL/SQL Programming" has been the bestselling book on PL/SQL, Oracle's powerful procedural language. Packed with examples and helpful recommendations, the book has helped everyone--from novices to experienced developers, and from Oracle Forms developers to database administrators--make the most of PL/SQL.

The fourth edition is a comprehensive update, adding significant new content and extending coverage to include the very latest Oracle version, Oracle Database 10"g" Release 2. It describes such new features as the PL/SQL optimizing compiler, conditional compilation, compile-time warnings, regular expressions, set operators for nested tables, nonsequential collections in FORALL, the programmer-defined quoting mechanism, the ability to backtrace an exception to a line number, a variety of new built-in packages, and support for IEEE 754 compliant floating-point numbers.

The new edition adds brand-new chapters on security (including encryption, row-level security, fine-grained auditing, and application contexts), file, email, and web I/O (including the built-in packages DBMS_OUTPUT, UTL_FILE, UTL_MAIL, UTL_SMTP, and UTL_HTTP) and globalization and localization.

Co-authored by the world's foremost PL/SQL authority, Steven Feuerstein, this classic reference provides language syntax, best practices, and extensive code, ranging from simple examples to complete applications--making it a must-have on your road to PL/SQL mastery. A companion web site contains many more examples and additional technical content for enhanced learning.

Check for unsaved data and display a confirmation message if so

Below id the Link function and the necessary parameters that will make it work:

function ContractBasicsSave(){
    Form1.Command.value = "Save";
    isPostBack = true;
    Form1.submit();
}

var isPostBack = false;
var WarnDiscard = "<%=Proxy1.i18n.FM("WarnDiscardChanges")%>";
var WarnSave = "<%=Proxy1.i18n.FM("WarnSaveChanges")%>";
var WarnDelete = "<%=Proxy1.i18n.FM("WarnDelete")%>";
var ExcludeItems = {"SPANSIZE": "SPANSIZE", "GraphStatus": "GraphStatus" };
function checkChanges(url,cmdSave,cmdNoSave,noprompt) {
    if ((!isPostBack) && IsDirty(ExcludeItems) && (noprompt || confirm(WarnSave))) {
        Form1.action = url;
        
ContractBasicsSave();
        //NavLink(cmdSave, url);
    }
    else {
        //NavLink(cmdNoSave, url);
    }
}

Call the function from the Body OnUnload Event.
<body onunload="javascript:checkChanges('../zExelon/ContractBasics.asp', 'Save')">

Make sure you manage the isPostBack variable. Every time you do a Postback, you need to set it to true so the message does not fire off if you are doing a postback.

Error Messages

} catch (e) { ReportError(e); }

– This displays an error message (with red font color and yellow background) wherever it is placed. You can also call this function right after the transaction hyperlinks by inserting the following code: <%if (saveError) ReportError(saveError)%>

Error message for required field: "Required field have missing values".
You can use the alert window to display this. Required fields have an asterisk (*) beside it (example: * Start Time).

Status Messages

Call the function ReportStatus(s) – this is just a simple formatted Response.Write function.

function ReportStatus(s) {
    Response.Write("<div class=StatusBox>" + s + "</div>");

}