I looked in the below link to understand how the OQL appstore widget was developed.
This widget takes the OQL query as a String and not a data set. Later they apply the parameters to the OQL query.
I was using OQL as dataset. Although I followed the same approach, the parameters were not applied.
But the OQL appstore widget helped me understand that I must use the Mendix ID to pass in place of object parameter in the OQL.
Voila, that was easy for me as I already had java class to retrieve Mendix Id.
Since, I had only one object parameter, I passed the Mendix ID and replaced the OQL query parameter with String replace method.
Ofcourse, this solution could be scaled a lot. But for now, it works and fits my need.
Thought of updating so others could be benefitted.