I have this in a class:
private ArrayList[] devices;
I need to know how to add values to this devices ArrayList.
when I type devices. nothing pops up after the period (I expected a .add or something like that)
This is only one small step to making this do what i actually need it to. I have a
jsf page where a user enters something into a text field (a
String). Then I have some xml, one of the lines being this:
<devices class="java.util.ArrayList" />
under that tag will be <device>somevalue</device>
So that is why I have declared ArrayList[] devices. The ultimate goal is to take whatever the user enters in the text field, assign that to SrrayList[] devices, which will then post to the web service under the <devices class="java.util.ArrayList" /> tag.
But for now, I just want to manually assign some text value to ArrayList[] devices. Can soeone tell me how to do so please?
edit - the probelm is I guess, I have a setDevices method. But the only thin I can pass to this method is an ArrayList[]. The problem with that is that the user is inputting a String, not an ArrayList[]. So it seems simple, but all I need to happen is to take the String the user inputs and add it to the ArrayList[] devices variable