hie anyone on this plz
Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Thu, Jul 8, 2010 at 1:13 PM, Vik <[email protected]> wrote: > Hie > > I have a code to launch a gwt popup using a gwt button. This code only > works in local eclipse env and does not work after uploading to GAE (i mean > popup doesnt show up on GAE). > > Please advise whats wrong here. I dont see any stack trace or error message > anywhere. Here is the code: > > T*his code actually passes the data to renders a flex table in which one > of the column is a button.* > > @Override > public void onSuccess(List<FindBloodDonorResultBean> result) { > if(result.size() == 0){ > CommonUi.showServerMsgPopup("Sorry no blood donor available as per your > search criteria."); > }else{ > FindDonorPublicTable table = new FindDonorPublicTable(); > List<String> header = Arrays.asList("City","Area", "Donors Available", "POC > Details"); > FlexTable data = table.setInput(header, result, > countryName.getText().toLowerCase(), > stateList.getValue(stateList.getSelectedIndex()).toLowerCase(), > disttList.getValue(disttList.getSelectedIndex()).toLowerCase()); > resultPanel.clear(); > resultPanel.add(data); > } > }}); > > This code actually renders the flex table having a column with a button. On > clicking it the popup should invoke: > > package vik.sakshum.sakshumweb.client.common.ui; > > public class FindDonorPublicTable extends FlexTable{ > private String country; > private String state; > private String district; > public FindDonorPublicTable() { > super(); > } > PocInfoTable pocInfoTable; > private class PocInfoTable extends FlexTable{ > public PocInfoTable() { > super(); > } > public void setHeader(List<String> header){ > int row = 0; > if (header != null) { > int i = 0; > for (String string : header) { > this.setText(row, i, string); > i++; > } > row++; > } > } > public void setInput(List<String> header, List<PocProfileBean> rows) { > setHeader(header); > int i = 1; > for (PocProfileBean row : rows) { > this.setText(i, 0, row.getFirstName()); > this.setText(i, 1, row.getLastName()); > this.setText(i, 2, row.getEmailId()); > this.setText(i, 3, row.getCellNumber()); > this.setText(i, 4, row.getOfficeNumber()); > AddressBean addBean = row.getAddressBean(); > this.setText(i, 5, addBean.getPinCode()); > this.setText(i, 6, addBean.getCity()); > this.setText(i, 7, addBean.getDistrict()); > this.setText(i, 8, addBean.getState()); > i++; > } > } > }//end class PocInfoTable > POCPopup pocPopup; > private class POCPopup extends PopupPanel { > private final FindBloodDonorServiceAsync findPOCService = GWT > .create(FindBloodDonorService.class); > public POCPopup(String city, String area) { > super(true); > this.setTitle("Point of Contact Details"); > > VerticalPanel mainPanel = new VerticalPanel(); > mainPanel.setSpacing(10); > mainPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER); > Label titleText = new Label("Point of Contacts"); > Label infoText = new Label("Please note that below are *not* the > actual blood donors. You need to call any of these people to get the > information about available blood donors as per your searched criteria. We > are not providing the personal information of blood donors to protect the > information abuse."); > > mainPanel.add(titleText); > mainPanel.add(infoText); > mainPanel.add(pocInfoTable); > setWidget(mainPanel); > } > } > > public void setHeader(List<String> header){ > int row = 0; > if (header != null) { > int i = 0; > for (String string : header) { > this.setText(row, i, string); > i++; > } > row++; > } > // Make the table header look nicer > this.getRowFormatter().addStyleName(0, "sakth"); > } > public FindDonorPublicTable setInput(List<String> header, > final List<FindBloodDonorResultBean> rows, String country, > String state, String district) { > this.country = country; > this.state = state; > this.district = district; > final FindDonorPublicTable tableHandle= this; > setHeader(header); > int i = 1; > for (FindBloodDonorResultBean row : rows) { > this.setText(i, 0, row.getCity()); > this.setText(i, 1, row.getArea()); > this.setText(i, 2, row.getDonorCount()); > Button pocBtn = new Button("Get Point Of Contact"); > this.setWidget(i, 3, pocBtn); > pocBtn.addClickHandler(new ClickHandler(){ > > @Override > public void onClick(ClickEvent event) { > pocPopup = new POCPopup("bhiwani","bhiwani"); > System.out.println("launching poc info pop"); > pocPopup.show(); > }}); > this.getCellFormatter().addStyleName(i, 0, "sakbodytd"); > this.getCellFormatter().addStyleName(i, 1, "sakbodytd"); > this.getCellFormatter().addStyleName(i, 2, "sakbodytd"); > this.getCellFormatter().addStyleName(i, 3, "sakbodytd"); > if(i%2 == 0) > this.getRowFormatter().addStyleName(i, "saktr-even"); > else > this.getRowFormatter().addStyleName(i, "saktr-odd"); > i++; > } > return this; > } > } > > > > Thankx and Regards > > Vik > Founder > www.sakshum.com > www.sakshum.blogspot.com > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
