I have an admin-only portlet (you can't add it to a site). I can add the edit portlet mode with no problem and it appears under the gearbox Options menu as Preferences. However, I cannot add the Configure option, even though I do it exactly as shown in Liferay 6.2 User Guide. It does not appear under the gearbox Options menu as it should (as 'Configuration').
I did:
correctly add the default configuration action class in
liferay-portlet.xml
specify .jsp file in portlet.xml
add config portlet mode in portlet.xml
add config-template init param
In both liferay-portlet.xml and portlet.xml I also specify another <portlet>, which can be added on a site (and does not appear under admin content) for which Configuration appears with no problem. Even if I copy its configuration options to the first (the admin one), configuration option for it still doesn't appear.
So what should I do to make Configuration option for my portlet to appear?
Related
I have the next requirement: every user can change position of portlet in a page but this change is only applied for this user no for all. I know that it is possible with layout and it works fine (the portlets are possible move ), but my main problem is when "x" user changes the position of a portlet because it is applied for all users. so you have any idea for how do I this?
I work with liferay 6.2 CE
From liferay 6.1 onwards,it provides for page customizations,where in admin can defined certain sections of the page layout as customizable allowing users to add/move/delete portlets,in specific sections.These changes will be specific to the particular user and will not be visible for others.The user has the option to anytime view the default page or to reset his customizations as well.
In order to enable this,Edit page->customization settings->Show Customizable settings and check the required sections.
Please refer the Liferay documentation for further details.
I want to create a portlet where the portlet allow access to the remote application. That is the content of the portlet should be dynamic so for the same reason I want to add one option "Preferences" in the portlet (Where the look and feel and configuration options exists). In that preference page If will give some http url (http://localhost:8080/Myapp/Mypage) then on click of save button, the URL page should display in the portlet. How can I do that? Note I am going to use same portlet in different pages with different URLs.
Liferay's "Preferences" link shows the portlet in JSR-286 "edit" mode. That's all there is: If you implement this mode, you'll automatically get the Preferences link.
Why are they named differently? IMHO Edit-Mode is rather misleading as you're editing the preferences rather than any data displayed in the portlet.
You can use Liferay Iframe Portlet which allow access to the remote application.
Refer following url for detail description of look and feel and configuration options : Iframe Portlet
Can anybody tell me how can we call doEdit method? Is it used to edit entire portlet or Elements of portlet. If possible try to give me demo application. Thanks.
doEdit method gets called when you open Preferences screen of portlet.
If you use edit mode in your portlet.xml and provide edit-jsp init paramter, you will able to see Preferences as option on clicking on wrench icon. When you click on that icon at that time doEdit method gets called jsp mentioned as edit-jsp will be rendered.
Let me start with a statement that EDIT mode is a mode in which portlet configuration is done (e.g. in a weather portlet, this mode would be used to configure city for which a weather would be shown).
Now, doEdit() method is invoked when you request portlet in EDIT mode, just like doView() is invoked when requesting it in VIEW mode or doHelp() in HELP mode. This is nothing Liferay specific, but comes from Portlet specification (JSR-168).
So just invoke your portlet in EDIT mode to have doEdit() called.
For a complete demo sample you may check Liferay's official guide:
http://www.manning.com/sezov/
Just download sources and take a look at their Hello World portlet which includes calling and overriding doEdit().
I want to disable sharing of my portlets in liferay 6.1.0 CE so the "Sharing" button won't be visible.
In my portal-ext.properties i set the following property:
theme.portlet.sharing.default=false
But it don't work. I restarted the server and cleared browser cache.
Is there another way to disable this button?
The configuration property theme.portlet.sharing.default set default value for checkbox "Allow users to add Web Content Display to any website" by sharing-tab.
However, I don't found in source code any possibility to deactivate the sharing about configuration.
But you can create a Hook and override the jsp:
portal-web\docroot\html\portlet\portlet_configuration\tabs1.jsp
Here info how to override jsp: http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/overriding-a-j-4
There are numerous pages online that I have found that describe what I need to do. I need to change the portal_ext.properties file with the theme:
control.panel.layout.regular.theme.id=mytheme_WAR_mythemetheme
I've changed the property in my portal-ext.properties file and I've even added a copy of the file to my portlet structure (docroot/WEB-INF). I've deployed, restarted tomcat, etc. No changes at all.
What am I missing? Better question - Why is this so unnecessarily difficult?
Or you could do this from control panel.
Log in as Admin (test#lifery.com unless changed)
Make sure you have deployed your theme.
Go to: Control Panel → Portal Settings → Display Settings → Look and Feel → Default Control Panel Theme, and select your theme from the drop-down options.
Correct name of the file is portal-ext.properties not portal_ext.properties.
This file should go under your LIFERAY_HOME folder where LIFERAY_HOME is where liferay is deployed. Just create or edit this file at this location with this property and restart the server