configurazioneDispositiviOwners.jsp 3.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
<%@ include file="/project/include.jsp" %>

<script type="text/javascript">
function findOperatore(idTextNominativo, idHiddenSoggetto, lookupId) {
	var nominativo = document.getElementById(idTextNominativo).value;		
	if (nominativo == '') {
		document.getElementById(idHiddenSoggetto).value = '';
		return;
	}				
	var idSoggetto = document.getElementById(idHiddenSoggetto).value;
	if (idSoggetto != '') return;
	var response = jsLoadString('it.cedaf.icare.commons.FindOperatoreCollocatoExecutor', 'nominativo=' + nominativo);
	if (response == 'NO_RESPONSE') {
		shellLookup(lookupId, 'anagrafiche.operatore', 'it.cedaf.icare.anagrafiche.control.initializer.OperatoreLookupInitializer', 
			'onlySearch=true', idTextNominativo + '|nominativo');
	} else {
		var result = response.split('|');
		document.getElementById(idHiddenSoggetto).value = result[0];
		document.getElementById(idTextNominativo).value = result[3];
	}		
}	

function onBlurOperatore(idLookup) {
	findOperatore('nominativo_' + idLookup, 'id_' + idLookup, idLookup);
}	
function pulisciHidden(hiddenId) {
	document.getElementById(hiddenId).value = "";
}
</script>

<j:tile slave="${_slave}" name="shell.slaveToolbar" />
<shell:grid description="operatore,60%; validita,40%" slave="${_slave}" />

<shell:fieldset title="Informazioni generali">	
	<table border="0" cellpadding="0" cellspacing="3" width="100%">
		<tr>
			<td class="form-label">
				<shell:label prop="idOperatore" />
			</td>
			<td class="form-values">
				<bui:out slave="${_slave}" modes="view">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="operatore" />
				</bui:out>
				<bui:out slave="${_slave}" modes="create,update">
					<j:bind prop="operatore">
						<j:text class="form-long-text" id="nominativo_operatoreLookup" 
							onChange="pulisciHidden('id_operatoreLookup');" 
							onBlur="onBlurOperatore('operatoreLookup');"/>
					</j:bind>
					<j:bind prop="idOperatore">
						<j:hidden id="id_operatoreLookup"/>
						<shell:error />
					</j:bind>
					<shell:lookup lookupId="operatoreLookup" 
						identifier="anagrafiche.operatore" init="it.cedaf.icare.anagrafiche.control.initializer.OperatoreLookupInitializer" 
						params="onlySearch=true" formParams="nominativo_operatoreLookup|nominativo"/>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="dataInizio" />
			</td>
			<td class="form-values">
				dal 
				<bui:out slave="${_slave}" modes="view">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="dataInizio" />
				</bui:out>
				<bui:out slave="${_slave}" modes="create,update">																		
					<j:bind prop="dataInizio">
						<j:text class="form-date" id="dataInizioCLD" />
						<shell:calendar inputId="dataInizioCLD" />	
						<shell:error />
					</j:bind>
				</bui:out>
				al
				<bui:out slave="${_slave}" modes="view">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="dataFine" />
				</bui:out>
				<bui:out slave="${_slave}" modes="create,update">																		
					<j:bind prop="dataFine">
						<j:text class="form-date" id="dataFineCLD" />
						<shell:calendar inputId="dataFineCLD" />	
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>	
	</table>
</shell:fieldset>