Package org.cast.isi.data

Examples of org.cast.isi.data.ContentElement


      @Override
      protected void populateItem(Item<Tagging> item) {
        Tagging ting = item.getModelObject();
        PersistedObject target = TagService.get().getTarget(ting);
        if (target instanceof ContentElement) {
          ContentElement elt = (ContentElement) target;
          ContentLoc loc = elt.getContentLocObject();
          ISIXmlSection sec = (ISIXmlSection) loc.getSection();

          String crumbTrail = sec.getCrumbTrailAsString(1, 1);
          item.add(new Label("crumbTrail", crumbTrail));
         
View Full Code Here


    else
      return new Label(wicketId, "Question Not Available");
  }

  private Component makeXmlQuestionTextComponent(String wicketId, ISIPrompt prompt) {
    ContentElement contentElement = prompt.getContentElement();
    ContentLoc contentLocObject = contentElement.getContentLocObject();
    ISIXmlSection section = contentLocObject.getSection();
    ISIXmlComponent xml = new ISIXmlComponent(wicketId,new XmlSectionModel(section), "student" );
    String xmlId = contentElement.getXmlId();
    xml.setTransformParameter(FilterElements.XPATH, String.format("//dtb:responsegroup[@id='%s']//dtb:prompt", xmlId));
    xml.setOutputMarkupId(true);
    return xml;
  }
View Full Code Here

      tagBox.setVisible(ISIApplication.get().isTagsOn());

      StateSavingCollapseBoxBehavior behavior = new StateSavingCollapseBoxBehavior("tagToggle", getPageName(), "tagToggle");
      tagBox.add(new WebMarkupContainer("tagBoxToggle").add(behavior));

      ContentElement ce = responseService.getOrCreateContentElement(loc).getObject();
      tagBox.add(new TagPanel("tagPanel", ce, ISIApplication.get().getTagLinkBuilder(), ISISession.get().getStudentModel().getObject()));
    } else {
      add (new WebMarkupContainer("tagBox")
        .add(new WebMarkupContainer("tagBoxToggle"))
        .add(new WebMarkupContainer("tagPanel"))
View Full Code Here

    tagBox.setVisible(ISIApplication.get().isTagsOn());

    StateSavingCollapseBoxBehavior behavior = new StateSavingCollapseBoxBehavior("tagToggle", getPageName(), "tagToggle");
    tagBox.add(new WebMarkupContainer("tagBoxToggle").add(behavior));

    ContentElement ce = responseService.getOrCreateContentElement(loc).getObject();
    tagBox.add(new TagPanel("tagPanel", ce, ISIApplication.get().getTagLinkBuilder()).setRenderBodyOnly(true));
  }
View Full Code Here

      c.add(Restrictions.eq("xmlId", xmlId));
    } else {
      c.add(Restrictions.isNull("xmlId"));
    }
   
    ContentElement e = (ContentElement) c.uniqueResult();

    // If it doesn't exist, create it
    if (e == null) {
      e = new ContentElement(loc);
      if (xmlId != null)
        e.setXmlId(xmlId);
      Databinder.getHibernateSession().save(e)
    }
    cwmService.flushChanges();
   
    return new HibernateObjectModel<ContentElement>(e);
View Full Code Here

TOP

Related Classes of org.cast.isi.data.ContentElement

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.