Examples of TagModel


Examples of com.multysite.model.TagModel

          bind.put("css_for_layout", template.getCss());
          bind.put("js_for_layout", template.getJs());

          CategoryModel cateModel = new CategoryModel();
          cateModel.prepareAll();
          TagModel tagModel = new TagModel();
          tagModel.prepareList();

          bind.put("keyword", keyword);
          bind.put("recent_view", RecentViewHelper.getRecentView());
          bind.put("list_tag", tagModel.getListResult());
          bind.put("list_category", cateModel.getListResult());

          bind.put("current_page", model.getPage());
          bind.put("total_page", model.getTotalPage());
          bind.put("articles", model.getListResult());
View Full Code Here

Examples of com.multysite.model.TagModel

            bind.put("css_for_layout", template.getCss());
            bind.put("js_for_layout", template.getJs());

            CategoryModel cateModel = new CategoryModel();
            cateModel.prepareAll();
            TagModel tagModel = new TagModel();
            tagModel.prepareList();

            bind.put("current_tag", obj);
            bind.put("recent_view",
                RecentViewHelper.getRecentView());
            bind.put("list_tag", tagModel.getListResult());
            bind.put("list_category", cateModel.getListResult());

            List<News> listResult = new ArrayList<News>();
            listResult = obj.recoverListNews();
            int start = (page - 1) * limit;
 
View Full Code Here

Examples of com.multysite.model.TagModel

          NewsModel model = new NewsModel();
          model.setPage(page);
          model.prepareList();
          CategoryModel cateModel = new CategoryModel();
          cateModel.prepareAll();
          TagModel tagModel = new TagModel();
          tagModel.prepareList();

          CompiledScript compiledscript = CompileScriptEngine
              .getCompileScript(config.getApplicationId(),
                  "home", template.getHome());
          if (compiledscript != null) {
            Bindings bind = compiledscript.getEngine().getBindings(
                ScriptContext.ENGINE_SCOPE);
            bind.put("title_for_layout", config.getTitle());
            bind.put("description_for_layout",
                config.getDescription());
            bind.put("keyword_for_layout", config.getKeyword());
            bind.put("css_for_layout", template.getCss());
            bind.put("js_for_layout", template.getJs());

            bind.put("recent_view",
                RecentViewHelper.getRecentView());
            bind.put("list_tag", tagModel.getListResult());
            bind.put("list_category", cateModel.getListResult());

            bind.put("current_page", model.getPage());
            bind.put("total_page", model.getTotalPage());
            bind.put("articles", model.getListResult());
View Full Code Here

Examples of com.multysite.model.TagModel

          log.warning("-------detail no cache -----");
          News obj = NewsModel.getById(alias);
          if (obj != null) {
            CategoryModel cateModel = new CategoryModel();
            cateModel.prepareAll();
            TagModel tagModel = new TagModel();
            tagModel.prepareList();
            CompiledScript compiledscript = CompileScriptEngine
                .getCompileScript(config.getApplicationId(),
                    "detail", template.getDetail());

            Bindings bind = compiledscript.getEngine().getBindings(
                ScriptContext.ENGINE_SCOPE);
            bind.put("title_for_layout", config.getTitle());
            bind.put("description_for_layout",
                config.getDescription());
            bind.put("keyword_for_layout", config.getKeyword());
            bind.put("css_for_layout", template.getCss());
            bind.put("js_for_layout", template.getJs());

            RecentViewHelper.addRecentView(obj);
            bind.put("recent_view",
                RecentViewHelper.getRecentView());
            bind.put("list_tag", tagModel.getListResult());
            bind.put("list_category", cateModel.getListResult());
            bind.put("article", obj);
            try {
              String result = (String) compiledscript.eval();
              treeCache.put(alias, result);
View Full Code Here

Examples of com.multysite.model.TagModel

            model.setPage(page);
            model.prepareListByCategory(categoryAlias);
            listNews = model.getListResult();
            CategoryModel cateModel = new CategoryModel();
            cateModel.prepareAll();
            TagModel tagModel = new TagModel();
            tagModel.prepareList();
            bind.put("recent_view",
                RecentViewHelper.getRecentView());
            bind.put("list_tag", tagModel.getListResult());
            bind.put("list_category", cateModel.getListResult());

            bind.put("category", obj);
            bind.put("current_page", model.getPage());
            bind.put("total_page", model.getTotalPage());
View Full Code Here

Examples of com.subgraph.vega.internal.model.tags.TagModel

    try {
      final String databasePath = databaseFile.getAbsolutePath();
      final boolean exists = databaseFile.exists(); // possible race condition 
      final ObjectContainer db = configurationFactory.openContainer(databasePath);
      loadModelVersion(db, !exists);
      tagModel = new TagModel(db);
      webModel = new WebModel(db);
      variableModel = new VariableModel(db);
      httpMacroModel = new HttpMacroModel(db);
      identityModel = new IdentityModel(db);
      requestLog = new RequestLog(db);
View Full Code Here

Examples of com.tubeonfire.model.TagModel

        tagPool = (TreeMap<String, String>) cache.get(cachePrefix);
        for (String tag : tagPool.keySet()) {
          keys.add(tag);
        }
      } else {
        TagModel tagModel = new TagModel();
        keys = tagModel.getTagPool();
      }
      if (keys.size() > 0) {
        Collections.shuffle(keys);
        for (String key : keys) {
          if (key.length() > 3) {
View Full Code Here

Examples of com.tubeonfire.model.TagModel

        response.sendRedirect("/home");
      }

      keyword = URLDecoder.decode(keyword, "UTF8");
      System.out.println("Keyword to search : " + keyword);
      TagModel tagModel = new TagModel();
      Tag tag = tagModel.getByAlias(keyword);
      if (tag != null) {       
        List<Tube> result = new ArrayList<Tube>();
        int startPoint = (page - 1) * itemPerPage;
        if (tag.getListTubeId().size() > startPoint) {
          for (int i = startPoint; i < tag.getListTubeId().size(); i++) {
View Full Code Here

Examples of com.tubeonfire.model.TagModel

      List<Text> listKey = new ArrayList<Text>();
      for (String keyword : videoEntry.getMediaGroup().getKeywords()
          .getKeywords()) {
        Tag tmpTag = null;
        listKey.add(new Text(keyword));
        TagModel tagModel = new TagModel();
        String tagAlias = keyword;
        tmpTag = tagModel.getByAlias(tagAlias);
        List<Text> listTubeId = new ArrayList<Text>();
        if (tmpTag != null) {
          tmpTag.setCount(tmpTag.getCount() + 1);
          listTubeId.addAll(tmpTag.getListTubeId());
          listTubeId.add(new Text(this.tubeId));
          tmpTag.setListTubeId(listTubeId);
          tagModel.update(tmpTag);
          tagModel.closePM();
        } else {
          tmpTag = new Tag();
          listTubeId.add(new Text(this.tubeId));
          tmpTag.setListTubeId(listTubeId);
          tmpTag.setAlias(tagAlias);
          tmpTag.setCount(1);
          tmpTag.setTitle(new Text(tagAlias));
          tmpTag.setType("N");
          tagModel.add(tmpTag);
        }
      }
      this.keywords = listKey;
      JavaCacheHandle.addKeywords(listKey);
    }
View Full Code Here

Examples of org.apache.struts2.views.freemarker.tags.TagModel

            public Object getWrappedObject() {
                return WRAPPING_TEMPLATE_MODEL_CONTAINED_OBJECT;
            }
        });

        TagModel tagModel = new TagModel(stack, request, response) {
            protected Component getBean() {
                return null;
            }
        };

        Map result = tagModel.unwrapParameters(params);

        assertNotNull(result);
        assertEquals(result.size(), 11);
        assertEquals(result.get("property1"), Boolean.TRUE);
        assertEquals(result.get("property2"), Boolean.FALSE);
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.