Package org.apache.wicket.markup.repeater

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


  protected class StudentList extends WebMarkupContainer {
    private static final long serialVersionUID = 1L;

    protected StudentList(String id, List<Response> responses) {
      super(id);
      RepeatingView byStudent = new RepeatingView("byStudent");
      add (byStudent);
      for (Response r : responses) {
        WebMarkupContainer container2 = new WebMarkupContainer(byStudent.newChildId());
        byStudent.add(container2);
        container2.add(new Label("name", r.getUser().getFullName()));
      }
      setOutputMarkupId(true);     
    }
View Full Code Here


    // "No Responses" message
    WebMarkupContainer noNotes = new WebMarkupContainer("noNotes");
    add(noNotes.setVisible(responseMap.isEmpty()));

    RepeatingView noteRepeater = new RepeatingView("noteRepeater");
    add(noteRepeater.setVisible(!responseMap.isEmpty()));

    for (Entry<ISIPrompt, List<ISIResponse>> entry : responseMap.entrySet()) {
      ISIPrompt currentPrompt = entry.getKey();

      WebMarkupContainer promptGroup = new WebMarkupContainer(noteRepeater.newChildId());
      noteRepeater.add(promptGroup);

      String crumbTrail = currentPrompt.getContentElement().getContentLocObject().getSection().getCrumbTrailAsString(1, 1);           
      promptGroup.add(new Label("responseHeader", crumbTrail));

      // Prompt Icon
View Full Code Here

    ContentLoc location = ((ISIPrompt)mPrompt.getObject()).getContentElement().getContentLocObject();

    List<User> studentList = getUserListModel().getObject();

    // iterate over all the users to get the responses for the prompt
    RepeatingView rv1 = new RepeatingView("studentRepeater");
    add(rv1);
   
    for (User student : studentList) {
      WebMarkupContainer studentContainer = new WebMarkupContainer(rv1.newChildId());
      studentContainer.add(new Label("studentName", student.getFullName()) {
        private static final long serialVersionUID = 1L;
        @Override
        public boolean isVisible() {
          return showNames;
        }
      });
      rv1.add(studentContainer);
     
      // list all of the responses for this student
      ResponseList studentResponseList = new ResponseList("studentResponseList", mPrompt, responseMetadata, location, new UserModel(student));
      studentResponseList.setAllowEdit(false);
      studentResponseList.setAllowNotebook(false);
View Full Code Here

      add(makeSummary("promptResponseSummary"));
      add(makePromptResponseRepeater("promptResponseRepeater"));
    }
    else {
      add(new EmptyPanel("promptResponseSummary"));
      add(new RepeatingView("promptResponseRepeater"));
    }
   
  }
View Full Code Here

  protected boolean haveSelectedCollection() {
    return StringUtils.isNotEmpty(paramCollectionName);
  }

  protected RepeatingView makePromptResponseRepeater(String id) {
    RepeatingView rvPromptResponseList = new RepeatingView(id);
    for (ISIPrompt prompt : responseService.getResponseCollectionPrompts(mUser, paramCollectionName)) {
      rvPromptResponseList.add(makePromptContainer(rvPromptResponseList.newChildId(), prompt));
    }
    return rvPromptResponseList;
  }
View Full Code Here

  {
    super(parameters);

    setStatelessHint(true);

    add(new RepeatingView("links")
    {
      @Override
      protected void onPopulate()
      {
        removeAll();
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

        feedback.setOutputMarkupId(true);
        addOrReplace(feedback);

        List<ObjectAssociation> numberAssociations = elementSpec.getAssociations(Contributed.EXCLUDED, CollectionContentsAsSummaryFactory.OF_TYPE_BIGDECIMAL);

        RepeatingView repeating = new RepeatingView(ID_REPEATING_SUMMARY);
        addOrReplace(repeating);

        for (ObjectAssociation numberAssociation : numberAssociations) {
            AbstractItem item = new AbstractItem(repeating.newChildId());

            repeating.add(item);

            String propertyName = numberAssociation.getName();
            item.add(new Label(ID_PROPERTY_NAME, new Model<String>(propertyName)));

View Full Code Here

        final ObjectAdapter adapter = entityModel.getObject();
        final ObjectSpecification objSpec = adapter.getSpecification();

        final List<ObjectAssociation> associations = visibleProperties(adapter, objSpec, Where.OBJECT_FORMS);

        final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
        markupContainer.add(memberGroupRv);

        Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(associations);
       
        final List<String> groupNames = ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
       
        for(String groupName: groupNames) {
            final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
            if(associationsInGroup==null) {
                continue;
            }

            final WebMarkupContainer memberGroupRvContainer = new WebMarkupContainer(memberGroupRv.newChildId());
            memberGroupRv.add(memberGroupRvContainer);
            memberGroupRvContainer.add(new Label(ID_MEMBER_GROUP_NAME, groupName));

            final RepeatingView propertyRv = new RepeatingView(ID_PROPERTIES);
            memberGroupRvContainer.add(propertyRv);

            @SuppressWarnings("unused")
            Component component;
            for (final ObjectAssociation association : associationsInGroup) {
                final WebMarkupContainer propertyRvContainer = new UiHintPathSignificantWebMarkupContainer(propertyRv.newChildId());
                propertyRv.add(propertyRvContainer);
                addPropertyToForm(entityModel, association, propertyRvContainer);
            }
        }
       
        addClassForSpan(markupContainer, span);
View Full Code Here

        super(id, new MyModel(topLevelMenuItems));
        this.styleAppender = new StyleAppender(style);

        add(styleAppender);

        final RepeatingView menuItemRv = new RepeatingView(CssMenuPanel.ID_MENU_ITEMS);
        add(menuItemRv);

        for (final CssMenuItem cssMenuItem : this.getModel().getObject()) {
            final WebMarkupContainer menuItemMarkup = new WebMarkupContainer(menuItemRv.newChildId());
            menuItemRv.add(menuItemMarkup);

            menuItemMarkup.add(new CssMenuItemPanel(CssMenuPanel.ID_MENU_ITEM, cssMenuItem));
        }

    }
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.