Skip to Content
avatar image
Former Member

Can not create a method which return string array in controller

I want to create a method which can return string array in a custom controller. But the "Array type " checkbox has no effect. The generated method is not array type.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 17, 2004 at 05:54 PM

    Hi, Jun

    you can create a method, which returns an array of String, but you have to use the Java Native Type option instead of the builtin string, which is available in the dropdown list. Here is how you can do that:

    1. "New" method on the methods page of the target controller like you've already done.

    2. After specifying the name, press the "..." button.

    3. Choose Java Native Type and Browse...

    4. Type in String, select "java.lang.String" and choose OK

    5. Choose "Finish".

    6. and finally, activate the Array type checkbox and accept the 1.

    Hope that helps.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded