Showing results for 
Search instead for 
Did you mean: 

Can not create a method which return string array in controller

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.