<table class="tableSelectAndUpdate" id="table_{{$id}}">
	<tr>
            <th width="50">Action</th>
            <th width="50"></th>
            <th align="center" ng-repeat="header in attributes" > &nbsp;&nbsp;{{header.alias}}</th>
	</tr>

<!-- Filtre -->
    <tr>
        <td colspan="2">
           Filtre
        </td>
        <td ng-repeat="att in attributes" >
            <!-- TYPE STRING -->
            <input class="form-group" type="text"
                       ng-if="att.type=='java.lang.String'"                               
                       ng-model="textFilter.properties[att.name]"
                       ng-change="filterChanged()"
                       ng-style="txtStyle" >
           <!-- Numeric field -->
           <input type="text" numbers-only class="form-control"
                     ng-if="att.type=='java.lang.Integer' && !att.fieldTypeIsDomain"
                     ng-model="textFilter.properties[att.name]"
                     ng-change="filterChanged()" 
                     ng-style="txtStyle" >
           </input>
        </td>
    </tr>


    <!-- Liste des enregistrements en base -->
	<tr ng-repeat="obj in objects">
        <td>
            <input type="button" value="U" ng-show="showUpdateBtn" ng-click="updateRecord(obj);"/>
		</td>
		<td ng-if="config.selectionType=='multiple'">
            <input type="checkbox" ng-click="checkObj(obj)" ng-checked="{{getObjIsChecked(obj)}}"/>
		</td>
		<td ng-if="config.selectionType=='single'">
            <input type="radio" name="radio_{{thisId}}" ng-click="checkObj(obj)" ng-checked="{{getObjIsChecked(obj)}}"/>
		</td>
		<td ng-repeat="att in attributes" >
		
           <!-- TYPE STRING -->
           <input class="form-group" type="text" title="{{obj.properties[att.name]}}"
                  ng-if="att.type=='java.lang.String' && !att.fieldTypeIsDomain"                               
                  ng-model="obj.properties[att.name]"
                  ng_disabled="!showUpdateBtn"                                           
                  ng-style="txtStyle" />
            
           <!-- Numeric field -->
           <input type="text" numbers-only class="form-control"
                     ng-if="att.type=='java.lang.Integer' && !att.fieldTypeIsDomain"
                     ng-show="!att.fieldHasUnit"
                     ng-model="obj.properties[att.name]" >
           </input>
           <table ng-if="att.fieldHasUnit">
                <tr>
                    <td>
                      <input type="text" numbers-only class="form-control"
                         ng-show="obj.properties[att.name].fieldHasUnit"
                         ng-if="att.type=='java.lang.Integer'  && !att.fieldTypeIsDomain"
                         ng-attr-title="{{obj.properties[att.name]+' '+dbUnit}}"
                         ng-model="att.numericValue.value" >
                      </input>
                    </td>
                    <td>
                      <select ng-if="att.fieldHasUnit"
                              ng-options="unit.symbol for unit in att.unitDesc.multiple"
                              ng-attr-title="{{att.currentUnitFactor.value.tooltip}}"
                              ng-model="att.currentUnitFactor.value"
                            >
                      </select>
                    </td>
                </tr>      
           </table>
  
            <!-- TYPE DATE -->
		    <div class="form-group" ng-if="att.type=='java.sql.Date'" 
			  						  ng-class="{'has-error': datepickerForm.date.$invalid}">
			      <input type="text" class="form-control" style="min-width:150px;" 
			      		 data-date-format="dd/MM/yyyy"
			      		 data_autoclose="true"                                          
			      		 ng-model="obj.properties[att.name]"
			      		 ng_disabled="!showUpdateBtn"					    					
			      		 name="date" bs-datepicker /><!-- ng-change="valueChanged({{obj}})"-->
			</div>
			
                     <!-- TYPE DOMAIN -->
                    <!-- Dropdown value list for domains -->
                    <select class="select01" 
                            ng-if="att.fieldTypeIsDomain"
                            ng-model="obj.properties[att.name]"                               
                            title="{{obj.properties[att.name]}}" 
                            ng-style="txtStyle"
                            ng_disabled="!showUpdateBtn"                                           
                            ng-options="desc.code as desc.value for desc in att.listOfValues">
                    </select><!-- ng-change="valueChanged({{obj}})"-->

  
		    <ffl2AttachmentDirective ng-if="att.fieldTypeIsSingleAttachment" 
		  				my-cardinality="1" the-feature="{{obj}}" >
		    </ffl2AttachmentDirective>
  
   		    <ffl2AttachmentDirective ng-if="att.fieldTypeIsMultipleAttachments" 
  				my-cardinality="n" the-feature="{{obj}}" >
                    </ffl2AttachmentDirective>
		</td>
	</tr>
       
        <!-- Formulaire pour un nouvel enregistrement -->        
	<tr>
                <td></td>
		<td></td>
		<td ng-repeat="att in attributes" >
		
                    <!-- TYPE STRING -->
                    <input class="form-group" type="text" ng-if="att.type=='java.lang.String' && !att.fieldTypeIsDomain" 
                       ng-model="att.value" style="color:#000000;" />

                    <!-- TYPE DATE -->
		    <div class="form-group" ng-if="att.type=='java.sql.Date'"  ng-class="{'has-error': datepickerForm.date.$invalid}">
                        <input type="text" class="form-control" style="min-width:100px;" 
                                   data-date-format="dd/MM/yyyy"
                                   data_autoclose="true"  
                                   ng-model="att.value"					    
                                   name="date" bs-datepicker />
                    </div>
			
                    <!-- TYPE DOMAIN -->
                    <!-- Dropdown value list for domains -->					
                    <select class="select01" ng-if="att.fieldTypeIsDomain"
                            ng-model="att.value"				  
                            ng-attr-title="att.value" 
                            ng-style="txtStyle"
                            ng-options="desc.code as desc.value for desc in att.listOfValues">
                    </select>

		    <ffl2AttachmentDirective ng-if="att.fieldTypeIsSingleAttachment" 
		  				my-cardinality="1" the-feature="{{obj}}" >
		    </ffl2AttachmentDirective>
  
   		    <ffl2AttachmentDirective ng-if="att.fieldTypeIsMultipleAttachments" 
  				my-cardinality="n" the-feature="{{obj}}" >
            </ffl2AttachmentDirective>
		</td>
	</tr>
</table>
<table>
	<tr>
		<td><button ng-click="firstPage();" ng-show="currentPage!=0">&lt;&lt;</button></td>
		<td width="5"></td>
		<td><button ng-click="previousPage();" ng-show="currentPage!=0">&lt;</button></td>
		<td width="5"></td>
		<td><button ng-click="nextPage();" ng-show="currentPage!=lastPageNumber">&gt;</button></td>
		<td width="5"></td>
		<td><button ng-click="lastPage();" ng-show="currentPage!=lastPageNumber">&gt;&gt;</button></td>
	</tr>
</table>
<BR>
<table>
	<tr>
        <td>
            <input type="button" value="Choisir et Fermer" ng-show="showSelectBtn" ng-click="selectRecords(true);"/>
        </td>
        <td width="10">
        <td>
            <input type="button" value="Choisir" ng-show="showSelectBtn" ng-click="selectRecords(false);"/>
        </td>
        <td width="10">
		</td>
		<td>
			<input type="button" value="Ajouter" ng-show="showAddBtn" ng-click="addNewRecord();"/>
		</td>
		<td width="10">
		</td>
		<td>
			<input type="button" value="Modifier" ng-show="false" ng-click="updateRecord();"/>
		</td>
		<td width="10">
		</td>
		<td>
			<input type="button" value="Supprimer" ng-show="showDeleteBtn" ng-click="deleteRecords();"/>
		</td>
	</tr>
</table>
<!-- 
<div FormFieldGroupDirective ng-repeat="theField in fieldGroups">
</div>
 -->

