हे आर्य !
तुम अपने पूर्वजों के
बेइन्तहां किये ज़ुल्मों पर
रचते हो छंदबद्ध कविता और महाकाव्य
और करते हो
उनके काले नियमों का
बस समझते हो कि तुम्हारे पूर्वजों
की विरासत ही है भारतीय संस्कृति
तो हम पूछते हैं कि हम
आदिवासियों, हूणों, शकों, संथालों, भीलों,
दलितों, मुसलमानों, सिखों, बौद्धों इत्यादि
की संस्कृतियों का क्या स्थान है
तुम्हारी तथाकथित भारतीय संस्कृति में ?
तुम हमारे दुःख- दर्द क्या समझोगे ?
पूछो उनसे उनका दर्द –
जिनके पूर्वजों के कान में दग्ध सीसा
उडेला गया वेद सुनने के अपराध में
पूछो उनसे उनका दर्द
जिनकी नियति में पीढ़ी डर पीढ़ी
ग़ुलामी लिख दी गयी
पूछो उनसे उनका दर्द
जिन्हें इन्सान तो क्या जानवर से भी नीच
समझा गया
पूछो उनसे उनका दर्द
जिनके पूर्वज तुम्हारे ज़ुल्मों से
तंग आ कर बुद्ध और मुहम्मद की शरण में गए
और जिन्हें आज भी तुम विदेशी म्लेच्छ कह देते हो
तुम्हें ये सब जानकर भी क्या कभी आत्मग्लानि नहीं हुयी ?

– अदनान कफ़ील

How to know validation of which control is getting failed

Sometimes in XPage applications it happens that our code do not run due to validation errors.
It becomes really difficult to debug if the form contains too many fields. To simplify the debug process in this scenario I have written a code snippet which gives client id of the control for which validation is getting failed.

Lesson: Never Try to Justify

A a very beautiful story!! about Imam Al-Shafi’ie ..

While Imam Shafi’i was sitting with his students, a maid came to him and said : “O Imam ! how come you fornicate by night and then turn to a preacher by day ?!!”

The students of Imam Shafi’ looked at him waiting for him to deny her claim. The Imam just looked at her and told her :”how much do you want me to pay you (as a wage for that night)?”
His students became so furious; some of them started to yell, others stood up to leave the room.

The Imam told them:”consider me as a date which you eat its good part and then throw away its stone.”
The students didn’t like what he said.

Suddenly, a man came running to the maid telling her:”Your house is on fire and all your children are inside of it!”
All of them, including Ash-Shafi’i, run to the burning house. The Imam entered the house quickly and saved the children.

At that point, the maid confessed with a broken spirit:”the Jewish made me accuse you falsely to ruin your reputation in front of your students”
The students of the Imam looked at him wondering about the reason which stopped him from defending himself in front of them.

Ash-Shafi’I said:”If I had denied the accusation, you would have split into 2 groups : a group which would not believe me and another one which would believe me but would continue to have doubts about me. So, I just wanted to entrust all my affair to Allah!

*Lesson taken from that : when you are falsely accused, never try to justify yourself too much to people no matter how oppressed and wronged you felt. Entrust all your affairs to Allah because HE is The Knower of what is hidden from people..

XPages: Rendered Vs Loaded

Today I observed runtime error in one of my XPage. I investigated later and found that the error is occuring on a custom control which should not be rendered in this scenario. I have several custom controls added on my XPage and display only one custom control based on some condition, so I have computed the rendered property.
Now the question is, if the custom control is not rendered then why it is generating error?
I further investigated properties of the custom control and found there is a property “loaded”.

Rendered: it controls the visibility of the control, i.e., if it is true then the markup for this control will be added in the response.

Loaded: it controls the creation of control, i.e., if it is true then only the control is going to be created else it will not be created.

Coming to my problem, I moved my code from rendered to loaded property and everything is working fine. The custom control is not being created so there is no possibility of execution of any code inside that custom control.

Get list of XPages

Following code will return the list of all XPages available in the specified database: