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 avoid a oj-button submit the page?

AlexiswcgDec 23 2019 — edited Dec 25 2019

Hi,

I was testing Oracle JET components in APEX and I found that when a oj-button is used the page is submitted when the button is clicked.

I took a look in the oj-button code and it executes a e.preventDefault but the page still is submitted, this only happens in APEX.

I know that if I add the attribute type="button" to the HTML button it stops the submit problem but when you use a oj-button the button's HTML node is created until the oj-button is created so I would have to add this attribute with jQuery and I think is not the best approach.

This is the oj-button HTLM code:

<oj-button id='startButton' value='{{checkedState["start"]}}' on-oj-action='[[startDrawer]]'>Start

</oj-button>

Example of error:

https://apex.oracle.com/pls/apex/f?p=79381:13:715267633718055:::::

My code is the same than the cookbook for the basic off canvas example.

https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=offcanvas&demo=basic

Is there a way to avoid this? I'm missing some configuration?

APEX version: 19.2

Oracle JET(The one included with APEX 19.2): 0.7.2

Thanks for your time.

Regards.

This post has been answered by John JB Brock-Oracle on Dec 23 2019
Jump to Answer
Comments
Post Details
Added on Dec 23 2019
7 comments
941 views