on 02-17-2005 10:48 AM
Hi!
What I am basically trying to do here is have a dynpage with a drop-down list of choices. I have the drop-down list placed within a gridlayout in the doProcessBeforeOutput() method where I assign an id to it. In my onSubmit() method I try to get the chosen input from the list like this:
AbstractDataType drop_down = context.getDataForComponentId("date_operators");
String str = drop_down.toString();
This is using the exact same id as when I first created the drop-down list, but for some reason drop_down in the code above is null. Why is this happening? Is it maybe because the list is in a GridLayout? Am I placing the calls in the wrong dynpage method? I would really appreciate any ideas on this.
Cheers,
--Sebastian
Hi Sebastian,
Try this;
DropdownListBox dropdown = (DropdownListBox)this.getComponentByName("date_operators");
String selection = dropdown.getSelection();
I hope it helps,
Patrick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fixed it! Mistyped an integer name!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think my previous post got through. Our server is acting funny. What I said was: thanks a lot, it really worked. I tried the same approach on an InputField, of course using the toString() method, but although I type things in the field, only null is found. I can't understand it, really. Maybe you have some ideas about this as well?
Cheers,
--Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.