Hi,
Iam using jdev 11.1.2.0.0
my scenario is i would like to set a command button as a default button in my page at the page load itself.
I can't use <af:form> tag here because af:form element belongs to the parent page and that we can only have a single af:form component per browser page else we will get error as multiple forms for single viewId.
I tried using java script as follows ... but at the time of page load, button is not set as default....after entering text into the input field then event is triggered and button getting clicked.
Javascript
function onClickEnterKey(inputEvent) {
if (inputEvent.getKeyCode() == AdfKeyStroke.ENTER_KEY) {
var inputTextField = inputEvent.getSource();
var defaultButton = inputTextField.findComponent('cb1');
var partialSubmit = true;
AdfActionEvent.queue(defaultButton, partialSubmit);
inputEvent.cancel();
}
}
Is there any possibility to achieve my scenario with out adding client Listener to input text field and making button as default one. Pease suggest me. Thanks in advance.
Regards
Alekhya