Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on 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 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.