cancel
Showing results for 
Search instead for 
Did you mean: 

Importing an array type into WebDynpro

Former Member
0 Kudos

Dear all,

I need to know if WebDynpro are able to solve this problem:

I have a bean with some fields and for everyone I have getter and setter methods. These methods are String and Integer and when I import the bean into WD using "Create Model -> Import JavaBean Model" I'm able to see them and to use them into WD.

In the bean I have also this field:

private String[] flintstones ={"Fred", "Wilma", "Pebbles"};

When I import a model in WD I see all field but i don't see this. Are WD not able to import structured type like an array?

Please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Try use Vector instead Array. And vector must contain object of some bean (other or same).

Eq. your main bean is FlinstonesBean and vector contains elements on FlinBean.

In same model import both beans and in getFlintstones in Model Class put FlinBean

Former Member
0 Kudos

Have you defined a get method for this private class variable?

public String[] getFlintstones() {

return this.flintstones;

}

Can you see this method and use it in your WD app?

regards,

Dion

Former Member
0 Kudos

Of course, getter and setter method just inserted, but WD doesn't see them:

public String[] getFlintstones() {

return flintstones;

}

public void setFlintstones(String[] strings) {

flintstones = strings;

}

The question is very important, SAP permits the creation of EJB, Bean, etc. etc. but, at the end, WD aren't able to see what they return!!! Possible?

Vito Palasciano

Former Member
0 Kudos

Hi Vito,

have you tried reimporting your ejb in your WB app after you inserted the methods?

regards,

Dion

Former Member
0 Kudos

Yes,

I have reimported the JAR after apporting changes. But only new simple field (like String and Integer) are sow. Arrays are invisible to a WB.

Vito

Former Member
0 Kudos

Hi,

has anybody come up with a solution? I am facing the same problem to fill a dropdown listbox.

Thanks,

Kevin