Changeset 130
- Timestamp:
- 07/31/08 03:52:49 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
example-web/trunk/src/main/webapp/lookup_table_edit_example.html
r119 r130 53 53 <th>Label</th> 54 54 <th>Col Hdg</th> 55 <th>Req</th> 56 <th>DOL</th> 55 57 <th>Source</th> 56 58 <th>Notes</th> … … 62 64 <td><input type="text" id="label[0]" size="10"/></td> 63 65 <td><input type="text" id="colHeading[0]" size="10"/></td> 66 <td><input type="checkbox" id="inputRequired[0]"/></td> 67 <td><input type="checkbox" id="displayOnList[0]"/></td> 64 68 <td><input type="text" id="source[0]" size="10"/></td> 65 69 <td><input type="text" id="notes[0]" size="10"/></td> … … 71 75 <td><input type="text" id="label[1]" size="10"/></td> 72 76 <td><input type="text" id="colHeading[1]" size="10"/></td> 77 <td><input type="checkbox" id="inputRequired[1]"/></td> 78 <td><input type="checkbox" id="displayOnList[1]"/></td> 73 79 <td><input type="text" id="source[1]" size="10"/></td> 74 80 <td><input type="text" id="notes[1]" size="10"/></td> … … 80 86 <td><input type="text" id="label[2]" size="10"/></td> 81 87 <td><input type="text" id="colHeading[2]" size="10"/></td> 88 <td><input type="checkbox" id="inputRequired[2]"/></td> 89 <td><input type="checkbox" id="displayOnList[2]"/></td> 82 90 <td><input type="text" id="source[2]" size="10"/></td> 83 91 <td><input type="text" id="notes[2]" size="10"/></td> … … 89 97 <td><input type="text" id="label[3]" size="10"/></td> 90 98 <td><input type="text" id="colHeading[3]" size="10"/></td> 99 <td><input type="checkbox" id="inputRequired[3]"/></td> 100 <td><input type="checkbox" id="displayOnList[3]"/></td> 91 101 <td><input type="text" id="source[3]" size="10"/></td> 92 102 <td><input type="text" id="notes[3]" size="10"/></td> … … 98 108 <td><input type="text" id="label[4]" size="10"/></td> 99 109 <td><input type="text" id="colHeading[4]" size="10"/></td> 110 <td><input type="checkbox" id="inputRequired[4]"/></td> 111 <td><input type="checkbox" id="displayOnList[4]"/></td> 100 112 <td><input type="text" id="source[4]" size="10"/></td> 101 113 <td><input type="text" id="notes[4]" size="10"/></td> … … 107 119 <td><input type="text" id="label[5]" size="10"/></td> 108 120 <td><input type="text" id="colHeading[5]" size="10"/></td> 121 <td><input type="checkbox" id="inputRequired[5]"/></td> 122 <td><input type="checkbox" id="displayOnList[5]"/></td> 109 123 <td><input type="text" id="source[5]" size="10"/></td> 110 124 <td><input type="text" id="notes[5]" size="10"/></td> … … 116 130 <td><input type="text" id="label[6]" size="10"/></td> 117 131 <td><input type="text" id="colHeading[6]" size="10"/></td> 132 <td><input type="checkbox" id="inputRequired[6]"/></td> 133 <td><input type="checkbox" id="displayOnList[6]"/></td> 118 134 <td><input type="text" id="source[6]" size="10"/></td> 119 135 <td><input type="text" id="notes[6]" size="10"/></td> … … 125 141 <td><input type="text" id="label[7]" size="10"/></td> 126 142 <td><input type="text" id="colHeading[7]" size="10"/></td> 143 <td><input type="checkbox" id="inputRequired[7]"/></td> 144 <td><input type="checkbox" id="displayOnList[7]"/></td> 127 145 <td><input type="text" id="source[7]" size="10"/></td> 128 146 <td><input type="text" id="notes[7]" size="10"/></td> … … 134 152 <td><input type="text" id="label[8]" size="10"/></td> 135 153 <td><input type="text" id="colHeading[8]" size="10"/></td> 154 <td><input type="checkbox" id="inputRequired[8]"/></td> 155 <td><input type="checkbox" id="displayOnList[8]"/></td> 136 156 <td><input type="text" id="source[8]" size="10"/></td> 137 157 <td><input type="text" id="notes[8]" size="10"/></td> … … 143 163 <td><input type="text" id="label[9]" size="10"/></td> 144 164 <td><input type="text" id="colHeading[9]" size="10"/></td> 165 <td><input type="checkbox" id="inputRequired[9]"/></td> 166 <td><input type="checkbox" id="displayOnList[9]"/></td> 145 167 <td><input type="text" id="source[9]" size="10"/></td> 146 168 <td><input type="text" id="notes[9]" size="10"/></td> … … 152 174 <td><input type="text" id="label[10]" size="10"/></td> 153 175 <td><input type="text" id="colHeading[10]" size="10"/></td> 176 <td><input type="checkbox" id="inputRequired[10]"/></td> 177 <td><input type="checkbox" id="displayOnList[10]"/></td> 154 178 <td><input type="text" id="source[10]" size="10"/></td> 155 179 <td><input type="text" id="notes[10]" size="10"/></td> … … 161 185 <td><input type="text" id="label[11]" size="10"/></td> 162 186 <td><input type="text" id="colHeading[11]" size="10"/></td> 187 <td><input type="checkbox" id="inputRequired[11]"/></td> 188 <td><input type="checkbox" id="displayOnList[11]"/></td> 163 189 <td><input type="text" id="source[11]" size="10"/></td> 164 190 <td><input type="text" id="notes[11]" size="10"/></td> … … 170 196 <td><input type="text" id="label[12]" size="10"/></td> 171 197 <td><input type="text" id="colHeading[12]" size="10"/></td> 198 <td><input type="checkbox" id="inputRequired[12]"/></td> 199 <td><input type="checkbox" id="displayOnList[12]"/></td> 172 200 <td><input type="text" id="source[12]" size="10"/></td> 173 201 <td><input type="text" id="notes[12]" size="10"/></td> … … 179 207 <td><input type="text" id="label[13]" size="10"/></td> 180 208 <td><input type="text" id="colHeading[13]" size="10"/></td> 209 <td><input type="checkbox" id="inputRequired[13]"/></td> 210 <td><input type="checkbox" id="displayOnList[13]"/></td> 181 211 <td><input type="text" id="source[13]" size="10"/></td> 182 212 <td><input type="text" id="notes[13]" size="10"/></td> … … 188 218 <td><input type="text" id="label[14]" size="10"/></td> 189 219 <td><input type="text" id="colHeading[14]" size="10"/></td> 220 <td><input type="checkbox" id="inputRequired[14]"/></td> 221 <td><input type="checkbox" id="displayOnList[14]"/></td> 190 222 <td><input type="text" id="source[14]" size="10"/></td> 191 223 <td><input type="text" id="notes[14]" size="10"/></td> … … 197 229 <td><input type="text" id="label[15]" size="10"/></td> 198 230 <td><input type="text" id="colHeading[15]" size="10"/></td> 231 <td><input type="checkbox" id="inputRequired[15]"/></td> 232 <td><input type="checkbox" id="displayOnList[15]"/></td> 199 233 <td><input type="text" id="source[15]" size="10"/></td> 200 234 <td><input type="text" id="notes[15]" size="10"/></td> … … 206 240 <td><input type="text" id="label[16]" size="10"/></td> 207 241 <td><input type="text" id="colHeading[16]" size="10"/></td> 242 <td><input type="checkbox" id="inputRequired[16]"/></td> 243 <td><input type="checkbox" id="displayOnList[16]"/></td> 208 244 <td><input type="text" id="source[16]" size="10"/></td> 209 245 <td><input type="text" id="notes[16]" size="10"/></td> … … 215 251 <td><input type="text" id="label[17]" size="10"/></td> 216 252 <td><input type="text" id="colHeading[17]" size="10"/></td> 253 <td><input type="checkbox" id="inputRequired[17]"/></td> 254 <td><input type="checkbox" id="displayOnList[17]"/></td> 217 255 <td><input type="text" id="source[17]" size="10"/></td> 218 256 <td><input type="text" id="notes[17]" size="10"/></td> … … 224 262 <td><input type="text" id="label[18]" size="10"/></td> 225 263 <td><input type="text" id="colHeading[18]" size="10"/></td> 264 <td><input type="checkbox" id="inputRequired[18]"/></td> 265 <td><input type="checkbox" id="displayOnList[18]"/></td> 226 266 <td><input type="text" id="source[18]" size="10"/></td> 227 267 <td><input type="text" id="notes[18]" size="10"/></td> … … 233 273 <td><input type="text" id="label[19]" size="10"/></td> 234 274 <td><input type="text" id="colHeading[19]" size="10"/></td> 275 <td><input type="checkbox" id="inputRequired[19]"/></td> 276 <td><input type="checkbox" id="displayOnList[19]"/></td> 235 277 <td><input type="text" id="source[19]" size="10"/></td> 236 278 <td><input type="text" id="notes[19]" size="10"/></td> example-web/trunk/src/main/webapp/scripts/lookup_table_edit_example.js
r128 r130 14 14 */ 15 15 function initPage() { 16 load PagequeryParameter();16 loadQueryParameters(); 17 17 ajaxGet('/id/whoami', 'initPageCont','ajaxError'); 18 18 } … … 21 21 * Loads in any parameters found in the current URL's query string 22 22 */ 23 function load PagequeryParameter() {23 function loadQueryParameters() { 24 24 var thisURL = document.location.href; 25 25 if (thisURL.indexOf('?') != -1) { … … 77 77 if (property[i].getElementsByTagName('colHeading')[0].firstChild != null) { 78 78 document.getElementById('colHeading[' + i + ']').value = property[i].getElementsByTagName('colHeading')[0].firstChild.data; 79 } 80 if (property[i].getElementsByTagName('inputRequired')[0].firstChild != null) { 81 if (property[i].getElementsByTagName('inputRequired')[0].firstChild.data == 'true') { 82 document.getElementById('inputRequired[' + i + ']').checked = true; 83 } 84 } 85 if (property[i].getElementsByTagName('displayOnList')[0].firstChild != null) { 86 if (property[i].getElementsByTagName('displayOnList')[0].firstChild.data == 'true') { 87 document.getElementById('displayOnList[' + i + ']').checked = true; 88 } 79 89 } 80 90 if (property[i].getElementsByTagName('source')[0].firstChild != null) { … … 176 186 xml += ' <label>' + document.getElementById('label[' + i + ']').value + '</label>\n'; 177 187 xml += ' <colHeading>' + document.getElementById('colHeading[' + i + ']').value + '</colHeading>\n'; 178 xml += ' <inputRequired> true</inputRequired>\n';179 xml += ' <displayOnList> true</displayOnList>\n';188 xml += ' <inputRequired>' + document.getElementById('inputRequired[' + i + ']').checked + '</inputRequired>\n'; 189 xml += ' <displayOnList>' + document.getElementById('displayOnList[' + i + ']').checked + '</displayOnList>\n'; 180 190 xml += ' <source>' + document.getElementById('source[' + i + ']').value + '</source>\n'; 181 191 xml += ' <notes>' + document.getElementById('notes[' + i + ']').value + '</notes>\n'; … … 220 230 parameters += '&colHeading[' + i + ']=' + document.getElementById('colHeading[' + i + ']').value; 221 231 } 232 parameters += '&inputRequired[' + i + ']=' + document.getElementById('inputRequired[' + i + ']').checked; 233 parameters += '&displayOnList[' + i + ']=' + document.getElementById('displayOnList[' + i + ']').checked; 222 234 if (document.getElementById('source[' + i + ']').value > '') { 223 235 parameters += '&source[' + i + ']=' + document.getElementById('source[' + i + ']').value;