Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
When using the NWDS CE, we can create a model for Web Dynpro based on Enterprise Java Bean, this is very good for developers that access services using EJB instead only RFC Models.

I'm using Web Dynpro to develop many GUI for EJB backend, I'll explain the situation that has conduced my proposal.

For this scenario an Entity (Foo)  and a Session Bean (FooService) will be used:

Foo (Entity)

 

 FooServiceBean (SessionBean)

After, the import of EJB Model can be done on Web Dynpro. After import of Model we have the model like bellow image:

 

Suppose we have some requirements to Web Dynpro UI like: beginDate (dd/MM/yyyy), name(len=30 and UPPERCASE)  to do it, we need to create two new types, FooDate and FooName on dictionary with the specified requirements. After create the types, just associate it with the model Foo object.

 

Now, the Web Dynpro UI will get the definitions to render the components.
But try to modify the model and do a reimport of EJB Model, we will see that model will be recreated, and the definitions will lost.
I will change the Foo entity including a new property. After reimport the model will apppear like bellow.

So we need to set the type again, it is a inconvenient and a source of errors on delivery of application, the developer can forget of set the types and it can cause UI appears like no desired.

My proposal is that specific Annotations for Dictionary type were created and used like pseudo code bellow:

 

On the pseudo code, we can see the annotation SapDict, so when the import or reimport model occurs the type can be created/setted based on attribute annotation.

Pros: The large development with EJB and Web Dynpro can be more productive.

Cons: With this solution the POJO will be annotated with SAP specific, so the dependency must be considered to deploy EJBs on other server.

2 Comments