1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    2
    Vote Rating
    0
    vince3124 is on a distinguished road

      0  

    Default Create popup with new Grid

    Create popup with new Grid


    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.

  2. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Default


    I'm not familiar w/ UiBinder, but are you wanting to display a popup dialog when the user clicks anywhere in the grid, or when the user clicks on a cell in a specific column in the grid?

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Posts
    2
    Vote Rating
    0
    vince3124 is on a distinguished road

      0  

    Default


    There is no problem with the click action. For information the popup must be opened when usr click anyware in the grid. Or in a separated button.

Thread Participants: 1