I have a device page where a user inputs a device name and optionally, latitude and longitude for the device. Here is the relevant code from the
jsf page:
The values of these latitude and longitude fields are taken and posted to some xml on a web service through this
java code (the relevant part):
If I put in a device, let's say named ABBA, and put in values for the lat and lng fields, like 100 and 122, it results in this xml:
Just like it should. However, if I leave the latitude and longitude fields blank it results in this xml:
When I need it to result in this xml:
So I'm not sure if this means I need to make a change in the java code, which seems like it will be more difficult, or a change in the jsf code, which I am hoping because it seems like it would be a simple thing like just adding some attribute.
Thinking about it, it may be simple to do this through the java code, doing something with an if statement and only do device.setProperties(properties); if lat and lng are not null.
I think I probably just solved this so I am about to try it out, but if there is a way to do it through the jsf please let me know. Should I maybe remove immediate=true from those two input fields?