Quantcast
Viewing all articles
Browse latest Browse all 3523

Read metadata of a Class and function with their arguments information

Hi

 

I want to read a function's arguments and their type information.

 

By acquiring Metadata object, i can get the available public methods of a class in SAPUI5. But the metadata object does not tell me what arguments are accepted for the respective methods.

 

For example, i got an object of a sap.m.Button. Using button's getMetadata().getPublicMethods(), i get the list of available methods. The result will be something like this: getText, getWidth, getEnabled, getType, setType, setText, setWidth and so on.

 

I want to invoke setType method. But this Metadata object does not tell me what are the accepted arguments for this method.

 

How can I hold of this information either from framework, jquery or java script?

 

For example, in Web IDE, we display all these information in Layout Editor.

 

Image may be NSFW.
Clik here to view.
function_arguments_type_info.png

Thanks


Viewing all articles
Browse latest Browse all 3523

Trending Articles