configurazioneServizioGruppiTabelle.jsp 1.48 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
<%@ include file="/project/include.jsp" %>

<script type="text/javascript">
	function impostaGruppiDefault() {
		var elements = document.forms['buiForm'].elements;
		for (var i=0; i < elements.length; i++) {
			var element = elements[i];
			var elementClass = element.className;
			if (elementClass == 'form-input imposta-default') {
				if (element.selectedIndex == 0 && element.length == 2) {
					element.selectedIndex = 1;
				}
			}
		}
	}
</script>

<c:set var="idx1" scope="page" value="${dto_base_gruppi}" />

<shell:fieldset title="Gruppi tabelle">
	<table cellspacing="3" cellpadding="0" >
		<bui:out modes="create,update">
		<tr>
			<td colspan="2">
				<button class="generic-button ui-state-default ui-corner-all" onClick="javascript:impostaGruppiDefault(); return false;">&nbsp;Imposta gruppo di default&nbsp;</button>
			</td>
		</tr>
		</bui:out>
		<c:forEach var="gruppo" items="${dto_gruppi}">
   			<tr>
	    		<td class="form-label">
					<shell:label prop="prop_${idx1}" label="${gruppo.descrizione}"/>
				</td>
				<td class="form-values">													
					<bui:out modes="update">
						<j:bind prop="prop_${idx1}">
							<j:select class="form-input imposta-default" emptyOptionDescr="" />
							<shell:error />
						</j:bind>
					</bui:out>
					<bui:out modes="view">
						<j:tile name="shell.plaintext" prop="prop_${idx1}" />
					</bui:out>
				</td>
    		</tr> 
    		<c:set var="idx1" scope="page" value="${idx1 + 1}" />
   		</c:forEach>
   	</table>   	
</shell:fieldset>