الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ضغط زر Enter

Featured Replies

بتاريخ:

السلام عليكم :

لدي jsff استخدمه كواجهة Login  كيف استطيع تنفيذ حدث الضغط على زر دخول عن طريق ضغط زر Enter  على ال inputext

تم تعديل بواسطة ali alshaa

بتاريخ:

استخدم خاصية defaultButton

بتاريخ:
  • كاتب الموضوع

شكرا لك .. ماهي طريقة الاستخدام في صفحة JSFF .... بحثت كثيرا لم تنجح معي كافة المحاولات 

بتاريخ:

في هذه الحالة تستخدم javascript

بتاريخ:
  • كاتب الموضوع

شكرا لك قمت باستخدام JavaScript

ووضعت الكود التالي :

<af:resource type="javascript">
                        function myOnkeyPress(componentEvent) { 
                        var evt =componentEvent.getNativeEvent();        
                        var keyCode = AdfAgent.AGENT.getKeyCode(evt);
                        if (AdfAgent.AGENT.getKeyCode(evt) == 13)
                           {
                        alert(" Hi")  ;
                         
                       
                       var button = AdfPage.PAGE.findComponentByAbsoluteId('cb2');
              
                  AdfActionEvent.queue(button, button.getPartialSubmit());
                    
                         }
                         }
    </af:resource>
بتاريخ:
  • كاتب الموضوع

عندما أضغط على ال inputText تظهر لي رسالة الترحيب ولكن لاينفذ حدث ضغط الزر ( هل يوجد مشكلة في الكود السابق؟؟)

بتاريخ:
  • كاتب الموضوع

هذا هو كود صفحة ال JSFF بالكامل  :

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:f="http://java.sun.com/jsf/core">
 
   <af:resource type="javascript">
                        function myOnkeyPress(componentEvent) { 
                        var evt =componentEvent.getNativeEvent();        
                        var keyCode = AdfAgent.AGENT.getKeyCode(evt);
                        if (AdfAgent.AGENT.getKeyCode(evt) == 13)
                           {
                        alert(" Hi")  ;
                         
                       
                       var button = AdfPage.PAGE.findComponentByAbsoluteId('cb2');
              
                  AdfActionEvent.queue(button, button.getPartialSubmit());
                    
                         }
                         }
    </af:resource>
    
  <body bgcolor="#c60063"><af:panelGridLayout binding="#{backingBeanScope.backing_Login.pgl1}"
                                      id="pgl1">
      <af:gridRow marginTop="5px" marginBottom="5px" height="auto"
                  binding="#{backingBeanScope.backing_Login.gr1}" id="gr1">
        <af:gridCell marginStart="5px" width="dontCare"
                     binding="#{backingBeanScope.backing_Login.gc1}" id="gc1">
          <af:panelGroupLayout id="pgl3" layout="vertical" valign="middle"
                               halign="center"
                               binding="#{backingBeanScope.backing_Login.pgl3}"
                               inlineStyle="width:403px; height:166px;">
            <af:spacer width="10" height="200"
                       binding="#{backingBeanScope.backing_Login.s2}" id="s2"/>
            <af:panelFormLayout id="pfl1"
                                binding="#{backingBeanScope.backing_Login.pfl1}"
                                inlineStyle="width:366px; border-style:groove;">
              <af:spacer width="10" height="10"
                         binding="#{backingBeanScope.backing_Login.s6}"
                         id="s6"/>
              <af:panelGroupLayout binding="#{backingBeanScope.backing_Login.pgl2}"
                                   id="pgl2">
                <af:spacer width="60" height="5"
                           binding="#{backingBeanScope.backing_Login.s1}"
                           id="s1"/>
                <af:outputText value="#{labelsrc.LOGINTITLE_LABEL}" id="ot1"
                               inlineStyle="color:Black; font-size:medium; font-family:'Times New Roman'; font-weight:bold;"
                               binding="#{backingBeanScope.backing_Login.ot1}"
                               visible="true"/>
              </af:panelGroupLayout>
              <af:spacer width="10" height="10"
                         binding="#{backingBeanScope.backing_Login.s3}"
                         id="s3"/>
              <af:inputText id="it1" columns="30" autoSubmit="true"
                            binding="#{backingBeanScope.backing_Login.it1}"
                            label="#{labelsrc['model.VO.UsersForAddView.UserName_LABEL']}"
                            value="#{backingBeanScope.backing_Login.usernameInput}"
                            showRequired="true"
                            inlineStyle="font-size:small; font-family:'Times New Roman'; font-weight:bold; color:Black;"
                            contentStyle="font-size:medium; font-family:'Times New Roman'; font-weight:bold;"/>
              <af:inputText label="#{labelsrc['model.VO.UsersForAddView.UserPassword_LABEL']}"
                            id="it2" columns="30" autoSubmit="true"
                            secret="true"
                            binding="#{backingBeanScope.backing_Login.it2}"
                            value="#{backingBeanScope.backing_Login.passwordInpu}"
                            showRequired="true"
                            inlineStyle="font-size:small; font-family:'Times New Roman'; font-weight:bold; color:Black;"
                            contentStyle="font-size:medium; font-family:'Times New Roman'; font-weight:bold;">
                <af:clientListener method="myOnkeyPress" type="keyPress"/>
              </af:inputText>
              <af:panelGridLayout binding="#{backingBeanScope.backing_Login.pgl4}"
                                  id="pgl4">
                <af:gridRow marginTop="5px" marginBottom="5px" height="auto"
                            binding="#{backingBeanScope.backing_Login.gr3}"
                            id="gr3">
                  <af:gridCell marginStart="5px" width="34%"
                               binding="#{backingBeanScope.backing_Login.gc7}"
                               id="gc7"/>
                  <af:gridCell marginStart="5px" width="dontCare"
                               binding="#{backingBeanScope.backing_Login.gc8}"
                               id="gc8">
                    <af:panelGroupLayout binding="#{backingBeanScope.backing_Login.pgl5}"
                                         id="pgl5" layout="horizontal">
                      <af:spacer width="10" height="30"
                                 binding="#{backingBeanScope.backing_Login.s4}"
                                 id="s4"/>
                      <af:commandButton text="#{labelsrc.LOGINTITLE_LABEL}"
                                        binding="#{backingBeanScope.backing_Login.cb2}"
                                        id="cb2"
                                        action="#{backingBeanScope.backing_Login.LoginAction}"
                                        iconPosition="leading"
                                        windowEmbedStyle="inlineDocument"
                                        inlineStyle="font-size:small; font-family:'Times New Roman'; font-weight:bold;"
                                        partialSubmit="true"
                                        clientComponent="true"/>
                      <af:spacer width="10" height="10"
                                 binding="#{backingBeanScope.backing_Login.s5}"
                                 id="s5"/>
                    
                    </af:panelGroupLayout>
                  </af:gridCell>
                  <af:gridCell marginStart="5px" marginEnd="5px" width="33%"
                               binding="#{backingBeanScope.backing_Login.gc9}"
                               id="gc9"/>
                </af:gridRow>
              </af:panelGridLayout>
              <f:facet name="footer"/>
            </af:panelFormLayout>
            <af:commandButton text="Execute"
                              disabled="#{!bindings.Execute.enabled}"
                              binding="#{backingBeanScope.backing_Login.cb1}"
                              id="cb1"
                              action="#{backingBeanScope.backing_Login.exerotingtable}"
                              visible="false"/>
          </af:panelGroupLayout>
        </af:gridCell>
        <af:gridCell marginStart="5px" marginEnd="5px" width="dontCare"
                     binding="#{backingBeanScope.backing_Login.gc2}" id="gc2">
          <af:image source="/images/bg.png"
                    binding="#{backingBeanScope.backing_Login.i1}" id="i1"
                    inlineStyle="width:900px; height:570px;"/>
        </af:gridCell>
      </af:gridRow>
    </af:panelGridLayout>
         
  </body>
  <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Login-->
</jsp:root>
بتاريخ:

يوجد في جافا سكلريبت كود للضغط على زر برمجياً

ابحث عن هذا الكود وهو ما تكتبه في الدالة

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.