Next we add our PodLoader class to our loaders package remembering to reference the new codetable value we created in the PodType codetable when we construct our new Pod using the PodBuilder.
001 package pods.podloaders; 002 003 import java.util.Map; 004 import org.w3c.dom.Document; 005 import org.w3c.dom.Node; 006 import curam.cefwidgets.docbuilder.impl.PodBuilder; 007 import curam.cefwidgets.pods.pod.impl.PodLoader; 008 import curam.codetable.PODTYPE; 009 010 public class MyFavouriteMovies extends PodLoader { 011 012 @Override 013 public Node createPod(Document document, Map<String,Object> contexts) { 014 try{ 015 PodBuilder moviesPod = 016 PodBuilder.newPod(document, PODTYPE.MYFAVMOVIES); 017 moviesPod.setTitle("My Favourite Movies"); 018 return moviesPod.getWidgetRootNode(); 019 }catch(Exception e){ 020 throw new RuntimeException(e); 021 } 022 } 023 }
Log into the Administrator application and add the new Pod to the Pod-Container in the same way we did in the previous chapter.
Open the Pod page and ensure that our Pod is visible.