Adding Workflow to custom portlets (created by Plugins-SDK) - java

I am new to liferay.
I am using Liferay 6.1.1 CE.
I want to add workflow (Kaleo) to a portlet which contains two textfields and a button.
The portlet is created through Plugins-SDK.
I've already gone through this blog: How to add workflow capabilities on Knowledge Base articles or any custom assets in plugins
But I just cant get so much information for my need.
Help me.

Try following it may help you
http://www.cignex.com/articles/applying-advanced-workflow-custom-assets-liferay-6
http://liferayzone.wordpress.com/2013/11/29/kaleo-workflow-configuration-for-custom-portlet-in-liferay-6-1/
Download workflow bundle and follow the steps which i specified in the document.
https://sourceforge.net/projects/meeralferay/files/LiferayWorkFlowPortlet

Related

How to create a documentation module in OpenXava?

I need a documentation module in my OpenXava application. Basically it's to allow the user consult the manual in case of doubt.
I think in HTML format.
I saw in the OpenXava documentation the possibility of creating a documentation module:
https://openxava.org/OpenXavaDoc/docs/application_en.html#Application-Documentation%20module
But it only works with Liferay or WebSphere Portal.
Is there a way to do it wihout Liferay or WebSphere Portal?
It is true that the documentation modules are only available within a portal, however the help system works without portal and I think it's just what you're looking for. It can be activated configuring some properties in xava.properties.
Note the Help part in the following doc:
https://openxava.org/OpenXavaDoc/docs/customizing_en.html#Customizing-Xava%20Properties%20Settings
Something like this in xava.properties could work for you:
helpAvailable=true
helpPrefix=help/
If the help is a folder called 'help' inside your application.
Also you can put the help in another server:
helpPrefix=https://www.example.com/help
If it ends with underscore it can have multilanguage support, thus:
helpPrefix=https://www.example.com/myapplication/help_
Where it looks for help_en.html, help_es.html or help_fr.html, depending on the browser language.

Creating New ProjectType Netbeans Plugin

I am going thru official tutorials here and here. It pretty much summarise how to provide support of new project template. Just one thing is not clear to me. I am trying to replicate screens of PHP plugins as given below:
Selecting Project Category
Set path/Folers etc for Project Creation
I exactly need these two screens. Is there some existing Dialog template that I can use or I have to create from scratch?

adding vaadin ui to existing java web app

I am working to create a UI using Vaadin, now I want to add this to an existing java web app.
Do I simply need to add the Vaadin jar file, and the java files of vaadin to that web app?
Or is there some procedure to follow, when doing this?
You also need to ensure that the Vaadin ApplicationServlet is being called, and is being sent the right requests. The VAADIN directory has theme information; you need to ensure it is being served as well, or is being served from the code base directly.
See the Book of Vaadin for details on how to configure your web.xml to ensure the right things happen.
Just add the vaadin.jar file to your WEB-INF/lib directory and you're good to go.
edit: see Ross Judson's answer.

Adding content to Liferay via API

I am starting using Liferay Portal and I have two basic needs which I would like to achieve with Liferay.
Is there a posibility to add content to CMS through API level? I would like to insert some data "from code".
More important. How to achieve such situation that for every created user there will be its own homepage generated with some predefined template elements on it?
I have tried to Google something so far, but I did not find it helpful. Maybe some keywords?
After some analysis of documentation devoted to services and ServiceBuilder I realized that it is not what I want.
Let me show an example based on Websphere.
In Websphere we have bunch of EJB components available to perform some actions, exchange information with portal, easy to use. Isn't there any similar mechanism in Liferay not involving web services?
My recommendation for this kind of question is to take a look at the sevencogs-hook sourcecode. The structure of this hook is basically just a long script that runs once, setting up a complete demo site with users, sites, pages, content etc. The code runs once (after the first deployment) and then never again. There are no (obvious) conditionals, no context to understand etc.
You can basically just step through everything and - in that process - understand how content (and pages, images, blog posts, etc.) are created and positioned on pages in Liferay.
This hook accesses the Java API, a very similar API is available through Webservices. Basically all of Liferay's portlets also use the same API to do their business.
Edit: Additional information to keep this answer valuable/current: Sevencogs is discontinued, but still available in old releases (source & binary). The API has slightly changed, so compiling/running it will need a bit of work. James Falkner has blogged about the leftovers and lessons learnt - those snippets are extracted from sevencogs and contain the relevant code pieces to work with the API.
Looking at this page from the documentation: It smells like a SOAP interface (they mention some sort of document uploader service and I've read axis).
You'll find some url examples that should give a list of available webservices.
For number 1, you can use the one of the:
JournalArticleLocalServiceUtil.addArticle()
methods to programmatically add Liferay Web Content from a portlet. If you download the Liferay Portal Source you can see the structure of these methods.
For number 2, can create page templates with preconfigured portlets on them (through the Plugins-SDK), and then use the API to programmatically create the pages using one of the:
LayoutLocalServiceUtil.addLayout()
methods.
If you have any more speific questions about these comment back, and I hope this helps!

Liferay Customization of Management Pages

I'd like to understand how can I customize different pages in the Liferay management screens. For example:
I'd like to add a few fields to images that are being uploaded to the Image Gallery
I'd like to add new field types that I can use when creating new structures (for example, add a "phone number" field type so I can add it to new structures I'd like to create).
Another example would be to customize the Web Content search page and add/remove fields and customize it's look & feel.
Any pointers would be helpful, as I've read most of the stuff about developing for Liferay but could figure our where to start with doing stuff like that (without changing core Liferay files)
I don't think 2) can be done without changing Liferay itself (e.g. patching the source code).
You can customize all built-in JSP pages using so called "JSP Hooks". I have done that to customize the pages for the user administration (mainly removing confusing fields from them).
The basic idea is to provide a modified version of the core JSP page. Upon deploying the hook, Liferay will replace the built-in page with the customized version. When the hook is undeployed, Liferay activates the original page again.
The following pages should have enough information to get you started:
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Portal+Hook+Plugins
http://www.liferay.com/community/wiki/-/wiki/1071674/Custom+Fields+and+JSP+Hooks
http://wikis.sun.com/display/websynergy/Customizing+JSPs+using+hooks+plugin
Make sure you search in the Liferay forum as well.

Categories