java - Does spring form taglib disabled attribute really have to resolve to a string? -


I have recently been playing with spring form taglib and came face to face with a very troubling incident.

  & lt; Form: Select path = "whatever" disabled = "$ {true}" & gt;  

will provide a selected element which is not disabled

  & lt; Form: Select Path = "Whatever" disabled = "$ {'true'}" & gt;  

will render a selected element which is disabled.

This indicates to me that the tag expects a string in that attribute, and possibly the Boolean values ​​

have the effect that I which happens quite often in our system.

Am I just missing part of the functionality of the form taglibs? Is this a legitimate design decision? a bug?

OK, I dig some other around this one, because the work was also visible around Unattractive.

The problem was that JSP was evaluating L, and using "true" is comparing it with the eyes of the result of that assessment. Par value

Comparison Using a method, a string for a boolean will always return false as the type does not match, so it is definitely a defect.

Fortunately, the passive method at fault is a protected liner, so I work by overriding that method to increase the effect of 8 input tags and make a slightly stronger comparison.

So the answer is yes, this is a flaw, and from Schaffen's comments it seems that this is a

thanks for your answer people


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -