private void bindServiceInfo(long serviceId, Service service)
        {
            set("serviceId", serviceId);
            set("service.Name", service.Name);

            // List参数用于设置默认选择项为List模板
            set("templateType", TemplateUtil.getServiceTemplates(service.Note, "List", ctx, templateService));
        }
示例#2
0
        public virtual void Select(long id)
        {
            ContentSection section = sectionService.GetById(id, ctx.app.Id);

            if (section == null)
            {
                echoRedirect(lang("exDataNotFound"));
                return;
            }

            set("customLink", to(new TemplateCustomController().EditBinder, id));

            Service service            = ServiceContext.Get(section.ServiceId);
            ContentSectionTemplate tpl = templateService.GetById(section.TemplateId);

            String templateType = TemplateUtil.getServiceTemplates(service.Note, tpl, ctx, templateService);

            set("templateType", templateType);

            target(UpdateTemplate, id);
        }