Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Reg how to refresh a view??

Hi,

      I am working on an application where I need to remove few controls when I am clicking on a button.i am able to delete the data from Database but I am unable to refresh the view. ie the view is not reflecting the changes when we are trying to refresh. I am giving the code that I am using.just please see to it & reply as soon as possible.

 

public void createPartControl(Composite parent) {

                       // TODO Auto-generated method stub

                        container=new Composite(parent,SWT.NONE);

 

                          button_1 = new Button(container, SWT.NONE);

                       button_1.setText("button");

                       button_1.setBounds(230, 135, 120, 30);

                       System.out.println("In Create Part Control");

                       final Button removeButton = new Button(container, SWT.NONE);

                       removeButton.addSelectionListener(new SelectionAdapter() {

                                   public void widgetSelected(final SelectionEvent e) {

//                                             button_1.setText("first");

//                                             Workbench wb = (Workbench) PlatformUI.getWorkbench();

//                                             IWorkbenchPage wbPage = wb.getActiveWorkbenchWindow().getActivePage();

                                               try {

                                                           System.out.println("inside Try");

                                                           IPageLayout layout=null;

                                                           System.out.println("inside Try2....");

                                                           layout.addStandaloneView("RealEstateAgent.RemoveTrial",false, IPageLayout.TOP, 0.95f, layout.getEditorArea());

                                                           System.out.println("After Calling view");

                                                           container.layout();

                                   //wbPage.setPerspective("RealEstateAgent.MyPerspective");

                                              //wbPage.showView("RealEstateAgent.RemoveTrial",null,IWorkbenchPage.VIEW_VISIBLE);

                                  

                                               System.out.println("Inside function call");

                                   } catch (Exception p)

                                               {

                                               // TODO Auto-generated catch block

                                               p.printStackTrace();

                                               }

                                   }

                      

                       });

                      

                       removeButton.setText("Remove");

                       removeButton.setBounds(45, 180, 120, 30);

 

                      

           }

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..


Back to the top