Coverage Report - org.kuali.student.lum.lu.ui.course.client.views.CurriculumHomeView
 
Classes in this File Line Coverage Branch Coverage Complexity
CurriculumHomeView
0%
0/11
N/A
1.25
CurriculumHomeView$1
0%
0/5
N/A
1.25
 
 1  
 package org.kuali.student.lum.lu.ui.course.client.views;
 2  
 
 3  
 import org.kuali.student.common.assembly.data.Metadata;
 4  
 import org.kuali.student.common.ui.client.application.KSAsyncCallback;
 5  
 import org.kuali.student.common.ui.client.mvc.Controller;
 6  
 import org.kuali.student.common.ui.client.mvc.ViewComposite;
 7  
 import org.kuali.student.common.ui.client.service.MetadataRpcService;
 8  
 import org.kuali.student.common.ui.client.service.MetadataRpcServiceAsync;
 9  
 import org.kuali.student.common.ui.client.widgets.field.layout.element.SpanPanel;
 10  
 import org.kuali.student.lum.lu.ui.course.client.service.CreditCourseProposalRpcService;
 11  
 import org.kuali.student.lum.lu.ui.course.client.service.CreditCourseProposalRpcServiceAsync;
 12  
 import org.kuali.student.lum.lu.ui.main.client.configuration.CurriculumHomeConfigurer;
 13  
 
 14  
 import com.google.gwt.core.client.GWT;
 15  
 
 16  
 /**
 17  
  * CurriculumHomeView for the Curriculum Management landing page.  This view uses a configurer to set up its
 18  
  * layout (CurriculumHomeConfigurer).
 19  
  * 
 20  
  * @author Kuali Student Team
 21  
  * @see CurriculumHomeConfigurer
 22  
  */
 23  0
 public class CurriculumHomeView extends ViewComposite{
 24  
         
 25  0
         private final SpanPanel container = new SpanPanel();
 26  0
         MetadataRpcServiceAsync metadataServiceAsync = GWT.create(MetadataRpcService.class);
 27  0
         CreditCourseProposalRpcServiceAsync cluProposalRpcServiceAsync = GWT.create(CreditCourseProposalRpcService.class);
 28  0
         CurriculumHomeConfigurer configurer = GWT.create(CurriculumHomeConfigurer.class);
 29  
         
 30  
         public CurriculumHomeView(Controller controller, Enum<?> viewType) {
 31  0
                 super(controller, "", viewType);
 32  0
                 this.initWidget(container);
 33  0
                 setup();
 34  0
         }
 35  
 
 36  
         protected void setup(){
 37  0
         metadataServiceAsync.getMetadata("search", null, null, new KSAsyncCallback<Metadata>() {
 38  
             @Override
 39  
             public void handleFailure(Throwable caught) {
 40  0
                     container.add(configurer.configure(null));
 41  
 //                                     KSErrorDialog.show (caught);
 42  0
                 throw new RuntimeException("Could not retreive metadata: " + caught.getMessage(), caught);
 43  
             }
 44  
             @Override
 45  
             public void onSuccess(Metadata metadata) {
 46  
 //                                   KSErrorDialog.show (new NullPointerException
 47  
 //              ("metadata."
 48  
 //             + formatMetadata (metadata, "search")));
 49  0
                     container.add(configurer.configure(metadata));
 50  0
             }
 51  
         });       
 52  0
         }
 53  
         
 54  
 
 55  
 }