Examples of ISIXmlSection


Examples of org.cast.isi.ISIXmlSection

    add(new Label("title", rootSection.getTitle()));   
  }

  @Override
  public void onBeforeRender() {
    ISIXmlSection currentSection = getCurrentSection();
    ISIXmlSection rootSection = ISIXmlSection.getRootSection(currentSection);

    /**************************
     * Super Section Repeater *
     **************************/
    RepeatingView superSectionRepeater = new RepeatingView("superSectionRepeater");
    addOrReplace(superSectionRepeater);

    // Determine if there is a super-section level, or if we just have a list of regular sections
    if (rootSection.hasSuperSections()) {
      addSuperSections(currentSection, rootSection, superSectionRepeater, iconFactory);
    }
    else {
      addSimpleSections(currentSection, rootSection, superSectionRepeater, iconFactory);
    }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

    // TODO: We really should only have to refresh the icon and link for the changed section, not the whole navbar.
    target.addComponent(this);
  }
 
  private ISIXmlSection getCurrentSection() {
    ISIXmlSection currentPage =  (ISIXmlSection) getModelObject();
     // May be the current page or an ancestor
    return currentPage.getSectionAncestor();
  }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

  private void addSuperSections(ISIXmlSection currentSection,
      ISIXmlSection rootSection, RepeatingView superSectionRepeater,
      SectionIconFactory iconFactory) {
    // We do have supersections
    for (XmlSection ss: rootSection.getChildren()) {
      ISIXmlSection superSection = (ISIXmlSection) ss;
      WebMarkupContainer superSectionContainer = new WebMarkupContainer(superSectionRepeater.newChildId());
      superSectionRepeater.add(superSectionContainer);

      superSectionContainer.add(new Label("superSectionTitle", superSection.getTitle()));

      List<XmlSection> sections;
      // Use Supersection children, or supersection itself if there are no children.
      if (!superSection.hasChildren()) {
        sections = new ArrayList<XmlSection>();
        sections.add(superSection);
      } else {
        sections = superSection.getChildren();
      }

      superSectionContainer.add (new SectionRepeater("sectionRepeater", sections, currentSection, iconFactory));
    }
  }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

    }
    if (loc == null || loc.getSection() == null) {
      loc = new ContentLoc(ISIApplication.get().getPageNum(1));
    }
       
      ISIXmlSection section = loc.getSection();
      if (section != null) {
        ISISession.get().setBookmark(loc);       
      }
      mSection = new XmlSectionModel(section);
  }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

  protected boolean userIsStudent() {
    return true;
  }

  private boolean isDelayFeedback(XmlSectionModel model) {
    ISIXmlSection section = (ISIXmlSection) model.getObject();
    return (section != null) && section.isDelayFeedback();
  }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

    ISIXmlSection section = (ISIXmlSection) model.getObject();
    return (section != null) && section.isDelayFeedback();
  }

  private boolean isLockResponse(XmlSectionModel model) {
    ISIXmlSection section = (ISIXmlSection) model.getObject();
    return (section != null) && section.isLockResponse();
  }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

  protected void addDetailsPanel(IModel<Prompt> mPrompt) {   
    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);
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

    if (mCurrentPage == null) {
      setModel(new XmlSectionModel(ISIApplication.get().getPageNum(1)));
    }

    ISIXmlSection rootSection = ISIXmlSection.getRootSection(getCurrentSection());
 
    // Current Section's Page Repeater with prev/next
    PageNavPanel pageNavPanelTop = new PageNavPanel("pageNavPanelTop", getModel());
    add(pageNavPanelTop);
       
    // Jump to a certain page
    add(new QuickFlipForm("quickFlipForm", true));
   
    // Chapter Title (xml level 1)
    add(new Label("title", rootSection.getTitle()));   
  }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

    add(new Label("title", rootSection.getTitle()));   
  }

  @Override
  public void onBeforeRender() {
    ISIXmlSection currentSection = getCurrentSection();
    addOrReplace(new Label("superSectionTitle", currentSection.getParent().getTitle()));
    super.onBeforeRender();
   
  }
View Full Code Here

Examples of org.cast.isi.ISIXmlSection

    // refresh on section complete change for any section
    target.addComponent(this);
  }
 
  private ISIXmlSection getCurrentSection() {
    ISIXmlSection currentPage =  (ISIXmlSection) getModelObject();
     // May be the current page or an ancestor
    return currentPage.getSectionAncestor();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.