Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get the JET component type from a DOM element?

Leslie WuApr 11 2016 — edited Apr 12 2016

for example, I define a JET button like this:

<button id= "button" data-bind="click: buttonClick,

     ojComponent: { component: 'ojButton', label: 'A button element' }">

</button>

When I get the button DOM element in HTML, how can I get the JET component type of this DOM element?

In this example, I want to get "ojButton" as the result.

Is there any JET api for this?

And I come up with a way to get this, which is to analysis the value of 'data-bind' attribute coz it contains component definition.

But I don't know if this method is stable and if component definition will always display in HTML code at client side.

This post has been answered by Jim.Marion-Oracle on Apr 12 2016
Jump to Answer
Comments
Post Details
Added on Apr 11 2016
4 comments
560 views