1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 pageEncoding="ISO-8859-1"
4 <%@ taglib prefix="s" uri="/struts-tags"
6 <s:set var="todo"><%=request.getParameter("action")%></s:set>
7 <s:set var="type"><%=request.getParameter("type")%></s:set>
8 <s:url id="undo" namespace="/study" action="step-study"></s:url>
10 <!-- Selection of an existing type of simulation context
12 <s:if test="%{#todo == 'selectContext'}">
13 <table cellpadding=0 cellspacing=0 border=0 class=text>
14 <tr height=2><td></td></tr>
15 <s:iterator value="simulationContexts">
18 <s:if test="%{isApproved()}"><img src="<s:url value="/skin/disabled.APPROVED.png"/>" width=14 height=14 border="none" /></s:if>
19 <s:else><img src="<s:url value="/skin/disabled.state.png"/>" width=14 height=14 border="none" /></s:else>
22 <s:if test="%{type.isApproved()}"><b><s:text name="type.context.%{typeName}"/>: </b></s:if>
23 <s:else><b><s:property value="%{typeName}"/>: </b></s:else>
25 <td><s:property value="value"/></td>
29 <table cellpadding=0 cellspacing=0 border=0 class=text>
31 <td width=18 align=center>
32 <s:a href="%{undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="tooltip.cancel"/>" /></s:a>
35 <select name="contextType" onChange="submit()">
36 <s:set var="category" value="-1"/>
37 <option value="-1"><s:text name="menu.selectcontextype"/></option>
38 <option value="0"> <s:text name="menu.newcontype"/></option>
39 <s:iterator value="simulationContextTypes">
40 <s:set var="valided" value="%{isApproved()}"/>
41 <s:if test="%{#category != #valided}">
42 <s:if test="%{#category != '-1'}"></optgroup></s:if>
43 <s:if test="%{#valided}"><optgroup label=" <s:text name="label.contypes.valid"/>"></s:if>
44 <s:else><optgroup label=" <s:text name="label.contypes"/>"></s:else>
45 <s:set var="category" value="%{#valided}"/>
47 <option value="<s:property value="index"/>">
48 <s:if test="%{isApproved()}"> <s:text name="type.context.%{name}"/></s:if>
49 <s:else> <s:property value="%{name}"/></s:else>
60 <!-- List of existing simulation contexts
62 <table cellpadding=0 cellspacing=0 border=0 class=text>
63 <tr height=2><td></td></tr>
64 <s:iterator value="simulationContexts">
67 <s:if test="%{isApproved()}"><img src="<s:url value="/skin/disabled.APPROVED.png"/>" width=14 height=14 border="none" /></s:if>
68 <s:else><img src="<s:url value="/skin/disabled.state.png"/>" width=14 height=14 border="none" /></s:else>
71 <s:if test="%{type.isApproved()}"><b><s:text name="type.context.%{typeName}"/>: </b></s:if>
72 <s:else><b><s:property value="%{typeName}"/>: </b></s:else>
74 <td><s:property value="value"/></td>
79 <!-- Display of eventual input error
82 <!-- Input of a new type of simulation context
84 <table cellpadding=0 cellspacing=0 border=0 class=text>
85 <s:if test="%{#todo == 'newContext'}">
87 <td width=18 align=center>
88 <s:a href="%{undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="tooltip.cancel"/>" /></s:a>
90 <td><input type=text name=newType value="<s:text name="field.contextype"/>"> : </td>
91 <td><input type=text name=contextValue></td>
93 <button type="submit" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
94 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
100 <!-- Input of a value of the selected simulation context type
102 <s:elseif test="%{#todo == 'setContext'}">
104 <td width=18 align=center>
105 <s:a href="%{undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="tooltip.cancel"/>" /></s:a>
108 <s:if test="%{contextType.isApproved()}"><b><s:text name="type.context.%{contextName}"/>: </b></s:if>
109 <s:else><b><s:property value="%{contextName}"/>: </b></s:else>
111 <s:if test="simulationContextValues.size > 0">
113 <select name="contextValue" onChange="setValue()">
114 <option value="-1"><s:text name="menu.select"/></option>
115 <option value="0"> <s:text name="menu.newcontext"/></option>
116 <optgroup label=" <s:text name="label.contexts"/>">
117 <s:iterator value="simulationContextValues">
118 <option value="<s:property value="index"/>"> <s:property value="value"/></option>
123 <td id=enter style="display: none">
124 <input type=hidden name=contextType value="<s:property value="%{#type}"/>">
125 <input type=text name=contextValue>
128 <button type="submit" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
129 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
135 <input type=hidden name=contextType value="<s:property value="%{#type}"/>">
136 <input type=hidden name=contextValue value="0">
137 <input type=text name=contextValue>
140 <button type="submit" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
141 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>