When a file is uploaded in Liferay (through the Control Panel for example), it is stored in
To change the default location, add a line to portal-ext.properties:
Let’s say you have a portlet that is only visible to logged in users. Once you set that up, by default, Liferay shows an error message in place of the portlet to unauthorized users. The error message looks something like this:
There are two ways to do this depending on what you want to achieve.
Let’s say you want to apply this to all portlets in the portal. To do this,
That should do it.
If you want to set this property on a per-portlet basis:
Note that the second method overrides the first.
By default, all the documentation provided on Liferay is for JSP. For permissions-related configuration, read the LiferayInAction section (4.3.8 Protecting data with Liferay permissions), and then refer to http://kofler.nonblocking.at/2012/06/using-liferay-6-permissions-within-a-jsf-portlet/ for the finishing touches.
This guide assumes that you have the Liferay Eclipse IDE, Liferay SDK and server set up already. The steps below create a basic portlet that is ready to use PrimeFaces.
Step 1: File->New->Liferay Project. Configure as per screen shot. Click Next.
Step 2: Choose JSF 2.x. Choose Primefaces. Click Finish.
Step 3: Open up faces-config.xml (docroot->WEB-INF->faces-config.xml). Replace <phase-listener>com.liferay.faces.bridge.lifecycle.BridgeDebugPhaseListener</phase-listener> with <phase-listener>com.liferay.faces.util.lifecycle.DebugPhaseListener</phase-listener>.Due to some bug in the IDE, the wrong value is populated in the XML. Until the bug is resolved, this is the workaround.
Step 4: By default, all Primefaces portlets use the “aristo” theme. If you need to change the theme, open up web.xml, located in docroot/WEB-INF, and follow the steps given in http://www.primefaces.org/themes.html. Note that changing the theme of one portlet changes the theme for all portlets on that page.
Step 5: Deploy the portlet by dragging the project from the Package Explorer to the Server. If the portlet is deployed successfully, it is now available to be added to the portal. Go to the portal in your web browser and log in. Once logged in, go to the “Add” menu option to the top-left of the screen and select “More…”
Step 6: Under the Sample option, you should find your portlet listed. Add it to your portal. Your portlet should show up after you refresh the page.
I’ve been trying to learn how to use CodeIgniter over the past few days. Have to say that it’s been quite easy. I spent a few hours following the basic tutorial that they have on their site and I picked up most of what was needed for me to build a website.
It’s a simple MVC framework. No extra bells and whistles. Only what’s required to get the job done. It does a good job of helping out but at the same time, staying out of your way. In some ways, it reminded me of Django, the python framework. The tutorials were clear and concise, the documentation was well laid out and the framework itself was easy to get started with.
I think I’m gonna enjoy working with CI.
While learning Drupal, I came across Drupal Gardens. It’s an excellent site that uses Drupal as a service.
With Drupal Gardens, there’s nothing to install and no servers to manage. They take care of everything on the backend.
They offer a collection of site templates and themes to help you get started faster. Use their ThemeBuilder to customize an existing theme or design your own from scratch.
But the real selling point of Drupal Gardens is their “No platform lock-in” policy. You can test, prototype, start small and grow. When you’re ready, export your site – theme, users and content – and go full Drupal.
Yes! You read that right. You can export your entire site and take it with you. Brilliant!
I loved it.