Hello,
I would like to create a window with an grid, then when i click on this grid. A new popup windows shoud be displayed with another grid.
But i have some problems with ColumnModel component.
this is my souces :
ui.xml :
Code:
<!-- popup -->
<gxt:Window ui:field="clientPopup" modal="true"
title="{constants.vueSommaireLabel}">
<container:BorderLayoutContainer
ui:field="popupLayoutContainer" borders="true">
<gxt:ContentPanel headerVisible="false">
<container:VerticalLayoutContainer
borders="false">
<container:child layoutData="{middleData}">
<grid:Grid ui:field="resultatVueSommaire" />
</container:child>
</container:VerticalLayoutContainer>
</gxt:ContentPanel>
</container:BorderLayoutContainer>
</gxt:Window>
<!-- main window -->
<container:BorderLayoutContainer
ui:field="borderLayoutContainer" borders="true">
<container:north layoutData="{northData}">
<gxt:ContentPanel>
<container:HorizontalLayoutContainer>
.......
........
<container:center layoutData="{centerData}">
<gxt:ContentPanel headerVisible="false">
<container:VerticalLayoutContainer
borders="false">
<container:child layoutData="{middleData}">
<grid:Grid ui:field="resultatRecherche" />
</container:child>
<container:child layoutData="{childLayoutData}">
<container:SimpleContainer>
<button:ButtonBar>
<gxt:Status ui:field="nbRow" width="150" />
<toolbar:FillToolItem />
<button:TextButton text="{constants.vueSommaireLabel}"
ui:field="vueSommaireButton" />
</button:ButtonBar>
</container:SimpleContainer>
</container:child>
</container:VerticalLayoutContainer>
</gxt:ContentPanel>
</container:center>
</container:BorderLayoutContainer>
</container:SimpleContainer>
Then on my view.java :
Code:
@UiFactory
ColumnModel<RechercheOperationDossierDto> createOperationColumnModel() {
return this.rechercheOperationColumnModel;
}
@UiFactory
ListStore<RechercheOperationDossierDto> createOperationListStore() {
return this.rechercheOperationStore;
}
private void ui() {
// creation de la table de resultats
this.rechercheOperationStore = new ListStore<RechercheOperationDossierDto>(this.rechercheActionRequeteProperties.key());
ColumnConfig<RechercheOperationDossierDto, String> operationColumn = new ColumnConfig<RechercheOperationDossierDto, String>(this.rechercheActionRequeteProperties.nom(), 230,
CONSTANTS.operationLabel());
.../...
columnsList.add(operationColumn);
.../...
this.rechercheOperationColumnModel = new ColumnModel<RechercheOperationDossierDto>(columnsList);
// creation de la table opération
this.resultatRecherche = new Grid<RechercheOperationDossierDto>(this.rechercheOperationStore, this.rechercheOperationColumnModel);
this.resultatRecherche.getView().setStripeRows(true);
this.resultatRecherche.getView().setColumnLines(true);
// creation de la table vueSommaire
this.resultatVueSommaire = new Grid(rechercheOperationStore, rechercheOperationColumnModel);
}
.../...
@UiHandler({ "vueSommaireButton" })
public void onSelectionVueSommaireBouton(final SelectEvent event) {
clientPopup.show();
}
I would like to create another ColumnModel to attach my resultatVueSommaire grid. But i dont know how can i made this operation.
Maybe my popup must be loaded in another view.
thanks.