Sunday, April 08, 2007

ADF Faces: Programmatically setting SetActionListener….WHY?

Question: Because the af:setActionListener component is intended to avoid some managed bean code, is there any particular reason why programming with SetActionListener should be preferred?

1) MORE CONTROL: it gives more control...e.g. we can have:

if(A) EL.set("#{sessionScope.someOtherAttribute}", EL.get("#{sessionScope.someAttribute}"));

else if (B) EL.set("#{sessionScope.someOtherAttribute}", EL.get("#{sessionScope.someAttribute2}"));

2) NO CASTING ISSUES: There are casting issues with af:SetActionListener when TO field is pointing to primitive data type e.g. boolean (small b)

if a variable (e,g, enbaleUpdate) is of type boolean rather Boolean then the following line throws EvaluationException ( IllegalArgumentException: type mismatch)

<af:setActionListener to="#{UserStateBean.enableUpdate}" from="true"/>

3) EASIER TO DEBUG: For case like (2) I have found it pretty hard to debug af:SetActionListener component (as compared to code in backing bean)

Saturday, April 07, 2007

Hiding Details if Master doesn’t have any in ADF Faces Tables

I had a use case in which some rows in the Master Table can never have any details; so it makes sense to hide details table instead of printing a blank table with some default text message.

I tried to fit in lot of (buggy) logic and then I realized it can be done using simpler way which is:

Let say the child table has

value="#{bindings.ChildCollection.collectionModel}"

to hide details add:

rendered="#{bindings. ChildCollection.estimatedRowCount>0}"

Monday, March 06, 2006

First International Workshop on Agent Technology for Disaster Management (ATDM) at AAMAS 2006, Hakodate, Japan

My paper got accepted in it. :) I will paste the link to my paper here when/if Magnus will upload it at some public location.

This is my first blood in publication so i am excited :).. I hope i will be writing another paper soon. Inhshallah

Saturday, January 07, 2006

Tulip

While I was in Sweden, KTH I always thought that I will have a lot of time for myself when I would reach back. But no.... There never was any relaxation written on my name. :(

I found a good software for network visualization i.e. Tulip Software home page. They rightly claim that on regular machine there software can handle 50 thousand nodes. Which is a good number. I still have to hack into there code.

There is a short c++.NET console code that I wrote to generate dummy data for tulip. If you want I can send it over to you. (It won't take more then 30 min to make it a portable C++ code - however I am in no mood for doing that)

Wednesday, December 07, 2005

.. i am learnign things that i should have learnt 12 months ago. Yesterday i figured out how to send the print command to DSV printer from a personal laptop. Today i learnt how to transfer money from one account to another using internet :p.. i transfered 10 SEK to start with :d.. but it's a great service and very fast especially if the accounts are in the same bank.. Johan Mattsson at DSV helped me with Swedish for the second find. While Martin Rimka gave me the tip for first one.
And just 1 hour ago i was in Kista Galleria when i saw Europe The Band signing their latest DVD album. If you don't know who they are even then you might have heard on of their song i.e. The Final Countdown.

Monday, December 05, 2005

Hair Cut

Yes my long hairs are gone. The picture based horror story will be posted here soon.

Thesis Defence

On 2nd December i did defence of my thesis. On Right you can see Tallat who slept for only 3 hours before comming to my presentation and he really is trying hard to understand. In front of him from left to right are Fredrik liljeros, Lisa Brouwers and Fredrik Ollson. And you can also see Magnus who was my MS Thesis advisor. I think he was finding more mistakes in my thesis then :). And by the way Fredrik Ollson is a good photographer and i didn't know that he would be comming else i would have asked him to take few pics.

Here is another view you can see Cherry Yun Yang on left. She was my opponent. You can also see another guy sitting in back row. His name is Wah-Sui Almberg and he is a PHD student under Magnus Boman here at DSV. And he is Sino-Swede.

I am trying hard to convince the audiance that scatter plot is the best option for this thesis :p

Say hi to the whole team. Magnus Boman (Advisor), Fredrik liljeros (Advisor from SMI), Yun Yang aka Cherry (Opponent), Asim Ghaffar (Thesis Author) and Jón Grétar Gudjonsson (only lonley Active Listener).

Me with Fredrik. Becuase of him i finally tasted a proper Swedish dish :).

ME and Yun Yang. Everyone call her cherry and so do she herself. She was my opponent and i think she did a good job and she did it as per book.

Cherry the opponent

Jon listening actively


Magnus Boman and Lisa Brouwers.

And my desi gang... Tallat (he slept at 7 am only to wake up at 10 am to attend my presentation), Faisal Ghias Mir (HE didn't sleep at all the night before so that he dont miss my seminar), Asim Ghaffar (He had plenty of sleep before the seminar), Malik Abdul Rehman (International Morale booster/ Foreign Minister/ Sports Minister/ Cultural Minister), Saad Riaz (National Morale booster / Telecom Minister / Health Minister / Our rep in UNO), Sarfraz (Information Minister/ Education Minister /Rural Development Minister/ Ambassador to Denmark)

Saturday, December 03, 2005

Ali Aftab and Abdul Rehman

I took two pictures and they both seem cool to me :). Ali Aftab is fellow GIKIan and here he is doing an MS from Mechanical Department. Abdul Rehman is from UET, Taxila and he is doing MS in SOC.

Thursday, December 01, 2005

2005 12 01

Today was a busy day. I went to student union for the clearance. Then I went to my travel agent. On my way back, at T-Centralen exit near Serg Torg I met a teenage girl who was collecting fund for Pakistani earthquake. First I went pass her but then I turned back and went to her. It turned out that her whole class is doing this. I thought she is from Pakistan but she turned out as Latin American. She had question about Red cross usage if the collected money. Anyway it was nice seeing other nationals doing efforts for Pakistan. I forgot to take her picture but otherwise it was busy day for my camera. I will post more pics soon but here are few of them. Two My picture were taken by my roommate Rehman using my FinePix A330.

Wednesday, November 30, 2005

Affective Interaction Course (March 2005- May 2005)

For the Affective Interaction course I teamed up again with my Indian friend Manu Gupta. This time we also had two Swedish residents. Ludmila is basically a Russian and Anna is as Swede as any other Swede. And yes not all Swedes are blonde.

Our project went better then what I had expected. Our teachers Kristina Höök
and Petra Sundström really liked it, and also we jointly came third with another group in the voting for the best project :)