掲示板

retreive data from db

11年前 に sasmita swain によって更新されました。

retreive data from db

Regular Member 投稿: 183 参加年月日: 12/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
thumbnail
11年前 に Pavel Savinov によって更新されました。

RE: retreive data from db

Junior Member 投稿: 94 参加年月日: 12/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:

<%
 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.
   */
 }
%&gt;</shoppingcategory>
11年前 に sasmita swain によって更新されました。

RE: retreive data from db

Regular Member 投稿: 183 参加年月日: 12/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:

&lt;%
 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.
   */
 }
%&gt;</shoppingcategory>



thanks for your replay
can you give some example?

Thanks
Sasmita
thumbnail
11年前 に Gaurav Jain によって更新されました。

RE: retreive data from db

Regular Member 投稿: 145 参加年月日: 11/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.
11年前 に sasmita swain によって更新されました。

RE: retreive data from db

Regular Member 投稿: 183 参加年月日: 12/02/24 最新の投稿
hi

how to retrieve data from db in aui tree????
thumbnail
11年前 に Nikhil Nishchal によって更新されました。

RE: retreive data from db

Regular Member 投稿: 174 参加年月日: 12/06/22 最新の投稿
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.