Currently Being Moderated
Fareez Ahamed

A Closer Look at Custom UI Element

Posted by Fareez Ahamed in Web Dynpro ABAP on Apr 14, 2012 12:21:39 PM

I have always tried to compare various technologies and identify each one’s pros and cons. It gives a clear idea about the new technology we learn when comparing the already known ones. For the people who have not seen tiger, it would be wise to say ‘Tiger looks similar to cat but large in size’ rather than explaining tiger’s features word by word without any comparison with any other thing. While in my case, I am a Java programmer by nature and was introduced to ABAP. While I study ABAP (especially Web Dynpro ABAP), I try to relate it with something I know already. In such process, I sometimes find some of the features missing in one technology compared to the other and I also try to bring the missing one.

 

I have tried to port something from SAP to Java (Search Help for Java) and now I wish to discuss about one feature of Java which would be great if we had in Web Dynpro ABAP. It’s about custom components.

 

Java is one of the best environments to create custom UI components. Having worked in many Java Swing applications, I find the JFC classes are best made for reusability and custom component development. All the JFC UI elements are JavaBeans complaint. Hence making use of the custom components is easy as well. When you create your own component, you can add it to visual form building tool which treats your custom component similar to the one the system has. My own component can have its own properties which can be unique to it; still it would be displayed on the properties list of the component instance.

 

Making use of one component in another is very much possible in Web Dynpro ABAP. But I find certain limitations to that. Say, I create a component which shows the rating in ‘No. of stars’ representation, I can use it in another component by embedding the view to a ViewUIElementContainer and pass the values to interface controller. It works. But when I want to show a table of values along with their ratings, I can’t. Because you can’t set a ViewUIElementContainer as a table cell.

 

Recently I took a tour into the UI Elements classes of Web Dynpro ABAP and I wrote the article UI Element Hierarchy. I was so much impressed with the design of those classes. They seem perfect for reusability and for creating custom components as well. You can just inherit an already existing UI element class and add functionalities to it. It also seems it is very much possible to create components as good as in Java. One thing that bothers is creating new properties and creating bindings for them. If these custom components can be added to the tool box and the property lists new custom properties of the component (similar to NetBeans in the case of Java), it would be so nice and a variety of components can be created by developers and shared. Web Dynpro applications will get a lot richer with the variety of components available.

 

We need such features to overcome certain circumstances like the star rating one which I described earlier. If what I'm telling technically feasible and not against the policy of SAP, I hope they would come up with this feature in future.

 

- Fareez Ahamed

Comments

Actions

Filter Blog

By author:
By date:
By tag: