1
我需要顯示在ojTable內POJO的字段的值。如何顯示從內部對象中ojTable值與Oracle噴氣
這裏是bakcend代碼:
public class Profile implements Serializable {
private String descr;
private Location location; // I need to show on table -> ojtable
}
public class Location implements Serializable {
private Long id;
private String locationName;
}
和HTML代碼:
<table id="table" summary="Subscriber List"
data-bind="ojComponent: {component: 'ojTable',
emptyText: 'No Data',
data: dataSource,
selectionMode: {row: 'single'},
columnsDefault: {sortable: 'enabled'},
dnd: {reorder: {columns: 'enabled'}},
columns:
[{headerText: 'Description',
field: 'description'},
{ headerText: 'Location Name',
field: 'location.locationName'} ----->>>>>> This one is not working
],
rootAttributes: {'style':'width: 100%; height:100%;'}}">
</table>
在這種情況下我有檔案的對象,並需要在HTML面達到內定位對象的LOCATIONNAME場。 我試過點notaion - > location.locationName但它不起作用。
我也嘗試過自定義渲染/淘汰賽模板,但他們都需要爲每一個領域,我需要證明,這是不通用的,我認爲一個新的JS functinon。
請幫我實現這一點。
在此先感謝。