Package org.cast.isi

Examples of org.cast.isi.ISIXmlComponent


           chapterRepeater.add(rootSectionContainer);
           // Chapter that contains the bookmark is open by default.
           if (rootSection.equals(currentRootSection))
             rootSectionContainer.add(new ClassAttributeModifier("open"));
           rootSectionContainer.add(new Label("chapterTitle", rootSection.getTitle()));
           ISIXmlComponent xml = new ISIXmlComponent("chapterContent", new XmlSectionModel(rootSection), "toc");
           xml.setTransformParameter("sectionToggleLinks", getSectionToggleParameter());
           xml.setTransformParameter("sectionLevel", sectionLevel);
           if (currentPage != null)
             xml.setTransformParameter("current", currentPage.getSectionAncestor().getId());
        rootSectionContainer.add(xml);       
         }
       }
  }
View Full Code Here


      dialogBorder.setLogEvents(false);
    }   
   
    // add the video component with a new transformation - set the xpath param
    // add-video-thumb-link to false - to only show the video portion and not the link
    ISIXmlComponent videoComponent = new ISIXmlComponent("video", mSection, "student");
    String objectValue = ".//dtb:object[@id='" + videoId + "']";
    videoComponent.setTransformParameter("add-video-thumb-link", false);
    videoComponent.setTransformParameter(FilterElements.XPATH, objectValue);   
    add(videoComponent);
 
View Full Code Here

    this.mSection = _mSection;
    this.param = _param;
    add(new Label("pageTitle", ISIApplication.get().getPageTitleBase() + " :: " + (new StringResourceModel("AuthoredPopup.pageTitle", this, null, "Shared Content").getString())));

    // get the content based on the id and the msection
    ISIXmlComponent xmlContent = new ISIXmlComponent("xmlContent", mSection, "student");
    String object = "//*[@id='" + xmlId + "']";
    xmlContent.setTransformParameter(FilterElements.XPATH, object);
    add(xmlContent);
       
    String popupTitle = getPopupTitle();
    add(new ShyLabel("popupTitle", new Model<String>(popupTitle)));
    add(ISIApplication.get().getToolbar("tht", this));
View Full Code Here

  }     

  @Override
  protected XmlComponent newXmlComponent(String id, IModel<? extends IXmlPointer> model) {
    ISIXmlComponent isiXmlComponent = new ISIXmlComponent(id, (XmlSectionModel)model, "glossary");
    isiXmlComponent.setInGlossary(true);
    return isiXmlComponent;
  }
View Full Code Here

    ResponseFeedbackPanel responseFeedbackPanel = new ResponseFeedbackPanel("responseFeedbackPanel");
    add(responseFeedbackPanel);
   
    if (showXmlContent) {
      ISIXmlComponent xmlComponent = makeXmlComponent("xmlContent",  mSection);
      xmlComponent.setContentPage(getPageName());
      xmlComponent.setMiniGlossaryModal(miniGlossaryModal);
      xmlComponent.setResponseFeedbackPanel(responseFeedbackPanel);
      add(xmlComponent);
    } else {
      add (new WebMarkupContainer("xmlContent").setVisible(false));
    }
  }
View Full Code Here

      add (new WebMarkupContainer("xmlContent").setVisible(false));
    }
  }
 
  protected ISIXmlComponent makeXmlComponent (String wicketId, XmlSectionModel model) {
    ISIXmlComponent component = new ISIXmlComponent(wicketId, model, "student");
    component.setTransformParameter("lock-response", isLockResponse(model));
    component.setTransformParameter("delay-feedback", isDelayFeedback(model));
    if (userIsStudent())
      component.setTransformParameter("strip-class", "teacheronly");
    return component;
  }
View Full Code Here

    ISIPrompt prompt = ((ISIPrompt)mPrompt.getObject());
    if (prompt.getType().equals(PromptType.SINGLE_SELECT)) {
      ContentLoc location = prompt.getContentElement().getContentLocObject();
      ISIXmlSection section = location.getSection();
      String xmlId = prompt.getContentElement().getXmlId();
      ISIXmlComponent xml = new ISIXmlComponent("details", new XmlSectionModel(section), "compare-responses");
      xml.setTransformParameter(FilterElements.XPATH, String.format("//dtb:responsegroup[@id='%s']", xmlId));
      xml.setOutputMarkupId(true);
      add (xml);
    } else {
      add (new PeriodResponseListPanel("details", mPrompt));
    }
  }
View Full Code Here

    ICacheableModel<? extends IXmlPointer> xmlPointer = null;
    if (getModelObject() != null)
      xmlPointer = getModelObject().getXmlPointer();

    if (xmlPointer != null) {
      ISIXmlComponent xmlComponent = new ISIXmlComponent("xmlEntry", xmlPointer, "glossary");
      xmlComponent.setTransformParameter("mini", "true");
      dialog.getBodyContainer().replace(xmlComponent);
    } else {
      dialog.getBodyContainer().replace(new Label("xmlEntry", new ResourceModel("isi.miniGlossary.error", "No such glossary word")));     
    }
    super.onBeforeRender();
View Full Code Here

    container.add (editButton);
  }

  protected void makeHint (WebMarkupContainer hintContainer, XmlSectionModel mSection) {
    // Is there any authored hint text?
    ISIXmlComponent highlighterComponent = new ISIXmlComponent("highlightHint", mSection, "student");
    highlighterComponent.setTransformParameter(FilterElements.XPATH, ".//dtb:annotation[@class='highlight']/dtb:p");
    hintContainer.add(highlighterComponent);
    if (!highlighterComponent.isEmpty())
      hasHint = true;
   

    // Search to see if there are any authored highlights for "compare" functionality
    boolean hasKeySpans = false;
View Full Code Here

TOP

Related Classes of org.cast.isi.ISIXmlComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.