Assembla home | Assembla project page
 

Changeset 130

Show
Ignore:
Timestamp:
07/31/08 03:52:49 (5 months ago)
Author:
restamon
Message:

Look-up table entry XSL

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • example-web/trunk/src/main/webapp/lookup_table_edit_example.html

    r119 r130  
    5353        <th>Label</th> 
    5454        <th>Col Hdg</th> 
     55        <th>Req</th> 
     56        <th>DOL</th> 
    5557        <th>Source</th> 
    5658        <th>Notes</th> 
     
    6264        <td><input type="text" id="label[0]" size="10"/></td> 
    6365        <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> 
    6468        <td><input type="text" id="source[0]" size="10"/></td> 
    6569        <td><input type="text" id="notes[0]" size="10"/></td> 
     
    7175        <td><input type="text" id="label[1]" size="10"/></td> 
    7276        <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> 
    7379        <td><input type="text" id="source[1]" size="10"/></td> 
    7480        <td><input type="text" id="notes[1]" size="10"/></td> 
     
    8086        <td><input type="text" id="label[2]" size="10"/></td> 
    8187        <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> 
    8290        <td><input type="text" id="source[2]" size="10"/></td> 
    8391        <td><input type="text" id="notes[2]" size="10"/></td> 
     
    8997        <td><input type="text" id="label[3]" size="10"/></td> 
    9098        <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> 
    91101        <td><input type="text" id="source[3]" size="10"/></td> 
    92102        <td><input type="text" id="notes[3]" size="10"/></td> 
     
    98108        <td><input type="text" id="label[4]" size="10"/></td> 
    99109        <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> 
    100112        <td><input type="text" id="source[4]" size="10"/></td> 
    101113        <td><input type="text" id="notes[4]" size="10"/></td> 
     
    107119        <td><input type="text" id="label[5]" size="10"/></td> 
    108120        <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> 
    109123        <td><input type="text" id="source[5]" size="10"/></td> 
    110124        <td><input type="text" id="notes[5]" size="10"/></td> 
     
    116130        <td><input type="text" id="label[6]" size="10"/></td> 
    117131        <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> 
    118134        <td><input type="text" id="source[6]" size="10"/></td> 
    119135        <td><input type="text" id="notes[6]" size="10"/></td> 
     
    125141        <td><input type="text" id="label[7]" size="10"/></td> 
    126142        <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> 
    127145        <td><input type="text" id="source[7]" size="10"/></td> 
    128146        <td><input type="text" id="notes[7]" size="10"/></td> 
     
    134152        <td><input type="text" id="label[8]" size="10"/></td> 
    135153        <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> 
    136156        <td><input type="text" id="source[8]" size="10"/></td> 
    137157        <td><input type="text" id="notes[8]" size="10"/></td> 
     
    143163        <td><input type="text" id="label[9]" size="10"/></td> 
    144164        <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> 
    145167        <td><input type="text" id="source[9]" size="10"/></td> 
    146168        <td><input type="text" id="notes[9]" size="10"/></td> 
     
    152174        <td><input type="text" id="label[10]" size="10"/></td> 
    153175        <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> 
    154178        <td><input type="text" id="source[10]" size="10"/></td> 
    155179        <td><input type="text" id="notes[10]" size="10"/></td> 
     
    161185        <td><input type="text" id="label[11]" size="10"/></td> 
    162186        <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> 
    163189        <td><input type="text" id="source[11]" size="10"/></td> 
    164190        <td><input type="text" id="notes[11]" size="10"/></td> 
     
    170196        <td><input type="text" id="label[12]" size="10"/></td> 
    171197        <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> 
    172200        <td><input type="text" id="source[12]" size="10"/></td> 
    173201        <td><input type="text" id="notes[12]" size="10"/></td> 
     
    179207        <td><input type="text" id="label[13]" size="10"/></td> 
    180208        <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> 
    181211        <td><input type="text" id="source[13]" size="10"/></td> 
    182212        <td><input type="text" id="notes[13]" size="10"/></td> 
     
    188218        <td><input type="text" id="label[14]" size="10"/></td> 
    189219        <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> 
    190222        <td><input type="text" id="source[14]" size="10"/></td> 
    191223        <td><input type="text" id="notes[14]" size="10"/></td> 
     
    197229        <td><input type="text" id="label[15]" size="10"/></td> 
    198230        <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> 
    199233        <td><input type="text" id="source[15]" size="10"/></td> 
    200234        <td><input type="text" id="notes[15]" size="10"/></td> 
     
    206240        <td><input type="text" id="label[16]" size="10"/></td> 
    207241        <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> 
    208244        <td><input type="text" id="source[16]" size="10"/></td> 
    209245        <td><input type="text" id="notes[16]" size="10"/></td> 
     
    215251        <td><input type="text" id="label[17]" size="10"/></td> 
    216252        <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> 
    217255        <td><input type="text" id="source[17]" size="10"/></td> 
    218256        <td><input type="text" id="notes[17]" size="10"/></td> 
     
    224262        <td><input type="text" id="label[18]" size="10"/></td> 
    225263        <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> 
    226266        <td><input type="text" id="source[18]" size="10"/></td> 
    227267        <td><input type="text" id="notes[18]" size="10"/></td> 
     
    233273        <td><input type="text" id="label[19]" size="10"/></td> 
    234274        <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> 
    235277        <td><input type="text" id="source[19]" size="10"/></td> 
    236278        <td><input type="text" id="notes[19]" size="10"/></td> 
  • example-web/trunk/src/main/webapp/scripts/lookup_table_edit_example.js

    r128 r130  
    1414 */ 
    1515function initPage() { 
    16         loadPagequeryParameter(); 
     16        loadQueryParameters(); 
    1717        ajaxGet('/id/whoami', 'initPageCont','ajaxError'); 
    1818} 
     
    2121 * Loads in any parameters found in the current URL's query string 
    2222 */ 
    23 function loadPagequeryParameter() { 
     23function loadQueryParameters() { 
    2424        var thisURL = document.location.href; 
    2525        if (thisURL.indexOf('?') != -1) { 
     
    7777                if (property[i].getElementsByTagName('colHeading')[0].firstChild != null) { 
    7878                        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                        } 
    7989                } 
    8090                if (property[i].getElementsByTagName('source')[0].firstChild != null) { 
     
    176186                        xml += '      <label>' + document.getElementById('label[' + i + ']').value + '</label>\n'; 
    177187                        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'; 
    180190                        xml += '      <source>' + document.getElementById('source[' + i + ']').value + '</source>\n'; 
    181191                        xml += '      <notes>' + document.getElementById('notes[' + i + ']').value + '</notes>\n'; 
     
    220230                                parameters += '&colHeading[' + i + ']=' + document.getElementById('colHeading[' + i + ']').value; 
    221231                        } 
     232                        parameters += '&inputRequired[' + i + ']=' + document.getElementById('inputRequired[' + i + ']').checked; 
     233                        parameters += '&displayOnList[' + i + ']=' + document.getElementById('displayOnList[' + i + ']').checked; 
    222234                        if (document.getElementById('source[' + i + ']').value > '') { 
    223235                                parameters += '&source[' + i + ']=' + document.getElementById('source[' + i + ']').value;