Wilson Man 11 Years Ago very cool, now it all makes sense. Please sign in to reply. Reply as... Cancel
Sampsa Sohlman 11 Years Ago May be the SQLQuery(Impl) could be extended so that if there is entity's interface as parameter then, it would find the implementation automatically.Anyway, good post. Please sign in to reply. Reply as... Cancel
jelmer kuperus 11 Years Ago FYI You are using _classMap in a non threadsafe wayAlso by holding on to the impl class references in a map you are effectively preventing the webapp classloader from being garbage collected. (not a problem if you just use it to load classes from the ROOT webapp, since it's not hotdeployable, but it is if you use this same trick do load classes from another standalone portlet) You'll be blowing up your permgen space Please sign in to reply. Reply as... Cancel
Jay Patel 11 Years Ago Nice Post... Please sign in to reply. Reply as... Cancel David Truong Jay Patel 11 Years Ago Hey jelmer,Good points. I will update my code so that if the classLoader is not ROOT it won't put it in the map. You should consider filing a jira issue also because this code is a copy of what is from DynamicFactoryUtilThanks for your comments guys Please sign in to reply. Reply as... Cancel David Truong David Truong 11 Years Ago Hey Sampsa,That would make things too easy for you guys then! Haha JK. Good suggestion. It is even more valid because the look up is already being done for dynamic queries. Very little code would have to be written for this improvement. Please sign in to reply. Reply as... Cancel Muhammed Shakir AK Misarwala David Truong 11 Years Ago It is a bit challenging to add a new action with a custom jsp and ensuring that the jsp is wrapped into the theme properly. I have got the solution and it works like a charm. You can find the solution here : http://www.liferayaddict.com/home/-/blogs/new-action-in-hook-in-liferay-6-1 Please sign in to reply. Reply as... Cancel
David Truong Jay Patel 11 Years Ago Hey jelmer,Good points. I will update my code so that if the classLoader is not ROOT it won't put it in the map. You should consider filing a jira issue also because this code is a copy of what is from DynamicFactoryUtilThanks for your comments guys Please sign in to reply. Reply as... Cancel David Truong David Truong 11 Years Ago Hey Sampsa,That would make things too easy for you guys then! Haha JK. Good suggestion. It is even more valid because the look up is already being done for dynamic queries. Very little code would have to be written for this improvement. Please sign in to reply. Reply as... Cancel Muhammed Shakir AK Misarwala David Truong 11 Years Ago It is a bit challenging to add a new action with a custom jsp and ensuring that the jsp is wrapped into the theme properly. I have got the solution and it works like a charm. You can find the solution here : http://www.liferayaddict.com/home/-/blogs/new-action-in-hook-in-liferay-6-1 Please sign in to reply. Reply as... Cancel
David Truong David Truong 11 Years Ago Hey Sampsa,That would make things too easy for you guys then! Haha JK. Good suggestion. It is even more valid because the look up is already being done for dynamic queries. Very little code would have to be written for this improvement. Please sign in to reply. Reply as... Cancel Muhammed Shakir AK Misarwala David Truong 11 Years Ago It is a bit challenging to add a new action with a custom jsp and ensuring that the jsp is wrapped into the theme properly. I have got the solution and it works like a charm. You can find the solution here : http://www.liferayaddict.com/home/-/blogs/new-action-in-hook-in-liferay-6-1 Please sign in to reply. Reply as... Cancel
Muhammed Shakir AK Misarwala David Truong 11 Years Ago It is a bit challenging to add a new action with a custom jsp and ensuring that the jsp is wrapped into the theme properly. I have got the solution and it works like a charm. You can find the solution here : http://www.liferayaddict.com/home/-/blogs/new-action-in-hook-in-liferay-6-1 Please sign in to reply. Reply as... Cancel
Harvey Tamayo 7 Years Ago Great! i asked to me the same question "If DynamicQueryFactoryUtil.forClass can, me too. Right?" thanks. For now i have other issue, i try to do a CustomSQL Query where IS SELECT * customTable INNER JOIN JournalArticle. For now i don't find other solution that modifying portlet-hbm adding the portal table configuration from portal-hbm. Like is suggested in http://www.liferaysavvy.com/2013/02/getting-data-from-multiple-tables-in.html. But if you are interested and you find other solution, that will be great. Regards from Colombia. Please sign in to reply. Reply as... Cancel