Package org.apache.wicket.markup.repeater

Examples of org.apache.wicket.markup.repeater.RepeatingView


    super(id);
    setOutputMarkupId(true);
    add(new AttributeModifier("name", true, new PropertyModel<String>(this, "markupId")));
    image.add(new AttributeModifier("usemap", true, new UsemapModel()));

    areas = new RepeatingView("area");
    add(areas);
  }
View Full Code Here


     * @param id
     */
    private ToolbarsContainer(final String id)
    {
      super(id);
      toolbars = new RepeatingView("toolbars");
      add(toolbars);
    }
View Full Code Here

        private void addParameters() {
            final ActionModel actionModel = getActionModel();
            List<ActionParameterMemento> parameterMementos = actionModel.primeArgumentModels();
           
            final RepeatingView rv = new RepeatingView(ID_ACTION_PARAMETERS);
            add(rv);
           
            paramPanels.clear();
            for (final ActionParameterMemento apm : parameterMementos) {
                final WebMarkupContainer container = new WebMarkupContainer(rv.newChildId());
                rv.add(container);

                final ScalarModel argumentModel = actionModel.getArgumentModel(apm);
                argumentModel.setActionArgsHint(actionModel.getArgumentsAsArray());
                final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ComponentType.SCALAR_NAME_AND_VALUE, argumentModel);
                final ScalarPanelAbstract paramPanel = component instanceof ScalarPanelAbstract ? (ScalarPanelAbstract) component : null;
View Full Code Here

    if (responseMap.size() == 0) {
      rootContainer.add(new WebMarkupContainer("pageListing").setVisible(false))
    } else {
      enableNames = true;
      noData.setVisible(false);
      RepeatingView pageListing = new RepeatingView("pageListing");
      rootContainer.add(pageListing);     

      for (ISIXmlSection sec : responseMap.keySet()) {
        WebMarkupContainer pageItem = new WebMarkupContainer(pageListing.newChildId());
        pageItem.setOutputMarkupId(true);
        pageListing.add(pageItem);

        RepeatingView questionListing = new RepeatingView("questionListing");
        pageItem.add(questionListing);

        SortedMap<ISIPrompt, List<ISIResponse>> promptResponseMap = responseMap.get(sec);

        for (ISIPrompt isiprompt : promptResponseMap.keySet()) {
          List<ISIResponse> responseList = promptResponseMap.get(isiprompt);

          WebMarkupContainer questionItem = new WebMarkupContainer(questionListing.newChildId());
          questionItem.setOutputMarkupId(true);
          questionListing.add(questionItem);

          BookmarkablePageLink<ISIStandardPage> titleLink = new SectionLinkFactory().linkToPage("titleLink", sec);
          titleLink.add(ISIApplication.get().iconFor(sec.getSectionAncestor()));
          questionItem.add(titleLink);


          questionItem.add(new StudentScorePanel("responseScore", getModels(responseList)));

          questionItem.add(factory.makeQuestionTextComponent("questionText", isiprompt));
          RepeatingView responses = new RepeatingView("responseListing");
          questionItem.add(responses);

          for (ISIResponse response : responseList) {
            WebMarkupContainer responseItem = new WebMarkupContainer(responses.newChildId());
            responseItem.setOutputMarkupId(true);
            responses.add(responseItem);
            responseItem.add(new WebMarkupContainer("responseAnchor")
                .add(new SimpleAttributeModifier("name", String.valueOf(response.getId()))));
            responseItem.add(new ResponseViewerFactory().makeResponseViewComponent("response", new HibernateObjectModel<ISIResponse>(Response.class, response.getId())));

            // Remove from Whiteboard link
View Full Code Here

    ISIXmlSection currentPage = mCurrentPage != null ? (ISIXmlSection) mCurrentPage.getObject() : null;
     ISIXmlSection currentSection = ((ISIXmlSection) mSection.getObject()); // May be itself
    SectionStatus currentSectionStatus = sectionService.getSectionStatus(mTargetUser.getObject(), currentSection);

    // Page Number Repeater
    RepeatingView pageRepeater = new RepeatingView("pageRepeater");
    int pageNumDisplay = ISIApplication.get().getStudentContent().getLabelIndex(ISIXmlSection.SectionType.PAGE, currentSection.firstPage());

    for(ISIXmlSection page = currentSection.firstPage(); page != null; page = page.getNext(), pageNumDisplay++) {
      WebMarkupContainer pageLinkContainer = new WebMarkupContainer(pageRepeater.newChildId());
      pageRepeater.add(pageLinkContainer);
     
      BookmarkablePageLink<ISIStandardPage> link = new SectionLinkFactory().linkToPage("pageLink", page);
      pageLinkContainer.add(link);
      link.setVisible(ISIApplication.get().isPageNumbersOn());
      link.add(new Label("pageNum", String.valueOf(pageNumDisplay)).setRenderBodyOnly(true));
View Full Code Here

    tagsBox.setVisible(ISIApplication.get().isTagsOn());
    tagsBox.add(new WebMarkupContainer("tagCollapseToggle").add(new CollapseBoxBehavior("onclick", "tagpanel:studenttoc", getPageName())));
    tagsBox.add(new TagCloudTocPanel("tagcloud", getTagLinkBuilder()));
   
    // This is the "Chapter" level
       RepeatingView chapterRepeater = new RepeatingView("chapterRepeater");
       add(chapterRepeater);
      
       for (XmlDocument doc : ISIApplication.get().getStudentContent()) { // For each XML document
         // FIXME: Calling getLastModified here has the side effect of checking whether the XML
         // has been modified, and if so, updating it.  This is mysterious and should be
         // replaced with a more transparent mechanism or at least a better name for the method.
         doc.getLastModified();
         for (XmlSection rs : doc.getTocSection().getChildren()) { // For each chapter in the document
           ISIXmlSection rootSection = (ISIXmlSection) rs;
           WebMarkupContainer rootSectionContainer = new WebMarkupContainer(chapterRepeater.newChildId());
           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");
View Full Code Here

  }


  public void addChapterTables(ISIXmlSection currentRootSection) {

    RepeatingView chapterRepeater = new RepeatingView("chapterRepeater");
    add(chapterRepeater);

    for (XmlDocument doc : ISIApplication.get().getStudentContent()) { // For each XML Document
      for (XmlSection rs : doc.getTocSection().getChildren()) { // For each chapter in the document; tends to be only one.

        final ISIXmlSection rootSection = (ISIXmlSection) rs;
        WebMarkupContainer rootSectionContainer = new WebMarkupContainer(chapterRepeater.newChildId());
        chapterRepeater.add(rootSectionContainer);

        rootSectionContainer.add(new Label("title", rs.getTitle()));
        rootSectionContainer.add(new Label("subtitle", rootSection.getSubTitle()));

        if (rootSection.equals(currentRootSection))
          rootSectionContainer.add(new ClassAttributeModifier("open"));

        WebMarkupContainer table = new WebMarkupContainer("periodTable");
        rootSectionContainer.add(table);

        table.add(new Label("periodName", new PropertyModel<String>(ISISession.get().getCurrentPeriodModel(), "name")));

        // Add non-section children as Super Section Labels
        // TODO: Lame hack for differences between IQWST/FS
        // TODO: Have TeacherToc create a custom repeater that can be extended by subclasses?
        RepeatingView superSectionRepeater = new RepeatingView("superSectionRepeater");
        for (XmlSection rc : rootSection.getChildren()) {
          ISIXmlSection rootChild = (ISIXmlSection) rc;
          WebMarkupContainer superSectionContainer = new WebMarkupContainer(superSectionRepeater.newChildId());
          superSectionRepeater.add(superSectionContainer);
          if (rootChild.isSuperSection()) {
            superSectionContainer.add(new Label("superSectionTitle", rootChild.getTitle()));
            if (rootChild.getChildren().size() > 1) {
              superSectionContainer.add(new SimpleAttributeModifier("colspan", String.valueOf(rootChild.getChildren().size())));
            }
View Full Code Here

    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);
View Full Code Here

  public CorrectImmediateSingleSelectSummaryPanel (String wicketId, Map<Integer, List<Response>> responseMap) {
    super(wicketId);
    setOutputMarkupId(true);
   
    RepeatingView byTries = new RepeatingView("byTries");
    add(byTries);
   
    List<Integer> sorted = new ArrayList<Integer>(responseMap.keySet());
    Collections.sort(sorted);
   
    for (Integer tries : sorted) {
      WebMarkupContainer container = new WebMarkupContainer(byTries.newChildId());
      byTries.add(container);
      List<Response> responses = responseMap.get(tries);
      container.add(new SingleSelectScoreIndicator("score", new HibernateObjectModel<Response>(responses.get(0)), tries>0));
      container.add(new Label("count", String.valueOf(responses.size())));
      container.add(new StudentList("studentList", responses));
     
View Full Code Here

    }
    return rvPromptResponseList;
  }

  protected RepeatingView makeCollectionNameRepeater(List<String> listNames) {
    RepeatingView rvCollectionList = new RepeatingView("collectionList");
   
    for (String collectionName : listNames) {
      WebMarkupContainer wmc = new WebMarkupContainer(rvCollectionList.newChildId());
      wmc.add(makeCollectionLink(collectionName));
      rvCollectionList.add(wmc);
    }
    return rvCollectionList;
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.repeater.RepeatingView

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.