Dear Experts,
I have an <af:button/> that I wish to hide using javascript. I have the following setting:
- ADF fusion application.
- 1 bounded Task flow.
- 1 fragment page (*.jsff).
- 1 button on screen.
- 1 *.jsf page to run the taskflow as region.
On click of this button, I want it to disable itself. To achieve this, I added the following resource tag:
<af:resource type="javascript">
function disableField(actionEvent) {
var cButton = actionEvent.getSource().findComponent('r1:0:b1');
cButton.setProperty("rendered", true);
}
</af:resource>
The first thing is that I had to pass the button id as "region:0: button id", I don't know why it's only accepting this as id. If I put only the id of the button (b1), it will not be recognized.
- On click of the button, configured as:
<af:button text="button 1" id="b1">
<af:clientListener method="disableField" type="click"/>
</af:button>
but the button is not being disabled. Can someone kindly point me to the right direction?
Best Regards,