Coverage Report - org.kuali.student.lum.lu.ui.course.client.controllers.ViewCourseController
 
Classes in this File Line Coverage Branch Coverage Complexity
ViewCourseController
0%
0/133
0%
0/38
1.696
ViewCourseController$1
0%
0/6
0%
0/2
1.696
ViewCourseController$1$1
0%
0/8
0%
0/6
1.696
ViewCourseController$10
0%
0/3
N/A
1.696
ViewCourseController$2
0%
0/6
0%
0/2
1.696
ViewCourseController$3
0%
0/9
N/A
1.696
ViewCourseController$4
0%
0/15
0%
0/10
1.696
ViewCourseController$5
0%
0/12
N/A
1.696
ViewCourseController$5$1
0%
0/4
0%
0/2
1.696
ViewCourseController$6
0%
0/12
N/A
1.696
ViewCourseController$7
0%
0/5
0%
0/2
1.696
ViewCourseController$8
0%
0/3
N/A
1.696
ViewCourseController$9
0%
0/3
N/A
1.696
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.lum.lu.ui.course.client.controllers;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 
 21  
 import org.kuali.student.common.assembly.data.Data;
 22  
 import org.kuali.student.common.assembly.data.Metadata;
 23  
 import org.kuali.student.common.dto.DtoConstants;
 24  
 import org.kuali.student.common.rice.authorization.PermissionType;
 25  
 import org.kuali.student.common.ui.client.application.Application;
 26  
 import org.kuali.student.common.ui.client.application.KSAsyncCallback;
 27  
 import org.kuali.student.common.ui.client.application.ViewContext;
 28  
 import org.kuali.student.common.ui.client.configurable.mvc.layouts.DocumentLayoutController;
 29  
 import org.kuali.student.common.ui.client.configurable.mvc.layouts.TabMenuController;
 30  
 import org.kuali.student.common.ui.client.mvc.Callback;
 31  
 import org.kuali.student.common.ui.client.mvc.DataModel;
 32  
 import org.kuali.student.common.ui.client.mvc.DataModelDefinition;
 33  
 import org.kuali.student.common.ui.client.mvc.ModelProvider;
 34  
 import org.kuali.student.common.ui.client.mvc.ModelRequestCallback;
 35  
 import org.kuali.student.common.ui.client.mvc.WorkQueue;
 36  
 import org.kuali.student.common.ui.client.mvc.WorkQueue.WorkItem;
 37  
 import org.kuali.student.common.ui.client.mvc.dto.ReferenceModel;
 38  
 import org.kuali.student.common.ui.client.util.ExportElement;
 39  
 import org.kuali.student.common.ui.client.util.ExportUtils;
 40  
 import org.kuali.student.common.ui.client.util.WindowTitleUtils;
 41  
 import org.kuali.student.common.ui.client.widgets.KSButton;
 42  
 import org.kuali.student.common.ui.client.widgets.KSButtonAbstract.ButtonStyle;
 43  
 import org.kuali.student.common.ui.client.widgets.KSLabel;
 44  
 import org.kuali.student.common.ui.client.widgets.KSLightBox;
 45  
 import org.kuali.student.common.ui.client.widgets.field.layout.layouts.VerticalFieldLayout;
 46  
 import org.kuali.student.common.ui.client.widgets.notification.KSNotification;
 47  
 import org.kuali.student.common.ui.client.widgets.notification.KSNotifier;
 48  
 import org.kuali.student.common.ui.client.widgets.progress.BlockingTask;
 49  
 import org.kuali.student.common.ui.client.widgets.progress.KSBlockingProgressIndicator;
 50  
 import org.kuali.student.common.ui.client.widgets.table.summary.SummaryTableSection;
 51  
 import org.kuali.student.common.ui.shared.IdAttributes.IdType;
 52  
 import org.kuali.student.core.statement.dto.StatementTypeInfo;
 53  
 import org.kuali.student.lum.common.client.helpers.RecentlyViewedHelper;
 54  
 import org.kuali.student.lum.lu.ui.course.client.configuration.CourseProposalConfigurer;
 55  
 import org.kuali.student.lum.lu.ui.course.client.configuration.ViewCourseConfigurer;
 56  
 import org.kuali.student.lum.lu.ui.course.client.configuration.ViewCourseConfigurer.ViewCourseSections;
 57  
 import org.kuali.student.lum.lu.ui.course.client.requirements.CourseRequirementsDataModel;
 58  
 import org.kuali.student.lum.lu.ui.course.client.requirements.HasRequirements;
 59  
 import org.kuali.student.lum.lu.ui.course.client.service.CourseRpcService;
 60  
 import org.kuali.student.lum.lu.ui.course.client.service.CourseRpcServiceAsync;
 61  
 import org.kuali.student.lum.lu.ui.course.client.widgets.CourseWorkflowActionList;
 62  
 
 63  
 import com.google.gwt.core.client.GWT;
 64  
 import com.google.gwt.event.dom.client.ClickEvent;
 65  
 import com.google.gwt.event.dom.client.ClickHandler;
 66  
 import com.google.gwt.event.logical.shared.CloseEvent;
 67  
 import com.google.gwt.event.logical.shared.CloseHandler;
 68  
 import com.google.gwt.user.client.Window;
 69  
 import com.google.gwt.user.client.ui.ComplexPanel;
 70  
 import com.google.gwt.user.client.ui.Widget;
 71  
 
 72  
 /**
 73  
  * This is a description of what this class does - Will Gomes don't forget to fill this in. 
 74  
  * 
 75  
  * @author Kuali Student Team
 76  
  *
 77  
  */
 78  0
 public class ViewCourseController extends TabMenuController implements DocumentLayoutController, HasRequirements{
 79  0
     private final DataModel cluModel = new DataModel(); 
 80  
    
 81  
     private WorkQueue modelRequestQueue;
 82  
 
 83  0
     private String cluType = "kuali.lu.type.CreditCourse";
 84  0
     private String courseId = null;
 85  
     
 86  
     private static final String CLU_STATE = DtoConstants.STATE_ACTIVE;
 87  
     private static final String MSG_GROUP = "course";
 88  
     
 89  0
     private final String REFERENCE_TYPE = "referenceType.clu";
 90  0
     private boolean initialized = false;
 91  0
     CourseRpcServiceAsync rpcServiceAsync = GWT.create(CourseRpcService.class);
 92  
     
 93  0
         private final BlockingTask loadDataTask = new BlockingTask("Retrieving Data....");
 94  0
         private final BlockingTask initTask = new BlockingTask("Initializing....");
 95  0
         private final KSLabel statusLabel = new KSLabel("");
 96  
         
 97  0
         private final List<CourseWorkflowActionList> actionDropDownWidgets = new ArrayList<CourseWorkflowActionList>();
 98  
 
 99  
     private final CourseRequirementsDataModel reqDataModel;
 100  
     
 101  0
     final ViewCourseConfigurer cfg = GWT.create(ViewCourseConfigurer.class);
 102  
                     
 103  
     public ViewCourseController(Enum<?> viewType){
 104  0
             super(CourseProposalController.class.getName());
 105  0
         initialize();
 106  0
         addStyleName("courseView");
 107  0
         reqDataModel = new CourseRequirementsDataModel(this);
 108  0
         this.tabPanel.addStyleName("standard-content-padding");
 109  0
         this.setViewEnum(viewType);
 110  0
     }
 111  
     
 112  
     @Override
 113  
     public void setViewContext(ViewContext viewContext) {
 114  0
             super.setViewContext(viewContext);
 115  0
             if(viewContext.getId() != null && !viewContext.getId().isEmpty()){
 116  0
                     viewContext.setPermissionType(PermissionType.OPEN);
 117  0
                     this.setCourseId(viewContext.getId());
 118  
             }
 119  0
     }
 120  
     
 121  
     private void initialize() {
 122  0
         super.setDefaultModelId(CourseProposalConfigurer.COURSE_PROPOSAL_MODEL);
 123  0
         super.registerModel(CourseProposalConfigurer.COURSE_PROPOSAL_MODEL, new ModelProvider<DataModel>() {
 124  
 
 125  
             @Override
 126  
             public void requestModel(final ModelRequestCallback<DataModel> callback) {
 127  0
                 if (modelRequestQueue == null){
 128  0
                     modelRequestQueue = new WorkQueue();
 129  
                 }
 130  
 
 131  0
                 WorkItem workItem = new WorkItem(){
 132  
                     @Override
 133  
                     public void exec(Callback<Boolean> workCompleteCallback) {
 134  0
                         if (cluModel.getRoot() == null || cluModel.getRoot().size() == 0){
 135  0
                             if (courseId != null){
 136  0
                                 getCourseFromCluId(callback, workCompleteCallback);
 137  
                             } else{
 138  0
                                 createNewCluModel(callback, workCompleteCallback);
 139  
                             }                
 140  
                         } else {
 141  0
                             callback.onModelReady(cluModel);
 142  0
                             workCompleteCallback.exec(true);
 143  
                         }
 144  0
                     }               
 145  
                 };
 146  0
                 modelRequestQueue.submit(workItem);
 147  
                 
 148  0
             }
 149  
             
 150  
         });
 151  
         
 152  
             
 153  0
     }
 154  
     
 155  
      
 156  
     public Widget generateActionDropDown(){                            
 157  0
             CourseWorkflowActionList actionList = new CourseWorkflowActionList(this.getMessage("cluActionsLabel"), getViewContext(), "/HOME/CURRICULUM_HOME/COURSE_PROPOSAL", cluModel, new Callback<String>() {
 158  
                     @Override
 159  
                     public void exec(String newState) {
 160  0
                             if (newState != null) {
 161  0
                     KSNotifier.add(new KSNotification(getMessage("cluStateChangeNotification" + newState), false, 5000));
 162  
                     // FIXME: this is not updating the cluModel so state will not be updated in the model.  May not be a problem.
 163  0
                             statusLabel.setText("Course Status: " + newState);
 164  
                             } else {
 165  0
                     KSNotifier.add(new KSNotification(getMessage("cluStateChangeFailedNotification"), false, 5000));
 166  
                             }
 167  0
                     }
 168  
             });
 169  0
         actionDropDownWidgets.add(actionList);
 170  
         
 171  0
             return actionList;
 172  
     }
 173  
    
 174  
     private void init(final Callback<Boolean> onReadyCallback) {
 175  
 
 176  0
         if (initialized) {
 177  0
             onReadyCallback.exec(true);
 178  
         } else {
 179  0
                 KSBlockingProgressIndicator.addTask(initTask);
 180  0
                 this.setContentTitle("View Course");
 181  0
                     this.setName("Course");
 182  0
                     String idType = null;
 183  0
                     String viewContextId = null;
 184  
                     // The switch was added due to the way permissions currently work.
 185  
                     // For a new Create Course Proposal or Modify Course we send nulls so that permissions are not checked.
 186  0
                     if(getViewContext().getIdType() != null){
 187  0
                 idType = getViewContext().getIdType().toString();
 188  0
                 viewContextId = getViewContext().getId();
 189  0
                 if(getViewContext().getIdType()==IdType.COPY_OF_OBJECT_ID){
 190  0
                         viewContextId = null;
 191  
                 }
 192  
 
 193  
                     }
 194  
                     
 195  0
                 rpcServiceAsync.getMetadata("", null, new KSAsyncCallback<Metadata>(){
 196  
 
 197  
                         @Override
 198  
                 public void handleFailure(Throwable caught) {
 199  0
                                 initialized = false;
 200  0
                         onReadyCallback.exec(false);
 201  0
                         KSBlockingProgressIndicator.removeTask(initTask);
 202  0
                     throw new RuntimeException("Failed to get model definition.", caught);
 203  
                 }
 204  
 
 205  
                 public void onSuccess(Metadata result) {
 206  0
                         DataModelDefinition def = new DataModelDefinition(result);
 207  0
                     cluModel.setDefinition(def);
 208  0
                     init(def, onReadyCallback);
 209  0
                 }
 210  
                   });
 211  
             
 212  
         }
 213  0
     }
 214  
 
 215  
     private void updateCourseActionItems() {
 216  
             
 217  0
                 for(CourseWorkflowActionList widget: actionDropDownWidgets){
 218  0
                         widget.updateCourseActionItems(cluModel);
 219  
                 }
 220  0
     }
 221  
 
 222  
     private void init(final DataModelDefinition modelDefinition, final Callback<Boolean> onReadyCallback){
 223  
 
 224  0
         CourseRequirementsDataModel.getStatementTypes(new Callback<List<StatementTypeInfo>>() {
 225  
 
 226  
             @Override
 227  
             public void exec(List<StatementTypeInfo> stmtTypes) {
 228  0
                 List<StatementTypeInfo> stmtTypesOut = new ArrayList<StatementTypeInfo>();
 229  0
                 if (stmtTypes != null) {
 230  0
                     for (StatementTypeInfo stmtType : stmtTypes) {
 231  0
                         if (stmtType.getId().contains("kuali.statement.type.course.enrollmentEligibility") ||
 232  
                             stmtType.getId().contains("kuali.statement.type.course.creditConstraints")) {
 233  0
                             continue;
 234  
                         }
 235  0
                         stmtTypesOut.add(stmtType);
 236  
                     }
 237  
                 }
 238  0
                 if(!initialized){
 239  0
                         initialized = true;
 240  0
                         cfg.setStatementTypes(stmtTypesOut);
 241  0
                         cfg.setModelDefinition(modelDefinition);
 242  0
                         cfg.generateLayout(ViewCourseController.this);
 243  
                 }
 244  0
                 onReadyCallback.exec(true);
 245  0
                 KSBlockingProgressIndicator.removeTask(initTask);
 246  0
             }
 247  
         });
 248  0
     }
 249  
     
 250  
     @SuppressWarnings("unchecked")
 251  
     @Override
 252  
     public void requestModel(Class modelType, final ModelRequestCallback callback) {
 253  0
         if(modelType == ReferenceModel.class){
 254  0
             if (cluModel != null){
 255  0
                 ReferenceModel ref = new ReferenceModel();
 256  
 
 257  0
                 if(cluModel.get("course/id") != null){
 258  0
                     ref.setReferenceId((String)cluModel.get("course/id"));
 259  
                 } else{
 260  0
                     ref.setReferenceId(null);
 261  
                 }
 262  
                 
 263  0
                 ref.setReferenceTypeKey(REFERENCE_TYPE);
 264  0
                 ref.setReferenceType(cluType);
 265  0
                 ref.setReferenceState(CLU_STATE);
 266  
                 
 267  0
                 callback.onModelReady(ref);
 268  0
             }
 269  0
         }else if (modelType == Data.class){
 270  0
             requestModel(CourseProposalConfigurer.COURSE_PROPOSAL_MODEL, callback);
 271  
         } else {
 272  0
             super.requestModel(modelType, callback);
 273  
         }
 274  0
     }
 275  
        
 276  
     @SuppressWarnings("unchecked")    
 277  
     private void getCourseFromCluId(final ModelRequestCallback callback, final Callback<Boolean> workCompleteCallback){
 278  0
             KSBlockingProgressIndicator.addTask(loadDataTask);
 279  
 
 280  0
         rpcServiceAsync.getData(courseId, new KSAsyncCallback<Data>(){
 281  
 
 282  
             @Override
 283  
             public void handleFailure(Throwable caught) {
 284  0
                 Window.alert("Error loading Course: "+caught.getMessage());
 285  0
                 createNewCluModel(callback, workCompleteCallback);
 286  0
                 KSBlockingProgressIndicator.removeTask(loadDataTask);
 287  0
             }
 288  
 
 289  
             @Override
 290  
             public void onSuccess(Data result) {
 291  0
                 cluModel.setRoot(result);
 292  
                 //getContainer().setTitle(getSectionTitle());
 293  0
                 setHeaderTitle();
 294  0
                 updateCourseActionItems();
 295  0
                 callback.onModelReady(cluModel);
 296  0
                 workCompleteCallback.exec(true);
 297  0
                 reqDataModel.retrieveStatementTypes(cluModel.<String>get("id"), new Callback<Boolean>() {
 298  
                     @Override
 299  
                     public void exec(Boolean result) {
 300  0
                         if (result) {
 301  0
                             KSBlockingProgressIndicator.removeTask(loadDataTask);
 302  
                         }
 303  0
                     }
 304  
                 });
 305  
 
 306  0
             }
 307  
 
 308  
         });
 309  0
     }
 310  
     
 311  
     @SuppressWarnings("unchecked")
 312  
     private void getCurrentVersion(final ModelRequestCallback callback, final Callback<Boolean> workCompleteCallback) {
 313  0
             rpcServiceAsync.getData(courseId, new KSAsyncCallback<Data>(){
 314  
 
 315  
             @Override
 316  
             public void handleFailure(Throwable caught) {
 317  0
                 Window.alert("Error loading Course: "+caught.getMessage());
 318  0
                 createNewCluModel(callback, workCompleteCallback);
 319  0
                 KSBlockingProgressIndicator.removeTask(loadDataTask);
 320  0
             }
 321  
 
 322  
             @Override
 323  
             public void onSuccess(Data result) {
 324  0
                 cluModel.setRoot(result);
 325  
                 //getContainer().setTitle(getSectionTitle());
 326  0
                 setHeaderTitle();
 327  0
                 updateCourseActionItems();
 328  0
                 callback.onModelReady(cluModel);
 329  0
                 workCompleteCallback.exec(true);
 330  0
                 KSBlockingProgressIndicator.removeTask(loadDataTask);
 331  0
             }
 332  
 
 333  
         });
 334  0
     }
 335  
     
 336  
     @SuppressWarnings("unchecked")
 337  
     private void createNewCluModel(final ModelRequestCallback callback, final Callback<Boolean> workCompleteCallback){
 338  0
         cluModel.setRoot(new Data());
 339  0
         callback.onModelReady(cluModel);
 340  0
         workCompleteCallback.exec(true);
 341  0
     }
 342  
 
 343  
     public String getCourseId() {
 344  0
         return courseId;
 345  
     }
 346  
     
 347  
     public String getVersionIndId() {
 348  0
         return (String)cluModel.get("versionInfo/versionIndId");
 349  
     }
 350  
 
 351  
     public void setCourseId(String courseId) {
 352  0
         this.courseId = courseId;
 353  0
         this.cluModel.setRoot(new Data());        
 354  0
     }
 355  
        
 356  
     public void clear(String cluType){
 357  0
         super.clear();
 358  0
         this.cluType = cluType;
 359  0
         if (cluModel != null){
 360  0
             this.cluModel.setRoot(new Data());            
 361  
         }
 362  0
         this.courseId = null;
 363  0
     }    
 364  
     
 365  
     @Override
 366  
     public void showDefaultView(final Callback<Boolean> onReadyCallback) {
 367  0
         init(new Callback<Boolean>() {
 368  
 
 369  
             @Override
 370  
             public void exec(Boolean result) {
 371  0
                 if (result) {
 372  0
                         ViewCourseController.super.showDefaultView(onReadyCallback);
 373  
                 } else {
 374  0
                     onReadyCallback.exec(false);
 375  
                 }
 376  0
             }
 377  
         });
 378  0
     }
 379  
     
 380  
     @Override
 381  
     public void beforeShow(Callback<Boolean> onReadyCallback) {
 382  0
             showDefaultView(onReadyCallback);
 383  0
     }
 384  
     
 385  
     private KSButton getQuitButton(){
 386  0
         return new KSButton("Quit", new ClickHandler(){
 387  
                     public void onClick(ClickEvent event) {
 388  0
                             Application.navigate("/HOME/CURRICULUM_HOME");
 389  0
                     }
 390  
                 });       
 391  
     }
 392  
     
 393  
     
 394  
     protected void setHeaderTitle() {
 395  
                
 396  
             String title; 
 397  0
             if (cluModel.get("transcriptTitle") != null){
 398  0
                     title = getCourseTitle();
 399  
             }
 400  
             else{
 401  0
                     title = "Course";
 402  
             }
 403  
             
 404  0
             updateStatus();
 405  
             
 406  0
             this.setContentTitle(title);
 407  0
             this.setName(title);
 408  0
             WindowTitleUtils.setContextTitle(title);
 409  0
     }
 410  
     
 411  
     private void updateStatus() {
 412  0
             if(cluModel.get("state") != null){
 413  0
             statusLabel.setText(getMessage("courseStatusLabel") + ": " + cluModel.get("state"));
 414  
             }
 415  0
     }
 416  
     
 417  
     private CloseHandler<KSLightBox> createActionSubmitSuccessHandler() {
 418  0
             CloseHandler<KSLightBox> handler = new CloseHandler<KSLightBox>(){
 419  
                         @Override
 420  
                         public void onClose(CloseEvent<KSLightBox> event) {
 421  
                                 //Reload the lum main entrypoint
 422  0
                                 Window.Location.reload();
 423  0
                         }
 424  
             };
 425  0
                 return handler;
 426  
         }
 427  
 
 428  
     public String getMessage(String courseMessageKey) {
 429  0
             String msg = Application.getApplicationContext().getMessage(MSG_GROUP, courseMessageKey);
 430  0
             if (msg == null) {
 431  0
                     msg = courseMessageKey;
 432  
             }
 433  0
             return msg;
 434  
     }
 435  
     
 436  
         public Widget getStatusLabel() {
 437  0
                 statusLabel.setStyleName("courseStatusLabel");
 438  0
                 return statusLabel;
 439  
         }
 440  
         
 441  
         public Widget getVersionHistoryWidget(){
 442  0
                 KSButton button = new KSButton("Version History", ButtonStyle.DEFAULT_ANCHOR, new ClickHandler(){
 443  
 
 444  
                         @Override
 445  
                         public void onClick(ClickEvent event) {
 446  0
                                 parentController.showView(ViewCourseParentController.Views.VERSIONS);
 447  0
                         }
 448  
                 });
 449  0
                 button.addStyleName("versionHistoryLink");
 450  0
                 return button;
 451  
                 
 452  
         }
 453  
         
 454  
         @Override
 455  
         public void onHistoryEvent(String historyStack) {
 456  0
                 super.onHistoryEvent(historyStack);
 457  0
                 if (cluModel.get("courseTitle") != null){
 458  0
                         RecentlyViewedHelper.addCurrentDocument(getCourseTitle());
 459  
                 }
 460  0
         }
 461  
         
 462  
         public String getCourseTitle(){
 463  0
                 return cluModel.get("courseTitle");
 464  
         }
 465  
 
 466  
         // this is misleading given the current version concept.  This just gets the id of the course
 467  
         public String getCurrentId() {
 468  0
                 return cluModel.get("id");
 469  
         }
 470  
 
 471  
     @Override
 472  
     public CourseRequirementsDataModel getReqDataModel() {
 473  0
         return reqDataModel;
 474  
     }
 475  
     
 476  
     @Override
 477  
     public DataModel getExportDataModel() {
 478  0
         return cluModel;
 479  
     }
 480  
     
 481  
     @Override
 482  
     public boolean isExportButtonActive() {
 483  0
         return true;
 484  
     }
 485  
     
 486  
     @Override
 487  
     public List<ExportElement> getExportElementsFromView() {
 488  0
         List<ExportElement> exportElements = new ArrayList<ExportElement>();
 489  0
         ExportElement heading = new ExportElement();
 490  0
         heading.setFieldLabel("");
 491  0
         heading.setFieldValue(this.tabPanel.getSelectedTabName());
 492  0
         exportElements.add(heading);
 493  0
         if (this.getCurrentViewEnum() != null) { 
 494  0
             if (this.getCurrentViewEnum().equals(ViewCourseSections.DETAILED)) {
 495  0
                 exportElements.addAll(ExportUtils.getDetailsForWidget(this.tabPanel.getSelectedTab(), "", "").get(0).getSubset());
 496  0
             } else if (this.getCurrentViewEnum().equals(ViewCourseSections.BRIEF)){
 497  0
                 exportElements.addAll(ExportUtils.getDetailsForWidget(this.tabPanel.getSelectedTab(), "", "").get(0).getSubset());
 498  0
             } else if (this.getCurrentViewEnum().equals(ViewCourseSections.CATALOG)){
 499  0
                 exportElements.addAll(ExportUtils.getDetailsForWidget(this.tabPanel.getSelectedTab(), "", ""));
 500  
             }
 501  
         }
 502  0
         return exportElements;
 503  
     }
 504  
 }