主题 : 我想发布新闻的时候作者名称自动获取登陆管理员的名称 |
级别: 童生
![]() |
1# 发表于:2017-12-04 23:30:32 IP:175.194.*.*
|
||||
---|---|---|---|---|---|
级别: 童生
![]() |
3# 发表于:2017-12-05 10:50:09 IP:175.176.*.*
<#elseif item.field=="origin">
<@p.td help=item.help helpPosition="${item.helpPosition!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}"> <@p.text name=item.field value="${user.group.name}" maxlength="100" style="width:70px"/> <@s.m "content.originUrl"/>: <input type="text" name="originUrl" maxlength="255" style="width:100px"/> </@p.td> 我直接放进去显示这些内容.... FreeMarker template error: The following has evaluated to null or missing: ==> user [in template "csagri_sys/content/add.html" at line 392, column 35] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction (FTL stack trace): ---------- ==> ${user.group.name} [in template "csagri_sys/content/add.html" at line 392, column 33] @p.text name=item.field value="\${use... [in template "csagri_sys/content/add.html" at line 392, column 1] #nested [in template "ftl/csagri/ui/td.ftl" in macro "td" at line 16, column 1] @p.td help=item.help helpPosition="\$... [in template "csagri_sys/content/add.html" at line 391, column 1] #elseif item.field == "origin" [in template "csagri_sys/content/add.html" at line 390, column 1] #if !item.custom [in template "csagri_sys/content/add.html" at line 325, column 1] #nested [in template "ftl/csagri/ui/form.ftl" in macro "form" at line 25, column 1] @p.form id="jvForm" action="o_save.do... [in template "csagri_sys/content/add.html" at line 320, column 1] ---------- Java stack trace (for programmers): ---------- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98) at |
||
---|---|---|---|
级别: 童生
![]() |
5# 发表于:2017-12-05 10:58:02 IP:175.176.*.*
<#elseif item.field=="origin">
<@p.td help=item.help helpPosition="${item.helpPosition!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}"> <@p.text name=item.field value="${user.username!}" maxlength="100" style="width:70px"/> <@s.m "content.originUrl"/>: <input type="text" name="originUrl" maxlength="255" style="width:100px"/> </@p.td> FreeMarker template error: The following has evaluated to null or missing: ==> user [in template "csagri_sys/content/add.html" at line 392, column 35] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction (FTL stack trace): ---------- ==> ${user.username!} [in template "csagri_sys/content/add.html" at line 392, column 33] @p.text name=item.field value="\${use... [in template "csagri_sys/content/add.html" at line 392, column 1] #nested [in template "ftl/csagri/ui/td.ftl" in macro "td" at line 16, column 1] @p.td help=item.help helpPosition="\$... [in template "csagri_sys/content/add.html" at line 391, column 1] #elseif item.field == "origin" [in template "csagri_sys/content/add.html" at line 390, column 1] #if !item.custom [in template "csagri_sys/content/add.html" at line 325, column 1] #nested [in template "ftl/csagri/ui/form.ftl" in macro "form" at line 25, column 1] @p.form id="jvForm" action="o_save.do... [in template "csagri_sys/content/add.html" at line 320, column 1] ---------- Java stack trace (for programmers): ---------- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98) at freemarker.core.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:41) at |
||
---|---|---|---|
级别: 童生
![]() |
7# 发表于:2017-12-05 11:03:47 IP:175.176.*.*
<#elseif item.field=="origin">
<@p.td help=item.help helpPosition="${item.helpPosition!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}"> <@p.text name=item.field value="${content.user.username}" maxlength="100" style="width:70px"/> <@s.m "content.originUrl"/>: <input type="text" name="originUrl" maxlength="255" style="width:100px"/> </@p.td> FreeMarker template error: The following has evaluated to null or missing: ==> content [in template "csagri_sys/content/add.html" at line 392, column 35] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction (FTL stack trace): ---------- ==> ${content.user.username} [in template "csagri_sys/content/add.html" at line 392, column 33] @p.text name=item.field value="\${con... [in template "csagri_sys/content/add.html" at line 392, column 1] #nested [in template "ftl/csagri/ui/td.ftl" in macro "td" at line 16, column 1] @p.td help=item.help helpPosition="\$... [in template "csagri_sys/content/add.html" at line 391, column 1] #elseif item.field == "origin" [in template "csagri_sys/content/add.html" at line 390, column 1] #if !item.custom [in template "csagri_sys/content/add.html" at line 325, column 1] #nested [in template "ftl/csagri/ui/form.ftl" in macro "form" at line 25, column 1] @p.form id="jvForm" action="o_save.do... [in template "csagri_sys/content/add.html" at line 320, column 1] ---------- Java stack trace (for programmers): ---------- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98) at freemarker.core.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:41) at |
||
---|---|---|---|
级别: 童生
![]() |
9# 发表于:2017-12-05 11:11:50 IP:175.176.*.*
嗯嗯,我放${site.name!}可以显示站点名称,${site.username!}、${site.realname!}没显示也不出现看不懂的代码,大佬们,我都蒙圈了
|
||
---|---|---|---|