• Post Reply Bookmark Topic Watch Topic
  • New Topic

in my jsp it doesnt display the message see the code spring mvc  RSS feed

 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my ui i will i will select enabled or disabled then it will go in controller , i already debug it and it goes on the right controller based on what i select on ui my problem is when i select disabled it dont display the message but when i select enabled it displays the message, then i check the databases status is change based on what i select but when i change into disabled doesnt display any message


if select enabled will go in controller then change status into true then update the status then will see the message in ui


if select disabled will go in controller then change status into false then update the status then will see the message in ui




in my jsp page



The main functionality of enabled /disabled is both working it just dont display the message if i change it into disabled thank you
 
K. Tsang
Bartender
Posts: 3632
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I see, the problem is on line 2 of the JSP code.



 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:From what I see, the problem is on line 2 of the JSP code.





i also try this one and i got the same issue thank you

 
K. Tsang
Bartender
Posts: 3632
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually your original code is fine but what value is "disabled"? It is false right?

Passing in false into if gives....
 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:Actually your original code is fine but what value is "disabled"? It is false right?

Passing in false into if gives....


yes it is false just wondering why it dont display in ui when my i choose disabled, i try to interchange the output message based on selection just for testing enabled = (disabled message will display) disabled =(enabled message will display) but same scenario happen thank you
 
K. Tsang
Bartender
Posts: 3632
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to switch the output around.

As you put it the "disabled" value is false hence the message not display. Negating the result would allow you to see the message if the disabled is selected.

 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes but if that's what i put i will always have a disabled value cause i try it it always show disabled now even i select enabled

the error in controller in "showdisabled,false" it should be true , if false send in ui no display if true will have a display , thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!