Switch statement in thymeleaf doesn't workReplacements for switch statement in Python?Multiple cases in switch statementWhy can't variables be declared in a switch statement?Switch statement fallthrough in C#?Why can't I use switch statement on a String?How to write a switch statement in RubyWhat's the proper value for a checked attribute of an HTML checkbox?Switch statement multiple cases in JavaScriptUnescape XML with ThymeleafThymeleaf th:field doesn't bind the value for input text
Drawing Quarter-Circle
Is the schwa sound consistent?
Does the 500 feet falling cap apply per fall, or per turn?
Thesis' "Future Work" section – is it acceptable to omit personal involvement in a mentioned project?
Why was this sacrifice sufficient?
How are one-time password generators like Google Authenticator different from having two passwords?
semanage not changing file context
Control variables and other independent variables
What is the best way for a skeleton to impersonate human without using magic?
How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?
How can this pool heater gas line be disconnected?
How to make a language evolve quickly?
How does Howard Stark know this?
Why does the Earth follow an elliptical trajectory rather than a parabolic one?
Exception propagation: When to catch exceptions?
Why does a C.D.F need to be right-continuous?
On studying Computer Science vs. Software Engineering to become a proficient coder
Pre-1993 comic in which Wolverine's claws were turned to rubber?
How to align underlines in a cases environment
Why can't RGB or bicolour LEDs produce a decent yellow?
Why do Thanos's punches not kill Captain America or at least cause some mortal injuries?
How can a Lich look like a human without magic?
find not returning expected files
LocalDate.plus Incorrect Answer
Switch statement in thymeleaf doesn't work
Replacements for switch statement in Python?Multiple cases in switch statementWhy can't variables be declared in a switch statement?Switch statement fallthrough in C#?Why can't I use switch statement on a String?How to write a switch statement in RubyWhat's the proper value for a checked attribute of an HTML checkbox?Switch statement multiple cases in JavaScriptUnescape XML with ThymeleafThymeleaf th:field doesn't bind the value for input text
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Im sending one parameter from controller. Parameter role. In html using thymeleaf when I print thath parameter with th:value I got value of that parameter. But when Im using th:switch it doesn't work. Here is code.
<input
th:value="$role"
id="role"
type="text"
>
print value "MANAGER" which I sent from controller
<th:block th:switch="$role">
<ul th:case="MANAGER" class="list-unstyled components">
It doesn't work. Any suggestions ?
html switch-statement thymeleaf
add a comment |
Im sending one parameter from controller. Parameter role. In html using thymeleaf when I print thath parameter with th:value I got value of that parameter. But when Im using th:switch it doesn't work. Here is code.
<input
th:value="$role"
id="role"
type="text"
>
print value "MANAGER" which I sent from controller
<th:block th:switch="$role">
<ul th:case="MANAGER" class="list-unstyled components">
It doesn't work. Any suggestions ?
html switch-statement thymeleaf
1
I think you need single quotes around MANAGER.
– Andrew
Mar 23 at 19:07
Why dont you use sec:authorize Spring Security features with thymeleaf. Here is an example mkyong.com/spring-boot/…
– Ahmet
Mar 26 at 8:15
add a comment |
Im sending one parameter from controller. Parameter role. In html using thymeleaf when I print thath parameter with th:value I got value of that parameter. But when Im using th:switch it doesn't work. Here is code.
<input
th:value="$role"
id="role"
type="text"
>
print value "MANAGER" which I sent from controller
<th:block th:switch="$role">
<ul th:case="MANAGER" class="list-unstyled components">
It doesn't work. Any suggestions ?
html switch-statement thymeleaf
Im sending one parameter from controller. Parameter role. In html using thymeleaf when I print thath parameter with th:value I got value of that parameter. But when Im using th:switch it doesn't work. Here is code.
<input
th:value="$role"
id="role"
type="text"
>
print value "MANAGER" which I sent from controller
<th:block th:switch="$role">
<ul th:case="MANAGER" class="list-unstyled components">
It doesn't work. Any suggestions ?
html switch-statement thymeleaf
html switch-statement thymeleaf
asked Mar 23 at 11:06
DinoDino
112
112
1
I think you need single quotes around MANAGER.
– Andrew
Mar 23 at 19:07
Why dont you use sec:authorize Spring Security features with thymeleaf. Here is an example mkyong.com/spring-boot/…
– Ahmet
Mar 26 at 8:15
add a comment |
1
I think you need single quotes around MANAGER.
– Andrew
Mar 23 at 19:07
Why dont you use sec:authorize Spring Security features with thymeleaf. Here is an example mkyong.com/spring-boot/…
– Ahmet
Mar 26 at 8:15
1
1
I think you need single quotes around MANAGER.
– Andrew
Mar 23 at 19:07
I think you need single quotes around MANAGER.
– Andrew
Mar 23 at 19:07
Why dont you use sec:authorize Spring Security features with thymeleaf. Here is an example mkyong.com/spring-boot/…
– Ahmet
Mar 26 at 8:15
Why dont you use sec:authorize Spring Security features with thymeleaf. Here is an example mkyong.com/spring-boot/…
– Ahmet
Mar 26 at 8:15
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313049%2fswitch-statement-in-thymeleaf-doesnt-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313049%2fswitch-statement-in-thymeleaf-doesnt-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I think you need single quotes around MANAGER.
– Andrew
Mar 23 at 19:07
Why dont you use sec:authorize Spring Security features with thymeleaf. Here is an example mkyong.com/spring-boot/…
– Ahmet
Mar 26 at 8:15