Subversion Repositories SmartDukaan

Rev

Rev 4440 | Rev 4957 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4440 Rev 4762
Line 177... Line 177...
177
        db.setText("Master Sheet Download");
177
        db.setText("Master Sheet Download");
178
        
178
        
179
        final Label categoryLabel = new Label("Category");
179
        final Label categoryLabel = new Label("Category");
180
        vp.add(categoryLabel);
180
        vp.add(categoryLabel);
181
        
181
        
182
        final RadioButton handsetsRB = new RadioButton("vendorCategory", "Handsets");
182
        final RadioButton handsetsRB = new RadioButton("Category", "Handsets");
183
        final RadioButton accRB = new RadioButton("vendorCategory", "Accessories");
183
        final RadioButton accRB = new RadioButton("Category", "Accessories");
184
        handsetsRB.setValue(true);
184
        handsetsRB.setValue(true);
185
        
185
        
186
        HorizontalPanel hpRB = new HorizontalPanel();
186
        HorizontalPanel hpRB = new HorizontalPanel();
187
        hpRB.add(handsetsRB);
187
        hpRB.add(handsetsRB);
188
        hpRB.add(accRB);
188
        hpRB.add(accRB);
Line 209... Line 209...
209
        
209
        
210
        db.add(vp);
210
        db.add(vp);
211
        submitButton.addClickHandler(new ClickHandler() {
211
        submitButton.addClickHandler(new ClickHandler() {
212
            @Override
212
            @Override
213
            public void onClick(ClickEvent event) {
213
            public void onClick(ClickEvent event) {
214
                String vendorCategory;
214
                String Category;
215
                if(handsetsRB.getValue()) {
215
                if(handsetsRB.getValue()) {
216
                    vendorCategory = "Handsets";
216
                    Category = "Handsets";
217
                } else {
217
                } else {
218
                    vendorCategory = "Accessories";
218
                    Category = "Accessories";
219
                }
219
                }
220
                
220
                
221
                long vendorId = Utils.getVendorId(vendor.getItemText(vendor.getSelectedIndex()));
221
                long vendorId = Utils.getVendorId(vendor.getItemText(vendor.getSelectedIndex()));
222
                
222
                
223
                // Servlet mapping mastersheet/download is mapped to in.shop2020.catalog.dashboard.server.FileDownloadServlet
223
                // Servlet mapping mastersheet/download is mapped to in.shop2020.catalog.dashboard.server.FileDownloadServlet
224
                String link = GWT.getHostPageBaseURL() + "mastersheet/download?vendorCategory=" + vendorCategory + "&vendorId=" + vendorId;
224
                String link = GWT.getHostPageBaseURL() + "mastersheet/download?Category=" + Category + "&vendorId=" + vendorId;
225
                Window.open(link, "_self", "Master Sheet Download");
225
                Window.open(link, "_self", "Master Sheet Download");
226
                db.hide();
226
                db.hide();
227
            }
227
            }
228
        });
228
        });
229
        cancelButton.addClickHandler(new ClickHandler() {
229
        cancelButton.addClickHandler(new ClickHandler() {