and maybe more,
the first reason is because it is EID Al Adha, and instead for writing again and agian about it, i will just refer to
http://oraclejo.blogspot.com/2008/09/eid-dj-vu.html.
and for the second Eid, it about some technical issue that i figured about ADF technology. If you are not familiar with what Oracle ADF is, stop reading because this is not for YOU, or continue at our own risk
Well, i spend the day yesterday fiddling around with ADF binding concepts until i believe i have got it all figured out. I was working with this technology for quite sometime (only from out of the box) but since i am asked to do some consulting job next week in Kuwait, i have been doing nitty gritty details and trying to come done to core of the material.
I have designed two pages one based on on Table DEPT and with the following page definition information
Page definition name ="untitled1PageDef"
iterator name ="deptView1Iterator"
and the other is page is based on TRADE table with the following page definition information
Page definition name ="untitled1PageDef"
iterator name ="tradeView1Iterator"
A trivial scenario would be to read some page1 attribute (Text item) from page1 while running page one. All ADF programmers must have encountered this situation and have done it many times through several different solution. The solution i pick is a solution that i can always use and a solution that depends on the basics (No Eid here)
FacesContext ctx = FacesContext.getCurrentInstance();
Application app = ctx.getApplication();
ValueBinding bind = app.createValueBinding("#{data}");
BindingContext bindingCtx = (BindingContext)bind.getValue(ctx);
DCBindingContainer dcb = (DCBindingContainer)bindingCtx.findBindingContainer("untitled1PageDef");
DCIteratorBinding Iter = dcb.findIteratorBinding("DeptView1Iterator");
String attr =Iter.getCurrentRow().getAttribute(2).toString();
(note: i know that there are short cuts that would probably eliminate a few lines of code, but at the expense of hiding the basics).
Now, let us move to the following situation. I am running page1 and selected a specific row, and i am moving to page 2 and i am required to find an attribute of on page 1 (which i have already left) . Well many techniques exist and most of them depend on other standard web techniques like using Session Variables, or ADF actions set Action listener etc..
The basic concept in ADF relies on a model object that holds that sources based on View Object. Since view objects are already instantiated by the Application Module and their data is persistent as long as the application module is alive, and since such objects are bound to ADF iterator binding in the binding containers, then, its only makes sense that we should be able to read the iterator binding of any visited page definition.
Well, during my past readings , i came to know more things about iterator binding, that i undermined at that time. The Literature about ADF iterator binding says, that after the completion of the JSF and ADF lifecycle, the framework unbinds the iterator binding from its data source and rebinds it again when the page is loaded again. This is done automatically to save resources. This of course does not cause the loss of any data, because the view object is still there in the model layer. It is only the iterator binding pointer is not there and in most cases, it needs not be there since at that time the user is on a different page
So, for now, page2 is displayed on the screen and there is a button on page2 screen and i want to read information from page1, the same information that i read when i was already on page 1.
An innocent attempt would be to use the same code as before, and if you do, you will face a NullPointer exception when you run
DCIteratorBinding Iter = dcb.findIteratorBinding("DeptView1Iterator");
Because as i explained earlier the binding iterator of page 1 (DeptView1Iterator) is not bound after the page lifecycle is complete even though the iterator itself exists?? It will be bound during the iterator refresh step during page reload.
Well, then i can find some why to manually refresh the iterator binding, i should be able to accomplish what i want, and Eureka, after some brain drain investigating, i found it
call getRowSetIterator();
and then I included the above call in my code with my fingers crossed, and the Second Eid emerged for me , it worked like a charm
FacesContext ctx = FacesContext.getCurrentInstance();
Application app = ctx.getApplication();
ValueBinding bind = app.createValueBinding("#{data}");
BindingContext bindingCtx = (BindingContext)bind.getValue(ctx);
DCBindingContainer dcb = (DCBindingContainer)bindingCtx.findBindingContainer("untitled1PageDef");
DCIteratorBinding Iter = dcb.findIteratorBinding("DeptView1Iterator");
String attr =Iter.getRowSetIterator().getCurrentRow().getAttribute(2).toString();
//simialr to DCBindingIterator Iter = (DCBindingIterator)Iter.get("binding iterator)
DCIteratorBinding Iter1 = dcb.findIteratorBinding("tradeView1Iterator");
String attr2 =Iter1.getRowSetIterator().getCurrentRow().getAttribute(2).toString();
System.out.println(attr);
System.out.println(attr2);
The getRowSetIterator() binds it again to the data control and hence it now points to current row of the view object (which would be the row you selected in the previous page when you navigated out of it)
Since I became more confident about my knowledge, i thought, ok what if the user ran page2 immediately without running page 1, and tried to access some data from page (1).
There is no data in page 1!!! and that is exactly the case, running the above code would legitimately yield NullPointer Exception. To demonstrate my understanding, i thought i would manipulate the code is a way, that in case the user skipped page1 , it only makes sense to say that in this case, the current row of the first page would be the first row in the view object, I figure what if i execute a query of the first page iterator after accessing it using
Iter.executeQuery();
Again, it worked like a charm
FacesContext ctx = FacesContext.getCurrentInstance();
Application app = ctx.getApplication();
ValueBinding bind = app.createValueBinding("#{data}");
BindingContext bindingCtx = (BindingContext)bind.getValue(ctx);
DCBindingContainer dcb = (DCBindingContainer)bindingCtx.findBindingContainer("untitled1PageDef");
DCIteratorBinding Iter = dcb.findIteratorBinding("DeptView1Iterator");
String attr =Iter.getRowSetIterator().getCurrentRow().getAttribute(2).toString();
//simialr to DCBindingIterator Iter = (DCBindingIterator)Iter.get("binding iterator)
DCIteratorBinding Iter1 = dcb.findIteratorBinding("tradeView1Iterator");
Iter1.executeQuery();
String attr2 =Iter1.getRowSetIterator().getCurrentRow().getAttribute(2).toString();
System.out.println(attr);
System.out.println(attr2);
I know it means nothing to most of you, but it sure does to me and others in who opt to understand the framework that way i want ....
Which brings up a new reason why it a Eid, well, right now, at about 8:10 PM, we are leaving home and heading for a 36 hours vacation at Aqaba, a decision taken at the spur of the moment
Happy Me
Friday, November 27, 2009
Saturday, November 21, 2009
Significant leap forward
Exciting experiments shall shed light on the Big Bang theory that explains how the world started.
Ammar Sajdi
www.realsoft-me.com
www.e-ammar.net
Monday, October 26, 2009
Disappointed -- Twice
Once in Dubai, and the other one in Windows 7
As usual, GITEX runs in October and our company exhibits as part of the Jordanian Pavilion.
I do not share sentiments with Dubai's large no of fan. I have always had mixed feelings, but now i have only negative feeling. Even though, and from the outside, it has the looks of modern cities, however, there are fews things that cannot but piss you off.
Upon arrival, i headed immediately to the passport control, and after waiting in a queue for quite sometime, i was relieved that it was my turn to check my passport, only to be asked by a friendly lady to go back to the lower floor and take an Iris Signature. Along the way i found many people returning. How Difficult is it for officials in Dubai to install a sign asking arrivals to take Iris signature before proceeding to Passport Control? The same thing happens every day and nobody is taking any action.
I rented a car (things went smooth) and upon hitting the street, i just faced a total mess. Lots of constructions and diversions , which is fine, but the signage is just horrible. You start with a sign and when you reach an intersection or a diversion, the signs do not tell you anything, and if you are lucky, you might find a small sign at exactly the intersection, by which time, it is almost impossible for you to change lanes.
it took me exactly 30 minutes to reach my hotel, because i was going around it for several rounds. I made a visual contact early on, but getting there amongst the mesh of diversion and constructions is something that requires quite a bit of training.
Arriving at the expo grounds is also an adventure. It is located next to Dubai world trade center that is reachable from a large round about!! and you can probably imagine the traffic on round about in busy areas. But when you reach the parking area, you also wait in lines only to find a poor parking area with no asphalt. If you are lucky, you find a parking place; mind you, that we are exhibitors and paying a lot to rent an area in Gitex and, therefore, the least of our expectations is find a proper parking location. There are three parking lots A, B, and C, I noticed that C is the least busy of all, so the next morning i thought i was going to play it smart. I waited in the line, and when i reached Parking A, I skipped it so that i can part in C, only to find that C is closed. Of course , no sign or nothing. It seems that in Dubai you need to improve foretelling and occultism skills. Going back to the line would take me another 20 minutes, so i decided to park at the corner of the street. When i returned to my car in the evening, i found a parking ticket saying that i am parking in an inappropriate location.
What added in my disappointment is the big fuss made by the release of Windows 7. I bought a Laptop running windows 7, and immediately hit incompatibility issues:
1- does not run my Vmware virtualization software.
2- took my a long time to make it connect to my wireless router.
problems with windows 7 made my search for critiques about it, and i would like to share with you this article
http://pcworld.about.com/od/windows1/Under-the-Hood-Windows-7-Is-V.htm
ammar sajdi
As usual, GITEX runs in October and our company exhibits as part of the Jordanian Pavilion.
I do not share sentiments with Dubai's large no of fan. I have always had mixed feelings, but now i have only negative feeling. Even though, and from the outside, it has the looks of modern cities, however, there are fews things that cannot but piss you off.
Upon arrival, i headed immediately to the passport control, and after waiting in a queue for quite sometime, i was relieved that it was my turn to check my passport, only to be asked by a friendly lady to go back to the lower floor and take an Iris Signature. Along the way i found many people returning. How Difficult is it for officials in Dubai to install a sign asking arrivals to take Iris signature before proceeding to Passport Control? The same thing happens every day and nobody is taking any action.
I rented a car (things went smooth) and upon hitting the street, i just faced a total mess. Lots of constructions and diversions , which is fine, but the signage is just horrible. You start with a sign and when you reach an intersection or a diversion, the signs do not tell you anything, and if you are lucky, you might find a small sign at exactly the intersection, by which time, it is almost impossible for you to change lanes.
it took me exactly 30 minutes to reach my hotel, because i was going around it for several rounds. I made a visual contact early on, but getting there amongst the mesh of diversion and constructions is something that requires quite a bit of training.
Arriving at the expo grounds is also an adventure. It is located next to Dubai world trade center that is reachable from a large round about!! and you can probably imagine the traffic on round about in busy areas. But when you reach the parking area, you also wait in lines only to find a poor parking area with no asphalt. If you are lucky, you find a parking place; mind you, that we are exhibitors and paying a lot to rent an area in Gitex and, therefore, the least of our expectations is find a proper parking location. There are three parking lots A, B, and C, I noticed that C is the least busy of all, so the next morning i thought i was going to play it smart. I waited in the line, and when i reached Parking A, I skipped it so that i can part in C, only to find that C is closed. Of course , no sign or nothing. It seems that in Dubai you need to improve foretelling and occultism skills. Going back to the line would take me another 20 minutes, so i decided to park at the corner of the street. When i returned to my car in the evening, i found a parking ticket saying that i am parking in an inappropriate location.
What added in my disappointment is the big fuss made by the release of Windows 7. I bought a Laptop running windows 7, and immediately hit incompatibility issues:
1- does not run my Vmware virtualization software.
2- took my a long time to make it connect to my wireless router.
problems with windows 7 made my search for critiques about it, and i would like to share with you this article
Under the Hood, Windows 7 Is Vista's Twin
Who is Microsoft trying to fool? Underneath the fresh coat of paint, Windows 7 looks and runs like Vista. Here are the benchmarks to prove it.http://pcworld.about.com/od/windows1/Under-the-Hood-Windows-7-Is-V.htm
ammar sajdi
Tuesday, September 22, 2009
He was a model professor: generous with ideas, gracious with advice, and intellectually curious about many subjects
This is what students of Professor Richard M. Brown said when he passed away on Aug, 22 09.
Brown worked in the Control Systems Laboratory at Illinois (now the Coordinated Science Laboratory) when it was new to campus, helping to set a foundation for digital computer research. He was involved in the creation of such ground-breaking computers as the CSX-1 and the first supercomputer, the ILLIAC IV. PLATO, the first computer-assisted instruction system that helped to develop Internet concepts such as chat rooms and online testing, was helped by Brown’s research on teaching machines.
He did not live to hear what his students had to say about him! He did make a difference and the title just spells it out. If you like it, try to make a difference!
I tried myself, but it seems it shows after we die (if Ever!!!)
Ammar Sajdi
www.realsoft-me.com
www.e-ammar.net
Sunday, September 20, 2009
حملة انتخابية بالعيد
كالعادة وكما هو متعارف علية محليا , يدأب المرشح باقتناص الفرص لمجاملة الناس في كل مناسبة بعد سنوات عجاف من البعد والجفاء وانا طبعا واحد من هذا النسيج الاجتماعي ولا اشكل اي استثناء لذا اسمحو لي اخواني واخواتي ان اتقدم لكم بباقة من اجمل التهاني بمناسبة حلول عيد الفطر السعي واذكركم ب
Friday, September 18, 2009
البوس ممنوع
القى فايروس N1H1 بظلالة على مراكز الافتاء الاسلامية حيث وردت اخبار ان البوس اصبح مكروها منعا لانتشار الفيروس.
لا داعي للهلع فيبدو ان المنع مؤقتا حيث يتوقع ان يرفع الحظر بعد العيد مباشرة لتستمر عمليات البوس كالمعتاد
Ammar Sajdi
www.realsoft-me.com
www.e-ammar.net
Sunday, September 13, 2009
I am surprised too
Tuesday, September 08, 2009
REALSOFT in the NEWs ريل سوفت
http://www.petra.gov.jo/Artical.aspx?Lng=2&Section=4&Artical=133029 http://www.addustour.com/ViewTopic.aspx?ac=\Economy\2009\08\Economy_issue693_day31_id171383.htm http://www.alanbat.net/news/Viewoldnews.asp?Nid=239474 http://www.alarabalyawm.net/pages.php?news_id=180754 http://www.addustour.com/ViewArchiveTopic.aspx?ac=\Economy\2004\09\EconomyNews_Issue14390_Day9_ID85843.htm
http://www.elaph.com/Web/Technology/2008/11/381301.htm
sample
البرمجيات المتقدمة والحلول النقالة تنفذان تعدادا تجريبيا في قطر |
[30/08/2009 12:34] |
عمان 30 آب(بترا)- انهت شركتا البرمجيات المتقدمة ريل سوفت والحلول النقالة تنفيذ التعداد التجريبي للسكان والمساكن والمنشآت في دولة قطر . وتم تنفيذ التجربة بالتعاون مع جهاز الإحصاء القطري وشملت 700 أسرة موزعة على 4 بلديات تمهيدا لإجراء التعداد العام للسكان والمساكن والمنشآت في2010. وقال بيان اصدرته شركة ريل سوفت اليوم الاحد هذا أول تعداد تجريبي ينفذ استعدادا لتعداد 2010 في دول مجلس التعاون الخليجي. ويعتبر التعداد التجريبي مرحلة مهمة تنفذ في كافة المشاريع المشابهة لاختبار المنهجيات والعمليات والتقنيات والخروج بتوصيات لمرحلة التعداد الفعلي. والبرمجيات المتقدمة شركة اردنية تم تأسيسها في العام 2002 والحلول النقالة شركة شقيقة سيستر كومبني للشركة الاولى. واشتملت التجربة على اربع مراحل لمحاكاة خطوات التعداد الفعلي، حيث تم في كل مرحلة استيفاء استمارة خاصة لبيانات المباني والوحدات السكنية ثم المنشات وفي النهاية جمع البيانات التفصيلية للسكان من مواطنين ووافدين. وجاء في بيان الشركة ان المراحل كافة تمت بسلاسة حيث كان يتم ربط بيانات كل مرحلة بالمراحل السابقة لها لضمان تكامل واتساق البيانات الإحصائية. ومن أهم معالم هذه التجربة استخدام الأجهزة الكفية الالكترونية بي دي ايه المزودة بالخرائط الالكترونية والصور الجوية لجمع البيانات ونقلها إلكترونيا إلى قواعد البيانات المركزية بدلا من الأسلوب التقليدي الورقي. وشركة ريل سوفت نفذت تعداد سلطنة عمان 2003 باستخدام الاجهزة الكفية في ولاية مسقط علما بأن سلطنة عُمان شرعت بالتحضير لتعداد 2010 على مستوى السلطنة باستخدام تقنيات الأجهزة الكفية. يشار ان دائرة الإحصاءات العامة أدخلت وبالتعاون مع الشركة خدمة الاجهزة الكفية في إجراء التعداد الزراعي العام 2007. --(بترا) ف ح/س ج/ س ق. |
Tuesday, August 18, 2009
Edward Said National Music Conservatory
I have attended the Palestine Youth Orchestra performance that took place this week in Amman, and i must say that given the constraints imposed on a Palestine ensemble of this sort, the performance was far from being ordinary. I was captivated by watching some 50 young musicians mostly in their early 20s orchestrating the marvelous Beethoven’s Third Symphony Eroica, “a tribute to a great man”. The group was led by the acclaimed English conductor Sian Edwards. The event was in Commemoration of Mahmood Darweesh.I am glad i did not miss it
Ammar sajdi
Aug 17, 09
Wednesday, August 12, 2009
Not a Shred of evidence exists in favour of the idea that life is serious
and then we die.
Ammar Sajdi
www.realsoft-me.com
www.e-ammar.net
Sunday, August 02, 2009
Looks like i found a new baby
Liferay, an open-source content management and collaboration portal.
Seems to have been around for a while, but I accidentally came across it while searching for performance figures on a Linux machine required by a client of us here in Muscat-Oman.
Seems to have been around for a while, but I accidentally came across it while searching for performance figures on a Linux machine required by a client of us here in Muscat-Oman.
Ammar Sajdi
www.realsoft-me.com
www.e-ammar.net
Subscribe to:
Posts (Atom)
Fundamentals of Software Testing
Originally posted on jan , 23 2009, Published again on Sept,18,2024 extracted completely from http://testingsoftware.blogspot.com/2005/1...
-
After years and year of debate, finally, we at REALSOFT will have two day weekend. That was not possible before due to the fact that our off...
-
An article my mother worte after visiting Nablus last month (NOV 2007) بعد عدة سنين وفجأة قررت والعائلة زيارة بلدنا المحتلة نابلس، لمشاركة أ...