Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Joby KJ
Bread Crumbs in custom portlet pages
November 30, 2012 4:15 AM
Answer

Joby KJ

Rank: Junior Member

Posts: 43

Join Date: July 13, 2012

Recent Posts

Dear All,
I have to show bread crumbs for pages in custom port lets . I am using struts 2 for developing my portlets. Please suggest a solution

Thank You
Joby
Apoorva Prakash
RE: Bread Crumbs in custom portlet pages
November 30, 2012 4:43 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Hello Joby,

Hopefully the following code will work for you:

1PortalUtil.addPortletBreadcrumbEntry(request, title, url);

eg.
1PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), viewPageURL.toString());


and the following in liferay-portlet.xml
1<private-request-attributes>false</private-request-attributes>


Hope this will help...

Thanks and Regards,
Apoorva Prakash
Joby KJ
RE: Bread Crumbs in custom portlet pages
December 4, 2012 6:29 AM
Answer

Joby KJ

Rank: Junior Member

Posts: 43

Join Date: July 13, 2012

Recent Posts

I am gettin following error while trying below mentioned enty in xml


Caused by: org.dom4j.DocumentException: Error on line 13 of document : The content of element type "portlet" must match "(portlet-name,icon?,virtual-path?,struts-path?,configuration-path?,configuration-action-class?,indexer-class?,open-search-class?,scheduler-entry*,portlet-url-class?,friendly-url-mapper-class?,friendly-url-mapping?,friendly-url-routes?,url-encoder-class?,portlet-data-handler-class?,portlet-layout-listener-class?,poller-processor-class?,pop-message-listener-class?,social-activity-interpreter-class?,social-request-interpreter-class?,webdav-storage-token?,webdav-storage-class?,xml-rpc-method-class?,control-panel-entry-category?,control-panel-entry-weight?,control-panel-entry-class?,asset-renderer-factory*,custom-attributes-display*,workflow-handler*,preferences-company-wide?,preferences-unique-per-layout?,preferences-owned-by-group?,use-default-template?,show-portlet-access-denied?,show-portlet-inactive?,action-url-redirect?,restore-current-view?,maximize-edit?,maximize-help?,pop-up-print?,layout-cacheable?,instanceable?,remoteable?,scopeable?,user-principal-strategy?,private-request-attributes?,private-session-attributes?,render-weight?,ajaxable?,header-portal-css*,header-portlet-css*,header-portal-javascript*,header-portlet-javascript*,footer-portal-css*,footer-portlet-css*,footer-portal-javascript*,footer-portlet-javascript*,css-class-wrapper?,facebook-integration?,add-default-resource?,system?,active?,include?)". Nested exception: The content of element type "portlet" must match "(portlet-name,icon?,virtual-path?,struts-path?,configuration-path?,configuration-action-class?,indexer-class?,open-search-class?,scheduler-entry*,portlet-url-class?,friendly-url-mapper-class?,friendly-url-mapping?,friendly-url-routes?,url-encoder-class?,portlet-data-handler-class?,portlet-layout-listener-class?,poller-processor-class?,pop-message-listener-class?,social-activity-interpreter-class?,social-request-interpreter-class?,webdav-storage-token?,webdav-storage-class?,xml-rpc-method-class?,control-panel-entry-category?,control-panel-entry-weight?,control-panel-entry-class?,asset-renderer-factory*,custom-attributes-display*,workflow-handler*,preferences-company-wide?,preferences-unique-per-layout?,preferences-owned-by-group?,use-default-template?,show-portlet-access-denied?,show-portlet-inactive?,action-url-redirect?,restore-current-view?,maximize-edit?,maximize-help?,pop-up-print?,layout-cacheable?,instanceable?,remoteable?,scopeable?,user-principal-strategy?,private-request-attributes?,private-session-attributes?,render-weight?,ajaxable?,header-portal-css*,header-portlet-css*,header-portal-javascript*,header-portlet-javascript*,footer-portal-css*,footer-portlet-css*,footer-portal-javascript*,footer-portlet-javascript*,css-class-wrapper?,facebook-integration?,add-default-resource?,system?,active?,include?)".
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
Hari Dobbala
RE: Bread Crumbs in custom portlet pages
December 5, 2012 1:16 AM
Answer

Hari Dobbala

Rank: Junior Member

Posts: 29

Join Date: November 17, 2012

Recent Posts

Hi Joby,

This exception generally occurs when xml is not following the related DTD type. I think elements in your xml file is not according to DTD. Please write the xml according to DTD which is already described in exception.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!