Planned maintenance is scheduled for the week of June 15th - the exact date and time will be announced soon.
See More Details
Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Spring portlet in Control Panel.
Hi,
Can anyone tell me how to setup a Spring portlet in the Control Panel?
I know I how to setup a Struts base portlet for the control panel, just simply create a class inherit from ControlPanelEntry class and insert it into the liferay-portlet.xml file -- this is for Struts Portlet, how about Spring portlet?
Very appreciate for any suggestion and a simple example will be great too.
Thanks
Sam
Can anyone tell me how to setup a Spring portlet in the Control Panel?
I know I how to setup a Struts base portlet for the control panel, just simply create a class inherit from ControlPanelEntry class and insert it into the liferay-portlet.xml file -- this is for Struts Portlet, how about Spring portlet?
Very appreciate for any suggestion and a simple example will be great too.
Thanks
Sam
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Sample+Spring+Portlet
http://www.blokefood.com/liferay-portal-4.2.1/web/blokefood/
check these.
http://www.blokefood.com/liferay-portal-4.2.1/web/blokefood/
check these.
kehsihba eejrenab:
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Sample+Spring+Portlet
http://www.blokefood.com/liferay-portal-4.2.1/web/blokefood/
check these.
Thank you very much for the example.
With example in the second link, I understand that:
control-panel-entry-category: The 'category' where your portlet will appear. There are currently 4 valid values for this element: 'my', 'content', 'portal', and 'server'.
control-panel-entry-weight: Determines the relative ordering for your portlet within a given category. The higher the number, the lower in the list your portlet will appear within that category.
control-panel-entry-class: The name of a class that implements the ControlPanelEntry interface which determines who can see the portlet in the control panel via an isVisible method.But with Spring portlet, how to do you leveraged the control panel and spring protlet configuration in order to add the spring portlet onto the contro panel.
Thanks
Sam
kehsihba eejrenab:
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Sample+Spring+Portlet
http://www.blokefood.com/liferay-portal-4.2.1/web/blokefood/
check these.
Hi I understand the first link, but not quite understand the second.
Do I have to create a mapping between my ControlPanelEntry class with my Controller class?
To this extend, this is probably not a liferay question, but I still hope someone whom have done this development can explain to me the basic for linking the ControlPanelEntry class with custom defined Spring portlet.
Thank you in advance for any suggestion and help.
Thanks
Sam
kehsihba eejrenab:
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Sample+Spring+Portlet
http://www.blokefood.com/liferay-portal-4.2.1/web/blokefood/
check these.
I am still not able to figure out how this example related to my question?
My original question is "how to add a Spring portlet into Control Panel", rather than "how to write a Spring portlet for liferay"
Thanks
Sam
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Control%20Panel
check once
check once
I think I should put the following code in my name-portlet.xml file:
But the eclipse editor complains,
Should I ignore this error?
Thanks
Sam
<!-- Handler Mapping -->
<bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
<property name="portletModeMap">
<map>
<entry key="view"><ref bean="helloWorldPortlet" /></entry>
</map>
</property>
</bean>
<!-- Exceptions Handler -->
<bean id="defaultExceptionHandler" parent="defaultExceptionHandlerTemplate" />
But the eclipse editor complains,
The value 'portletModeHandlerMapping' of attribute 'id' on element 'bean' is not valid
with respect to its type, 'ID'.Should I ignore this error?
Thanks
Sam
Hi,
You need to override the ControlPanelEntry interface only when you want to change the permissions to whom your portlet is visible.
Otherwise just having these entries in your liferay-portlet.xml is sufficient.
Regards,
Tina
You need to override the ControlPanelEntry interface only when you want to change the permissions to whom your portlet is visible.
Otherwise just having these entries in your liferay-portlet.xml is sufficient.
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
Regards,
Tina
Community
Company
Feedback