الانتقال إلى المحتوى
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.

الحصول على قيمة من Database Function

Featured Replies

بتاريخ:

السلام عليكم


قمت بعمل method في ال AM داخل AppmoduleImpl class لاستدعاء DB functionللحصول منها على اسم الموظف بدلالة رقمه قمت باضافتها الى client interface ونص الميثود كالتالي:



public String getEmployeeName(int empId)
{
CallableStatement cs=null;
try
{
cs=getDBTransaction().createCallableStatement("begin ? := GETEMPNAME(?); end;",0);
cs.registerOutParameter(1, Types.VARCHAR);
cs.setInt(2, empId);
cs.executeUpdate();
return cs.getString(1);
}
catch(SQLException e)
{
throw new JboException(e);
}
}
وعايز استخدم هذه الميثود على الصفحة بمعنى ان اضع Input text ,output text,button وعند وضع قيمة في الInput والضغط على الزر ارجع اسم الموظف في output text؟

انا استخدمت طريقة ان اسحبها من Data control وظبطت معي بس انا عايز استقبل القيمة في variable او output text بحيث اتحكم فيها زي مانا عايز

وشكرا جزيلا

بتاريخ:

دة مثال
على button

   public void getVal(ActionEvent actionEvent) {
       DCBindingContainer bc =
           (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
       OperationBinding check = bc.getOperationBinding("getEmployeeName");
       String result = check.execute();
System.out.println(check );
       if (check.getErrors().isEmpty()) {
// do the action you want
}

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

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

دة مثال
على button

public void getVal(ActionEvent actionEvent) {
	DCBindingContainer bc =
		(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
	OperationBinding check = bc.getOperationBinding("getEmployeeName");
	String result = check.execute();
System.out.println(check );
	if (check.getErrors().isEmpty()) {
// do the action you want
}




شكرا اخ طارق
والحقيقة انا لقيت الحل في كتاب اوراكل
وهو عن طريق استخدام instance from AppModule كالتالي
String amDef = "Mypackage.model.MyAppmod";
String config = "MuappModuConfig";

MyAppmod myam =
(MyAppmod)Configuration.createRootApplicationModule(amDef,config);
myam.method_nme;
بتاريخ:

احل بتاعك احسن من الحل بتاعى كتير جدا
انا جربته
شكرا جدا على الافادة

بتاريخ:

الأخ visiterman:
الحل الذي ذكرته به مشاكل في الأداء لأنه في كل مرة يقوم بتحميل الملف AppModule وهذا يستهلك جزءاً كبيراً من الذاكرة كما أنك لم تقم بإغلاق الملف وبالتالي لن تتحمل عدد كبير من المستخدمين

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

الأخ visiterman:
الحل الذي ذكرته به مشاكل في الأداء لأنه في كل مرة يقوم بتحميل الملف AppModule وهذا يستهلك جزءاً كبيراً من الذاكرة كما أنك لم تقم بإغلاق الملف وبالتالي لن تتحمل عدد كبير من المستخدمين


اولا شكرا للاخ طارق

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

هذا الحل مذكور في كتب أوراكل في البرامج التي تعمل من خلال دالة main أي أنها Desktop Application وليس من المفترض استخدامها في أنظمة الوب

بتاريخ:

هذا الحل مذكور في كتب أوراكل في البرامج التي تعمل من خلال دالة main أي أنها Desktop Application وليس من المفترض استخدامها في أنظمة الوب

و ما الحل البديل؟
انا بستخدم نفس الحل دة فى ال jsf

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

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

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

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

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

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.