rice-middleware/web/src/main/webapp/kr/scripts/objectInfo.js
/**
 * This method performs an ajax call to the docTypeService to 1. check for a valid
 * docTypeName.  If the name is valid then the page is reposted with the new
 * docTypeName.  This allows for the populating of the attributes on the doc search.
 *
 */
This method performs an ajax call to the docTypeService to 1. check for a valid
docTypeName.  If the name is valid then the page is reposted with the new
docTypeName.  This allows for the populating of the attributes on the doc search.
This method performs an ajax call to the docTypeService to 1 . check for a valid docTypeName . If the name is valid then the page is reposted with the new docTypeName . This allows for the populating of the attributes on the doc search .
function validateDocTypeAndRefresh(docTypeNameField){
	if (!document.forms[0].oldDocTypeFieldName) {
		return;
	}
	var docTypeName = dwr.util.getValue( docTypeNameField );
	var oldDocTypeName = document.forms[0].oldDocTypeFieldName.value;
	if(docTypeName != null && oldDocTypeName != docTypeName){
		var dwrReply = {
				callback:function(data) {
					if ( data != null && typeof data == 'object' ) {
						newField = document.createElement("input");
						newField.type = "hidden";
						newField.name = "documentTypeName";
						newField.value = data.name;
						var frm = document.forms[0];
						frm.methodToCall='post';
						frm.refreshCaller = 'docTypeLookupable';
						frm.submit();
					}
				},
				errorHandler:function( errorMessage ) {
					window.status = errorMessage;
				}
			};
		DocumentTypeService.findByNameCaseInsensitive(docTypeName, dwrReply);
	}
}
function validateDocTypeAndRefresh ( docTypeNameField ) { if ( ! document . forms [ 0 ] . oldDocTypeFieldName ) { return ; } var docTypeName = dwr . util . getValue ( docTypeNameField ) ; var oldDocTypeName = document . forms [ 0 ] . oldDocTypeFieldName . value ; if ( docTypeName != null && oldDocTypeName != docTypeName ) { var dwrReply = { callback : function ( data ) { if ( data != null && typeof data == 'object' ) { newField = document . createElement ( "input" ) ; newField . type = "hidden" ; newField . name = "documentTypeName" ; newField . value = data . name ; var frm = document . forms [ 0 ] ; frm . methodToCall = 'post' ; frm . refreshCaller = 'docTypeLookupable' ; frm . submit ( ) ; } } , errorHandler : function ( errorMessage ) { window . status = errorMessage ; } } ; DocumentTypeService . findByNameCaseInsensitive ( docTypeName , dwrReply ) ; } }
This method performs an ajax call to the docTypeService to 1. check for a valid
 docTypeName.
This method performs an ajax call to the docTypeService to 1 . check for a valid docTypeName .