This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:orientation="vertical" > | |
<TextView android:id="@+id/exampleText" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Push the button" | |
android:background="#ffff00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="appConfig" class="myApp.model.csBeans.appConfig"> | |
<constructor-arg name="universalSettings"> | |
<map> | |
<entry key="ds"><value>myDatasource</value></entry> | |
<entry key="appName"><value>myApp</value></entry> | |
<entry key="approot"><value>/myApp</value></entry> | |
</map> | |
</constructor-arg> | |
<constructor-arg name="localSettings"> | |
<map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent displayname="appConfig" hint="I provide the configuration settings for the application dependent on where the application is running."> | |
<cffunction name="init" access="public" returntype="any" hint="I accept all of the possible setting configurations"> | |
<cfargument name="universalSettings" type="struct" required="true" hint="A struct of all of the configuration settings that are true regardless of environment" /> | |
<cfargument name="localSettings" type="struct" required="true" hint="A struct of all of the configuration settings for the local environment" /> | |
<cfargument name="remoteSettings" type="struct" required="true" hint="A struct of all of the configuration settings for the remote environment" /> | |
<cfset var loc= StructNew()> | |
<cfset variables.config= StructNew()> | |
<cfloop collection="#arguments.universalSettings#" item="loc.ukey"> | |
<cfset variables.config[loc.ukey]= arguments.universalSettings[loc.ukey]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Since JavaScripts counts months starting from 0 (January is 0), | |
//subtract 1 from the month integer submitted by the user | |
var formattedMonth = userSubmittedMonth - 1; | |
var testDate = new Date( userSubmittedYear,formattedMonth,userSubmittedDay,0,0,0,0) ; | |
if ( | |
testDate.getFullYear() != userSubmittedYear | |
|| testDate.getMonth() != formattedMonth | |
|| testDate.getDate() != userSubmittedDay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent displayname="itemsDecorator" extends="transfer.com.TransferDecorator" output="false"> | |
<cffunction name="getMyParentItem" access="public" output="false" returntype="any"> | |
<cfreturn getTransfer().get("example.Item",getTransferObject().getParentId()) /> | |
</cffunction> | |
<cffunction name="getMyChildItems" access="public" output="false" returntype="array"> | |
<cfset var local= StructNew() /> | |
<cfset local.childrenArray= ArrayNew(1) /> | |
<cfset local.childrenQry= getTransfer().listByProperty("example.Item","parentId",getTransferObject().getItemId(),"itemOrder")> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<package name="example"> | |
<object name="Item" table="itemsTable" sequence="itemId_seq" decorator="com.itemDecorator"> | |
<id name="itemId" type="numeric" /> | |
<property name="setId" type="numeric" column="setId" /> | |
<property name="itemTitle" type="string" column="itemTitle" /> | |
<property name="itemText" type="string" column="itemText" /> | |
<property name="itemOrder" type="numeric" column="itemOrder" /> | |
<property name="parentId" type="numeric" column="parentId" /> | |
</object> | |
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!---Include the jQuery core file---> | |
<script type="text/javascript" src="/views/JavaScript/jquery-1.2.2.js"></script> | |
<script language="javascript"> | |
//Set the typical jQuery ready event handler to fire when the document is ready for manipulation | |
$(document).ready(function () { | |
//Assign a click event handler for all of the 'delete' hyperlinks (which all have a CSS class of 'deleteLink') | |
$(".deleteLink").click(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset errorList= ""> | |
<cfif form.firstName EQ ""> | |
<cfset errorList= ListAppend(errorList,"You must enter your first name.","|")> | |
</cfif> | |
<cfif form.lastName EQ ""> | |
<cfset errorList= ListAppend(errorList,"You must enter your last name.","|")> | |
</cfif> | |
<cfif errorList EQ ""> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("#submitButton").click(function () { | |
$("#submitType").val("ajax"); | |
}); | |
$('#submitDemoForm').submit(function() { | |
$(this).ajaxSubmit(submitOptions); | |
return false; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hideElement {display:none;} | |
.errorMsg {background-color:red;color:white;padding:.5ex;} | |
.successMsg {background-color:green;color:white;padding:.5ex;} | |
.successText {color:green;font-weight:bold;} | |
.errorText {color:red;font-weight:bold;} | |
form label { | |
width:7em; | |
float: left; |