You need to sign in to do that
Don't have an account?
d3developer
Visualforce component nullifies width and height variables
Vaguely recall seeing this before but couldn't find any previous discussion so here we go:
If you use a variable named "width" or "height" in your Visualforce component the value will be reset to null (or to an empty string) even if you initialize it.
Example controller method:
public void init() { height = '200'; }
Example visualforce page:
height: {!height}
Example output:
height:
Solution:
Use a different variable name.
All Answers
Solution:
Use a different variable name.
"Doctor, it hurts when I do this!"
"So don't do that."
I try to avoid using short, common words as properties, so as not to run into stuff like this. I bet it was fun troubleshooting this problem, though! Thanks for sharing.
Jeremy
thanks for the encouragement!
I just hope that some googling developer gets the right thread identifying the problem so they don't make as many holes in the wall as I do (some times the wall loses, sometimes it is my head).
Same behavior for "rowNumber"
And "rowOptions"
Crazy!