Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
sasmita swain
retreive data from db
1. November 2012 04:01
Antwort

sasmita swain

Rang: Regular Member

Nachrichten: 185

Eintrittsdatum: 24. Februar 2012

Neue 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
Pavel Savinov
RE: retreive data from db
1. November 2012 04:15
Antwort

Pavel Savinov

Rang: Junior Member

Nachrichten: 97

Eintrittsdatum: 24. September 2012

Neue 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:

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
1. November 2012 04:39
Antwort

Gaurav Jain

Rang: Regular Member

Nachrichten: 146

Eintrittsdatum: 31. Januar 2011

Neue Beiträge

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
1. November 2012 21:19
Antwort

sasmita swain

Rang: Regular Member

Nachrichten: 185

Eintrittsdatum: 24. Februar 2012

Neue Beiträge

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
2. November 2012 22:19
Antwort

sasmita swain

Rang: Regular Member

Nachrichten: 185

Eintrittsdatum: 24. Februar 2012

Neue Beiträge

hi

how to retrieve data from db in aui tree????
Nikhil Nishchal
RE: retreive data from db
4. November 2012 21:18
Antwort

Nikhil Nishchal

Rang: Regular Member

Nachrichten: 136

Eintrittsdatum: 21. Juni 2012

Neue Beiträge

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.