Possible Duplicate:
<h:selectOneListbox disabled=true causing NullPointerException
I didn’t really know what to searc for, and it does sound a little bit strange to me.
If I am disabling an input type=textfield item with
$('#kundennr').attr("disabled","disabled");
and my form is calling an Servlet, in which I want to read the value of my field kundennr
it gives me a Nullpointerexeption. But if I let the field enabled, it gives me the Value of the field
request.getParameter("kundennummer");
So how can I disable an input field, without having an nullpointer in my Java Servlet?
A disabled element in the DOM is ignored upon submission, you’ll want to set the readonly attribute instead.
Please keep in mind that anything that is submitted from the client might be subject to manipulation (e.g. I could alter that number and send it to you regardless of you making it readonly), so make sure to validate any critical information server-side before acting upon it!