Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Importing java beans with java.util.List properties

How do you import a simple Java Bean class which has List or Collection properties?

It's already fairly easy to import a java command bean which returns basic data types (int, boolean, String, ..). But as soon as the getter/setter inside the bean returns a java.util.List or other more complex data types, the Web Dynpro java bean importer will import that type as a Relationship. At that point, the import wizard forces us to select a model type but only the bean class itself is visible as a choice.

So, what's the mechanism to import simple java bean which have collection properties.

For instance, how to import this bean as a Model?

class MyBean_GetBooksCommand {

private java.util.ArrayList _books;

public void setBooks(java.util.ArrayList books) {

_books = books;

}

public java.util.ArrayList getBooks() {

return books;

}

}

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question