Fórumok
add/remove fields and portlet preferences
Akram MONCER, módosítva 11 év-val korábban
add/remove fields and portlet preferences
Regular Member Bejegyzések: 106 Csatlakozás dátuma: 2012.09.25. Legújabb bejegyzések
hello i'm new in liferay developpement.
my question is how can i remove an attribute from an entity with a hook (ex: SKU attribute from the ShoppingItem entity) and how can i add a custom preferences to the shopping portlet.
thank you
my question is how can i remove an attribute from an entity with a hook (ex: SKU attribute from the ShoppingItem entity) and how can i add a custom preferences to the shopping portlet.
thank you
Akram MONCER, módosítva 11 év-val korábban
RE: add/remove fields and portlet preferences
Regular Member Bejegyzések: 106 Csatlakozás dátuma: 2012.09.25. Legújabb bejegyzések
there is no one can help me
Andew Jardine, módosítva 9 év-val korábban
RE: add/remove fields and portlet preferences
Liferay Legend Bejegyzések: 2416 Csatlakozás dátuma: 2010.12.22. Legújabb bejegyzések
Old thread but in case anyone else comes across it.
It is possible to use the PortletPreferences section of the API to store preferences for the portlet. In particular, if you are already creating custom jsp hooks/code for the portlet then all you need to do is also include the logic to retrieve them and use them as required. Check out the PortletPreferences table in the database and the PortletPreferenceLocalServiceImpl (and related classes) for the API stuff.
It is possible to use the PortletPreferences section of the API to store preferences for the portlet. In particular, if you are already creating custom jsp hooks/code for the portlet then all you need to do is also include the logic to retrieve them and use them as required. Check out the PortletPreferences table in the database and the PortletPreferenceLocalServiceImpl (and related classes) for the API stuff.
Nicolas Mugnier, módosítva 11 év-val korábban
RE: add/remove fields and portlet preferences
New Member Bejegyzések: 15 Csatlakozás dátuma: 2009.12.18. Legújabb bejegyzésekAkram MONCER:
hello i'm new in liferay developpement.
my question is how can i remove an attribute from an entity with a hook (ex: SKU attribute from the ShoppingItem entity) and how can i add a custom preferences to the shopping portlet.
thank you
Hello,
You should try to have a look at the ExpandoValueLocalServiceUtil class. I think you will be able to manage your custom field...
About your portlet preferences, you have to add the following to your portlet.xml:
<portlet-mode>edit</portlet-mode>
Then, the main class of your portlet has to implement PortletListener. You will have to switch portlet modes (view - preferences) in the overrided method handleResourceRequest...
Hope I helped you...
Best,
Nicolas.