0
Мои распорки 2 Действие Serverside имеет методошибка с Struts2 использования тегов в HTML
public boolean isHomeAddress() {
return true;
}
Мое мнение (HTML) содержит код, приведенный ниже
<@s.if test="${homeAddress == true}"> dosomething </@s.if>
<@s.elseif test="someexpression"> else worked </@s.elseif>
<@s.else> no condition passed</@s.else>
Я получаю ошибку
----
Tip: If you just want "true"/"false" result as you are generting computer-language output, use "?c", like ${myBool?c}.
----
Tip: You can write myBool?string('yes', 'no') and like to specify boolean formatting in place.
----
Tip: If you need the same two values on most places, the programmers should set the "boolean_format" setting to something like "yes,no".
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${homeAddress == true} [in template "freemarker/myaccount/mobile/orderTracking.html" at line 132, column 30]
- Reached through: @s.if test="\${homeAddress == true}" [in template "freemarker/myaccount/mobile/orderTracking.html" at line 132, column 17]
Должен ли я использовать <@ s.if test = "$ {homeAddress == 'true'}"> dosomething@s.if> вместо –
Почему бы не просто 'homeAddress'? –
<@ s.if test = "$ {homeAddress}"> dosomething@s.if> – Pravin