留言板
adding one more text box for admin
sasmita swain,修改在11 年前。
adding one more text box for admin
Regular Member 帖子: 183 加入日期: 12-2-24 最近的帖子
Hi
How to add one more text box in out of box portlet for admin???not for user,actually i want to add description field for admin..what admin will enter the data it should go to the database..
can is it possible by custom attribute?
Thanks
Sasmita
How to add one more text box in out of box portlet for admin???not for user,actually i want to add description field for admin..what admin will enter the data it should go to the database..
can is it possible by custom attribute?
Thanks
Sasmita
Gnaniyar Zubair,修改在11 年前。
RE: adding one more text box for admin
Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
Sorry Your question is not clear to give the better solution. which out of box portlet do u mean ?
Do you want to add description field for user ?
- Gnaniyar Zubair
Do you want to add description field for user ?
- Gnaniyar Zubair
sasmita swain,修改在11 年前。
RE: adding one more text box for admin
Regular Member 帖子: 183 加入日期: 12-2-24 最近的帖子Gnaniyar Zubair:
Sorry Your question is not clear to give the better solution. which out of box portlet do u mean ?
Do you want to add description field for user ?
- Gnaniyar Zubair
Thanks for reply
i want to add description field in shopping portlet(subcategory) for admin..admin will enter some description in description field
Thanks
Sasmita
Gnaniyar Zubair,修改在11 年前。
RE: adding one more text box for admin
Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
You have to override through EXT or HOOK .
If only jsp changes then go for simple JSP hook and take the original file from here html/portlet/shopping /<jspfile> .
If only jsp changes then go for simple JSP hook and take the original file from here html/portlet/shopping /<jspfile> .
sasmita swain,修改在11 年前。
RE: adding one more text box for admin
Regular Member 帖子: 183 加入日期: 12-2-24 最近的帖子Gnaniyar Zubair:
You have to override through EXT or HOOK .
If only jsp changes then go for simple JSP hook and take the original file from here html/portlet/shopping /<jspfile> .
How to add for description column in database?it is oob portlet..
Thanks
Sasmita
Gnaniyar Zubair,修改在11 年前。
RE: adding one more text box for admin
Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
Through EXT plugin, you can modify anthing. You will have all the control for OOTB portlets.
you can modify the service.xml of shopping portlet or handle different table where you need to store unique key of shopping cart and description field .
Please refer :
you can modify the service.xml of shopping portlet or handle different table where you need to store unique key of shopping cart and description field .
Please refer :
http://www.liferay.com/community/forums/-/message_boards/message/4533829
http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/ext-plugins
Gnaniyar Zubair,修改在11 年前。
RE: adding one more text box for admin
Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
But now using Service Builder is depreciated in EXT plugin. May be next version will not available.
So better you can use new table and store additional information.
So better you can use new table and store additional information.
sasmita swain,修改在11 年前。
RE: adding one more text box for admin
Regular Member 帖子: 183 加入日期: 12-2-24 最近的帖子Gnaniyar Zubair:
But now using Service Builder is depreciated in EXT plugin. May be next version will not available.
So better you can use new table and store additional information.
Thanks for your reply
but in hook how to create new table for storing additional information?
Thanks
Sasmita
Gnaniyar Zubair,修改在11 年前。
RE: adding one more text box for admin
Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
Creating table is not through hook. design and create the table manually.
1. Add the new text box(description ) in jsp file
2. Override the Action through Struts Action Hook or EXT.
3. get description field value in Action file (For eg. EditItemAction.java) and store into your table in normal way.(query)
[indent][indent]instead of using direct query and creating table manually, you can use like this to create the table and store the data :
1. Add the new text box(description ) in jsp file
2. Override the Action through Struts Action Hook or EXT.
For eg, if you want to extend EditItemAction of Shopping Cart, then extend this /shopping/edit_item struts path using Struts Action hook,
Struts Action Hook: http://www.liferay.com/community/wiki/-/wiki/Main/Struts+Action+Hook+Tips
3. get description field value in Action file (For eg. EditItemAction.java) and store into your table in normal way.(query)
[indent][indent]instead of using direct query and creating table manually, you can use like this to create the table and store the data :
a.Create separate Service.xml with shoppingcart id and description
b.do build-service.
c.copy that <your-entity>service.jar into tomcat/lib folder
d. then <yourentity>LocalServiceUtil.addItem(shoppingCartId,description);[/indent][/indent]