Foren
retreive data from db
sasmita swain, geändert vor 11 Jahren.
retreive data from db
Regular Member Beiträge: 183 Beitrittsdatum: 24.02.12 Neueste Beiträge
hi
how to retreive categories with sub categories from database in shopping portlet???category should come as heading and subcategory will display for this category
any one please help meout
Thanks
Sasmita
how to retreive categories with sub categories from database in shopping portlet???category should come as heading and subcategory will display for this category
any one please help meout
Thanks
Sasmita
Pavel Savinov, geändert vor 11 Jahren.
RE: retreive data from db
Junior Member Beiträge: 94 Beitrittsdatum: 24.09.12 Neueste Beiträge
You can create a hook for page /html/portlet/shopping/categories.jsp and iterate over all categories to build and display a tree:
<%
List<shoppingcategory> list = ShoppingCategoryLocalServiceUtil.getShoppingCategories(QueryUtil.ALL_POS,QueryUtil.ALL_POS);
/*
build a tree from list using category.isRoot(), category.getParentId(), etc.
and display categories in the form of tree.
*/
}
%></shoppingcategory>
sasmita swain, geändert vor 11 Jahren.
RE: retreive data from db
Regular Member Beiträge: 183 Beitrittsdatum: 24.02.12 Neueste BeiträgePavel Savinov:
You can create a hook for page /html/portlet/shopping/categories.jsp and iterate over all categories to build and display a tree:<% List<shoppingcategory> list = ShoppingCategoryLocalServiceUtil.getShoppingCategories(QueryUtil.ALL_POS,QueryUtil.ALL_POS); /* build a tree from list using category.isRoot(), category.getParentId(), etc. and display categories in the form of tree. */ } %></shoppingcategory>
thanks for your replay
can you give some example?
Thanks
Sasmita
Gaurav Jain, geändert vor 11 Jahren.
RE: retreive data from db
Regular Member Beiträge: 145 Beitrittsdatum: 31.01.11 Neueste Beiträgesasmita swain:
hi
how to retreive categories with sub categories from database in shopping portlet???category should come as heading and subcategory will display for this category
any one please help meout
Thanks
Sasmita
@Sasmita, why are you duplicating posts? (http://www.liferay.com/web/guest/community/forums/-/message_boards/view_message/17584945)
Its really not nice. When you are still have doubts you can still post in your old post (which is just 1-2 days old).
I think we all should coordinate in keeping forum neat and healthy.
sasmita swain, geändert vor 11 Jahren.
RE: retreive data from db
Regular Member Beiträge: 183 Beitrittsdatum: 24.02.12 Neueste Beiträge
hi
how to retrieve data from db in aui tree????
how to retrieve data from db in aui tree????
Nikhil Nishchal, geändert vor 11 Jahren.
RE: retreive data from db
Regular Member Beiträge: 177 Beitrittsdatum: 22.06.12 Neueste Beiträgesasmita swain:
hi
how to retrieve data from db in aui tree????
for alloy ui tree view you can use this link.
http://www.liferay.com/community/liferay-projects/alloy-ui/demo?title=community-liferay-projects-alloy-ui-demos-treeview
Here, in place of static content you can pass your db content from jsp.