Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: [LF7.0GA5]How to create a new ResultRow
Hi,
in Liferay 6.2 i have some piece of code where has been used
ResultRow row = new ResultRow(obj, n, i);
i noticed that in Liferay 7 i can't instantiate a ResultRow in this way, some one know if there is a similar alternative? A way to obtain the same result?
Thanks.
In Liferay 6.2, the class was com.liferay.portal.kernel.dao.search.ResultRow,
living in portal-service
, which was present in the global
class loader. In Liferay 7.0, that class was converted into an
interface, and the implementation class was moved to com.liferay.taglib.search.ResultRow,
living in util-taglib
.
You can try adding a dependency on
com.liferay.portal.util.taglib
and switch your import to
the implementation rather than the interface to see if it works. You
can see an example of Liferay doing so in announcements-web,
via an import in init.jsp,
and there isn't anything special in the bnd.bnd or build.gradle.
Thanks Minhchau Dang, the problem was that i were using the old import com.liferay.portal.kernel.dao.search.ResultRow; that now it's an interface, with the import com.liferay.taglib.search.ResultRow; it works!
Powered by Liferay™