NutzCN Logo
问答 怎么没看到主动调用list.ftl,就有执行结果了?
发布于 2878天前 作者 shusheng 2964 次浏览 复制 上一个帖子 下一个帖子
标签: nutzbook
<@p.form id="tableForm" method="post">
<@p.hidden name="pageNumber" value="${pageNo!}"/>
<@p.table value=obj;topic,i,has_next><#rt/>
	<@p.column title="ID" align="center">${i+1}</@p.column><#t/>
	<@p.column title="标题ssssssssssss" align="center">${topic.title}</@p.column><#t/>
	<@shiro.hasPermission name="topic:update">
	<@p.column code="global.operate" align="center">
		<a href="javascript:void(0)" onclick="Cms.deleted('${topic.id}')" class="pn-opt"><@s.m "global.delete" /></a><#t/>
	</@p.column><#t/>
	</@shiro.hasPermission>
</@p.table>
</@p.form>
7 回复

不知所云。。。

@wendal 没有看到类似这样的调用代码,上面那个是list.ftl中的一段for循环

<#include "/templates/admin/head.ftl"/>

第一次就缓存了吧

@wendal 帖子列表的展示,没有看到调用,就展示出列表的结果了,问一下在哪里调用的?

@wendal

18:04:37.554 DEBUG (UrlMappingImpl.java:101) get - Found mapping for [GET] path=/admin/topic/list : AdminTopicModule.list(AdminTopicModule.java:28)
18:04:37.555 DEBUG (NutIoc.java:151) get - Get 'jedisPool'<class redis.clients.jedis.JedisPool>
18:04:37.556 DEBUG (NutIoc.java:151) get - Get 'adminTopicModule'<class net.wendal.nutzbook.module.admin.AdminTopicModule>
18:04:37.556 DEBUG (NutIoc.java:177) get - 	 >> Load definition name=adminTopicModule
18:04:37.556 DEBUG (ComboIocLoader.java:169) load - Found IocObject(adminTopicModule) in AnnotationIocLoader(packages=[net.wendal.nutzbook])
18:04:37.556 DEBUG (NutIoc.java:209) get - 	 >> Make...'adminTopicModule'<class net.wendal.nutzbook.module.admin.AdminTopicModule>
18:04:37.556 DEBUG (DefaultMirrorFactory.java:70) getMirror - Load class net.wendal.nutzbook.module.admin.AdminTopicModule without AOP
18:04:37.557 DEBUG (ScopeContext.java:64) save - Save object 'adminTopicModule' to [app] 
18:04:37.557 DEBUG (NutIoc.java:151) get - Get 'topicService'<class net.wendal.nutzbook.service.TopicService>
18:04:37.557 DEBUG (NutIoc.java:177) get - 	 >> Load definition name=topicService
18:04:37.557 DEBUG (ComboIocLoader.java:169) load - Found IocObject(topicService) in AnnotationIocLoader(packages=[net.wendal.nutzbook])
18:04:37.557 DEBUG (NutIoc.java:209) get - 	 >> Make...'topicService'<class net.wendal.nutzbook.service.TopicService>
18:04:37.557 DEBUG (NutIoc.java:151) get - Get 'redis'<interface org.nutz.aop.MethodInterceptor>
18:04:37.567 DEBUG (ScopeContext.java:64) save - Save object 'topicService' to [app] 
18:04:37.568 DEBUG (EntityService.java:41) <init> - Get TypeParams for self : net.wendal.nutzbook.bean.yvr.Topic
18:04:37.568 DEBUG (NutIoc.java:151) get - Get 'dao'<>
18:04:37.568 DEBUG (RedisCache.java:43) get - GET name=nutzdao_realm.authorizationCache key=42
18:04:37.569 DEBUG (RedisCache.java:43) get - GET name=nutzdao_realm.authorizationCache key=42
18:04:37.571 DEBUG (NutDaoExecutor.java:388) printSQL - SELECT * FROM t_topic  LIMIT 0, 20 
18:04:37.576 DEBUG (DaoTimeInterceptor.java:28) filter - time=5ms, sql=SELECT * FROM t_topic  LIMIT 0, 20 
18:04:37.577 DEBUG (NutDaoExecutor.java:388) printSQL - SELECT COUNT(*) FROM t_topic 
18:04:37.579 DEBUG (DaoTimeInterceptor.java:28) filter - time=1ms, sql=SELECT COUNT(*) FROM t_topic 
18:04:37.579 DEBUG (_Log4JLoggerFactory.java:83) debug - Could not find template in cache, creating new one; id=["templates/admin/topic/list.ftl"["zh_CN",UTF-8,parsed] ]

日志显示最后一句是加载的,但是没找到调用的地方

@qq_97f5068e 改名,应该就报错了,然后顺着找吧

@wendal

@Ok("fm:templates.admin.topic.list")

其实在返回的时候有调用,呵呵

添加回复
请先登陆
回到顶部