In the Above scenarios i ignored the first one as it has disadvantages like bypassing the JSF life-cycle. Coming to the secound one, i am able to call the secound view by clicking enter on the input text by queuing a n button action programmatically. Theoretically i dont know how it solved the problem and iam sure SO(ADF) enthusiasts will be happy to hear from ADF experts.
As you can see(comment far right) in the javascript code in jspx file, i changed the "immediate" attribute of the AdfCustomEvent.queue() method to true, it solves my problem.
<af:resource type="javascript">
function handleEnterEvent(evt) {
var _keyCode = evt.getKeyCode();
//check for Enter Key
if (_keyCode == AdfKeyStroke.ENTER_KEY ){
var comp = evt.getSource();
var id=AdfPage.PAGE.findComponentByAbsoluteId('d1');
AdfCustomEvent.queue(id, "EnterEvent",{fvalue:comp.getSubmittedValue()},true); <-- changed from false to true.
evt.cancel();
}
}
</af:resource>
<af:serverListener type="keyboardToServerNotify"
method="#{backingBeanScope.JJS.handleKeyboardEvent}"/>
PS:i am open to suggestions.
Thanks