전체 글(809)
-
Sencha treepanel 체크박스 체크하면 css 적용하기
Ext.fly().toggle.Cls 사용{ xtype: 'checkcolumn', dataIndex: 'check', width: 50, listeners: { checkchange: function (column, rowIndex, checked, record) { record.commit(); // Commit changes to reflect visually // Apply a CSS class to visually indicate deletion const view = column.up('treepanel').getView(); const rowNode = view.ge..
2024.12.21 -
Sencha column의 값에 따라 삭제 표시 처리
flagDeleted로 값이 설정되면, 삭제표시 viewConfig: { getRowClass: function (record) { // Apply a CSS class to flagged rows return record.get('flagDeleted') ? 'deleted-row' : ''; } },
2024.12.21 -
Sencha button 이벤트 추가하기
{ xtype: 'button', text: 'Click Me', handler: function () { Ext.Msg.alert('Button Clicked', 'You clicked the button!'); }}
2024.12.19 -
Sencha container 오른쪽 정렬하기
{ xtype: 'container', layout: { type: 'hbox', // Horizontal layout pack: 'end', // Aligns child items to the right }, items: [ { xtype: 'button', text: 'Button 1' }, { xtype: 'button', text: 'Button 2' }, ],}
2024.12.19 -
Java List<Map<String, Object> 분리
분리할 대상List> data = (List>)reqModel.get("data");key에 'flagDeleted'가 있는 데이터 분리List> flaggedRows = data.stream() .filter(row -> row.containsKey("flagDeleted")) .collect(Collectors.toList());key에 'flagDeleted'가 없는 데이터 분리List> nonFlaggedRows = data.stream() .filter(row -> !row.containsKey("flagDeleted")) .collect(Collectors.toList());원본에서 지우기data.removeIf(row -> row.containsKey("flagDelete"));
2024.12.18 -
Sencha grid 선택된 데이터 삭제 처리
const grid = btn.up('grid');const store = grid.getStore();const selection = grid.getSelectionModel().getSelection();if (selection.length > 0) {Ext.Array.each(selection, function (record) { if (record.phantom) { // Directly remove newly inserted rows store.remove(record); } else { // Flag existing rows as deleted record.set('flagDeleted', true); }});
2024.12.18