Skip to Content
author's profile photo Former Member
Former Member

Cannot get user input from dynpage component

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 17, 2005 at 11:02 AM

    Hi Sebastian,

    Try this;

    DropdownListBox dropdown = (DropdownListBox)this.getComponentByName("date_operators");

    String selection = dropdown.getSelection();

    I hope it helps,

    Patrick.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 17, 2005 at 11:29 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 17, 2005 at 12:11 PM

    Fixed it! Mistyped an integer name!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.