フォーラム

ホーム » Liferay Portal » English » 2. Using Liferay » General

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
sasmita swain
retreive data from db
2012/11/01 4:01
答え

sasmita swain

ランク: Regular Member

投稿: 185

参加年月日: 2012/02/24

最近の投稿

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
Pavel Savinov
RE: retreive data from db
2012/11/01 4:15
答え

Pavel Savinov

ランク: Junior Member

投稿: 97

参加年月日: 2012/09/24

最近の投稿

You can create a hook for page /html/portlet/shopping/categories.jsp and iterate over all categories to build and display a tree:

1<%
2 List<ShoppingCategory> list = ShoppingCategoryLocalServiceUtil.getShoppingCategories(QueryUtil.ALL_POS,QueryUtil.ALL_POS);
3   /*
4      build a tree from list using category.isRoot(), category.getParentId(), etc.
5      and display categories in the form of tree.
6   */
7 }
8%>
Gaurav Jain
RE: retreive data from db
2012/11/01 4:39
答え

Gaurav Jain

ランク: Regular Member

投稿: 141

参加年月日: 2011/01/31

最近の投稿

sasmita 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
RE: retreive data from db
2012/11/01 21:19
答え

sasmita swain

ランク: Regular Member

投稿: 185

参加年月日: 2012/02/24

最近の投稿

Pavel Savinov:
You can create a hook for page /html/portlet/shopping/categories.jsp and iterate over all categories to build and display a tree:

1<%
2 List<ShoppingCategory> list = ShoppingCategoryLocalServiceUtil.getShoppingCategories(QueryUtil.ALL_POS,QueryUtil.ALL_POS);
3   /*
4      build a tree from list using category.isRoot(), category.getParentId(), etc.
5      and display categories in the form of tree.
6   */
7 }
8%>



thanks for your replay
can you give some example?

Thanks
Sasmita
sasmita swain
RE: retreive data from db
2012/11/02 22:19
答え

sasmita swain

ランク: Regular Member

投稿: 185

参加年月日: 2012/02/24

最近の投稿

hi

how to retrieve data from db in aui tree????
Nikhil Nishchal
RE: retreive data from db
2012/11/04 21:18
答え

Nikhil Nishchal

ランク: Junior Member

投稿: 91

参加年月日: 2012/06/21

最近の投稿

sasmita 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.