1 Reply Latest reply: Apr 21, 2013 8:13 AM by Daniel Merchán RSS

    enable press enter key  in jsff fragments

    1004362
      Hi ,
      I am new to adf,I am having a popup with user password and submit button ..which is inside the fragmets .jsff...and need to submit on pressing ENTER key also need to call the managed bean class to get these user name and password..I tried with serverlistener but not working...
      I surfed the internet but I dont get the idea of how to use the javascript here...can any one help me out for sample code....default command property on the calling jsf page is not working as I am not aware of what are the naming containers in my environment...(A previous guy in this job had coded half so I cannot use the login stuff in jspx or in af:form)...
      please help


      I am using jdeveloper 11.1.1.6..


      My code ..I got the environment where the jspx page contain bounded task flow within which I have a jsff
      Home.jspx :
      <?xml version='1.0' encoding='UTF-8'?>
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
      <af:document id="d1">
      <af:form id="f1" defaultCommand="r1:cl1:popup123:cb1">
      <af:panelStretchLayout id="psl1">
      <f:facet name="center">
      <!-- id="af_one_column_stretched" -->
      <af:region value="#{bindings.taskflowdefinition1.regionModel}"
      id="r1"/>
      </f:facet>
      </af:panelStretchLayout>
      </af:form>
      </af:document>
      </f:view>
      </jsp:root>


      My Login.Jsff have commandlink which will call af:popup....I need to send the user name password to bean class....

      <?xml version='1.0' encoding='UTF-8'?>
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
      xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
      xmlns:f="http://java.sun.com/jsf/core" version="2.1">



      <af:panelGroupLayout layout="scroll"
      xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
      id="pgl1" >
      <af:commandLink text="commandLink 1" id="cl1" clientComponent="true">
      <af:showPopupBehavior popupId="popup123" triggerType="action" ></af:showPopupBehavior>
      </af:commandLink>

      <af:popup id="popup123" clientComponent="true" >
      <af:inputText label="user" id="it1" />
      <af:inputText label="pass" id="ps"/>
      <af:commandButton text="submit" id="cb1">
      <af:clientListener method="customJsFunction" type="action"/>
      <af:serverListener type="mycustomserverEvent" method="#{loginBean.doLogin}"/>
      </af:commandButton>
      </af:popup>
      </af:panelGroupLayout>

      </jsp:root>

      Its urgent please help..


      Thanks in Advance ,
      kumar

      Edited by: 1001359 on 21-Apr-2013 01:15

      Edited by: 1001359 on Apr 21, 2013 1:25 AM