<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Liferay 7.0 Override JournalDisplayContext.java</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111552156" />
  <subtitle>Liferay 7.0 Override JournalDisplayContext.java</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111552156</id>
  <updated>2026-10-15T10:32:22Z</updated>
  <dc:date>2026-10-15T10:32:22Z</dc:date>
  <entry>
    <title>RE: Liferay 7.0 Override JournalDisplayContext.java</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=115053047" />
    <author>
      <name>Jibin Johnson</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=115053047</id>
    <updated>2019-08-31T21:08:12Z</updated>
    <published>2019-08-31T21:08:12Z</published>
    <summary type="html">Hello Carmine Azzaro,&lt;br /&gt;&lt;br /&gt;I am also looking for a way to override JournalDisplayContext.java class through an extension module, meanwhile here&amp;#39;s a working approach1. Override JSP of com.liferay.journal.web&lt;br /&gt;2. You check current orderByType value for null&lt;br /&gt;&lt;strong&gt;if (ParamUtil.getString(request, &amp;#34;orderByType&amp;#34;)==null) {&lt;br /&gt;    PortletPreferencesFactoryUtil.getPortalPreferences(liferayPortletRequest).setValue(&amp;#34;com_liferay_journal_web_portlet_JournalPortlet&amp;#34;, &amp;#34;order-by-type&amp;#34;, &amp;#34;desc&amp;#34;);&lt;br /&gt;}&lt;/strong&gt;&lt;br /&gt;meanwhile if you have find a way to override the JournalDisplayContext.java then do share it.</summary>
    <dc:creator>Jibin Johnson</dc:creator>
    <dc:date>2019-08-31T21:08:12Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7.0 Override JournalDisplayContext.java</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111552155" />
    <author>
      <name>Carmine Azzaro</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111552155</id>
    <updated>2018-11-14T16:41:04Z</updated>
    <published>2018-11-14T16:41:04Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;goal to achive: default order descending in web content portlet&lt;/p&gt;
&lt;p&gt;I tried to do this by overriding (module fragment project)
  toolbar.jsp but here i'm not able to modify the variable journalDisplayContext&lt;/p&gt;
&lt;p&gt;So i need to override the JournalDisplayContext.java to set the
  default order to &amp;quot;desc&amp;quot;, or is there any other way to achive
  my goal?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks very much&lt;/p&gt;</summary>
    <dc:creator>Carmine Azzaro</dc:creator>
    <dc:date>2018-11-14T16:41:04Z</dc:date>
  </entry>
</feed>
