GXT 3.0.5 (상용 라이센스)를 사용합니다.GridInlineEditing에서의 GXT 이상한 동작
나는 GridInlineEditing
그리드를 만들 때, 나는 크롬에 대한 몇 가지 이상한 버그가있는 경우에만 : setCLicksToEdit(ONE)
으로, 열을 편집 할 수 없습니다
- (에디션의 구성 요소는 다음 나타나는 immediatly 사라)
setCLicksToEdit(TWO)
을 사용하면CheckBox
이 포함 된 열을 제외한 모든 열을 편집 할 수 있습니다.CheckBox
이 표시되지만 클릭하면 버전이 완료되고 값이 업데이트되지 않습니다.public class MyBean { private Integer id; private String label; private Boolean enabled; public MyBean(Integer id, String label, Boolean enabled) { this.id = id; this.label = label; this.enabled = enabled; } //Getters & Setters }
그리고 해당 그리드 :
나는 여러 번이 콩을 표시 그리드와 작은 예제를 만들었습니다. 가능한 한 간단하게 만들었습니다.
public class MyGrid extends Composite {
public interface MyPropertyAccess extends PropertyAccess<MyBean> {
ValueProvider<MyBean, Integer> id();
ValueProvider<MyBean, String> label();
ValueProvider<MyBean, Boolean> enabled();
}
public MyGrid(){
//Build columnModel
MyPropertyAccess propertyAccess = GWT.create(MyPropertyAccess.class);
ColumnConfig<MyBean, Integer> colId = new ColumnConfig<MyBean, Integer>(propertyAccess.id(),500, "ID");
ColumnConfig<MyBean, String> colLabel = new ColumnConfig<MyBean, String>(propertyAccess.label(), 500, "Label");
ColumnConfig<MyBean, Boolean> colEnabled = new ColumnConfig<MyBean, Boolean>(propertyAccess.enabled(), 500, "Enabled");
ColumnModel<MyBean> columnModel = new ColumnModel<MyBean>(Arrays.<ColumnConfig<MyBean,?>>asList(colId, colLabel, colEnabled));
//Create grid
Grid<MyBean> grid = new Grid<MyBean>(new ListStore<MyBean>(buildModelKeyProvider()), columnModel);
//Make it editable
GridInlineEditing<MyBean> inlineEditing = new GridInlineEditing<MyBean>(grid);
inlineEditing.addEditor(colLabel, new TextField());
inlineEditing.addEditor(colEnabled, new CheckBox());
inlineEditing.setClicksToEdit(ClicksToEdit.TWO);
//Fill store with dummy values
for(int i = 1;i<=30;i++){
grid.getStore().add(new MyBean(i, "Bean"+i, i%2==0));
}
this.initWidget(grid);
}
private ModelKeyProvider<MyBean> buildModelKeyProvider(){
return new ModelKeyProvider<MyBean>() {
@Override
public String getKey(MyBean item) {
return Integer.toString(item.getId());
}
};
}
}
GXT에 잘못된 것이 있습니까? 아니면 버그가 있습니까?
주 : 나는 GridRowEditing
(작동)로 GridInlineEditing
을 대체 할 수 있지만,이 사용자가 더 이상 필요에 맞지 않습니다.
주 : 파이어 폭스, 나는 setCLicksToEdit(ONE)
과 같은 문제가 있지만, 모든 setCLicksToEdit(TWO)
내선 JS = GXT. 그들은 완전히 다른 도서관이며, 같은 회사에서 만든 것입니다. –