0
votes

Asked on Liferay Forums - post

I'm creating a Hook on top of Liferay's Doucment and Media Portlet to extend the original JSP. Extending the JSPs are straightforward, but I have no idea what they might be called. Sure I can guess but who wants to do that? In particular, I want to add an additional menu item on Document and Media's > Document > Edit Dropdown Menu

Does Liferay provide a glossary or index on where I could find this and any other JSPs I might extend?

2
Long and tedious, but you might want to look at the source code and drill your way into the right portlet.Miguel Pereira

2 Answers

1
votes

Simple answer: No.

While JSPs are easy to overload, there's no API involved and technically you're in the implementation and not the API. Thus there's no assumption about good maintainability, no promise for stability and no API-style documentation at all.

I'm aware that JSPs are popular to overload, but they're actually dangerous and must be used with care.

You will have to view source for this kind of modification. But as soon as you realize that you're hitting the implementation, it all makes sense (and you don't really want to overload them any more)

0
votes

Here's an answer I got from another member on the forums:

Hey Clay,

There is no "glossary" per say (at least not one that I am aware of) but once you understand the pattern that LR uses it can be pretty straight forward. First things first, if you don't already have it in place, make sure you download the source for the version of the portal that you are using.

under the portal-web module you will find /html/portlet. This is where all the views for the Liferay portlets are stored. Most of them are pretty straight forward. For example, doucment_library in your case.

The other thing you want to look at is the struts-config.xml file (portal-web/WEB-INF). In that file you can search for "documents" and you will find all sorts of documents and media references. What you are interested in, for example, is something like this I think --

1 <forward name="portlet.users_admin.edit_organizationpath="portlet.directory.view_organization" />

The "path" attributes are references to the jsp files. So in this case, /html/portlet/directory/view_organization.jsp -- /html being implicit for these paths. I often reference this file to understand where the struts actions for things in the control panel go.

So, no "one pager" with all the details, but once you understand the pattern (which is super basic) it's easy peasy to get around.

Hope this helps!