Left Navigation Menu :Liferay 6.2 - java

I am in the process of migrating my current web application to liferay.I have requirement to customize left navigation bar according to my app.
For e.g. I have left side vertical navigation menu with items as below
Home
Company Info
Revenue Details
When clicked on each of the menu items separate portlet would be opened in the right content pane. For instance,company information should go to to the custom company portlet I have created .
Could you please help me understand how can I acheive this in Liferay 6.2? Thank you.

If you want to display portlets deployed on a page using left navigation bar then you can use Panel Pages. Search for "Panel Pages" section on this page.
If you want to have the liferay page navigation itself as a vertical bar instead of horizontal then you can create Theme to style the navigation. navigation.vm is the file you are looking for.
As per the comment below, here are my suggestions:
Suggestion I
Use 30-70 layout.
On the 70-side (right-hand) you can put all your portlets one after another.
On the 30-side (left-hand) you can put a web-content display portlet.
So in the web-content display portlet, in the editor you can use Source tab to include javascript/css/html for the clickable links to portlet.
There are various javascript libraries available for giving scrolling effect on click of the link.
Suggestion II
This is also similar suggestion, atleast the concept is the same.
the only difference is that you can have a custom layout with web-content already embedded in the layout and also have the libraries and javascript written in the layout.
Suggestion III
if you want automated left navigation pane i.e. when the page loads it has the portlet-name and links to the portlets on the right side without manual intervention.
This would require a lot of coding inside layout.
You can utilize the different variables available in the layout to find the portlets on the page and create the links.
Have a left section in layout and populate the links found in (3) and the right side would be as usual.
You can utilize the portlet-Ids or css classes for scrolling to them when a particular link in web-content is clicked from the Look & Feel tab from Configuration tab as follows:
Hope this helps.

Liferay wraps portlet content that get displayed inside a div tag having unique portlet instance id.
In portlet header, Look and Feel -> Advanced Styling, it displays that portlet id for example
Portlet ID: #p_p_id_73_INSTANCE_xZVK6VFSqAzJ_
This ID may be used to hash tag in anchor to move focus to that portlet section.
Note: If the portlets on the page are instanceable, then removing an instance and adding instance again get new instance id. So, previous hash tag link doesn't work.

If you want the Left Navigation then use 30-70 Layout and use SiteMap portlet on left side

Related

What is Vaadin UI and how to navigate between UI's

First question: I am trying to create web app using Vaadin 8.3.1 but I am struggling to understand concept of the UI class. I was reading docs but still I can not somehow understand it. I thought that it is just a basic web page which is currently displayed but I am not sure about that definition. So my question is what exactly is UI, how can I navigate between UI's, when to use view and when to use UI ?
Second question: I was reading docs about navigation between views but I was not able to display anything. In UI all we have to do is to setContent and that is it. But what about Views ? How can I display something using views ?
Thanks for any help !
The basic concept of Vaadin is to create single page web applications. The UI class is the root of the dynamic web page, which has changing content, the views. So typical Vaadin application does not consist of multiple UI's, but single one. (It can have many, but I said typical)
One UI can thus have many views. Usually in main UI you set root content, a main layout that consist of menu and content container (a layout) for Views. When Navigator is setup, it is given that content holder, and then based on navigation Navigator will be placing the views to content area. This is described in detail here:
https://vaadin.com/docs/v8/framework/advanced/advanced-navigator.html
Apparently you want to integrate Spring with Vaadin, and for this you need Vaadin Spring add-on. The documentation is here:
https://vaadin.com/docs/v8/framework/advanced/advanced-spring.html
To get most out of the documentation, you need example application, which you and inspect and play with. On Vaadin web page, there is full stack functional demo application, which demonstrates application architecture made with Vaadin + Spring.
https://vaadin.com/start/v8-full-stack-spring

IBM websphere portal programatic page creation

I am asked to Create a Portal Website on a Button Click
When a button is clicked on Portlet i have to Create a Page and add content and theme to it programatically using the action method of that portlet
However i am not able to find how to do this using java.
Wherever i have seen i could see how to do it on Websphere Portal Admin
I am using http://wpcertification.blogspot.in/ and http://www-10.lotus.com/ for reference and not able to find how to do this .
For example from UI http:localhost:10039/wps/portal
i can do the same by following steps
1. Click on Administration
2. Click on Manage Pages
3. Create new Page
4. Select default Theme for page
5. goto page
6. Add Content or Portlets
Server used: IBM websphere Portal 8.5
Technology: Java /Spring/Portlet
I am still not sure if portletfactory can do the same work as i am totally new To this so can someone guide on how to move forward
Expected End result: create a portal website with few dynamic portlets created on a button click based on some inputs and the website should be saved on a URL.
You will have to use the Controller SPIs for what you want to do. Here are links to the documentation:
http://www.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/dev/ctrlrapic_ovu.html
http://www.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/dev/ctrlrapit_crt_rsrc.html
Sorry for the late answer, but I was finally able to solve this issue with the help of a post by Georgy Gobozov. I used the Migration Script Created by him to handle the page creation -
Page Create Code and Copy.
This really helped me in solving the issue. With this I was able to create pages on runtime and add portlets to them on a button click.

Managing content in liferay

I am using liferay 6.2 for migrating my existing web application to liferay.I have done below things:
-->created my own theme extending the _styled theme
-->customized the navigation to have fixed sidebar on the left and content area on the right.
-->Added 3 web content display portlets dynamically and added the content into each of them.
I have all the portlets residing on the same page,these are traversed by using navigation bar on the left side. Now I have new requirement to show content depending on the client.
For e.g. I have 3 client's data right now mixed all together across all portlets ,I have requirement to segregate all the content.For e.g. If user logging in work for X client ,he/she should only see the relevant content . If there is some content which is common to all it should be displayed as it is.
There should also be a way to add/remove client at runtime.Is liferay multi-site capability something I can make use of?
How can I go ahead and achieve this? Any inputs will be highly appreciated.

How to create a view in eclipse which contains SWT components?

I am trying to create a view in eclipse. I want my view to contain a Textfield and a button. the action is triggered by clicking on the button and some processing will be done on the inserted query in the textfield. can anyone suggest me a link to a tutorial or example doing that?
Thanks
You can create two quick samples that together show you what you've asked for. You do that by using the new project wizard to create a plugin project. One of the last wizard pages has a list of templates to choose from. If you create a plugin using the "with a view" template, you'll see how to create a view. Go back and create a second plugin with the "multi-page editor" template and you'll see examples of buttons, their event handlers and text fields. It should be easy to see how to code up the buttons and texts in the view.

show or hide a portlet based on the event of another portlet

I m new in Liferay portlet. Can any one tell me how I can show or hide a portlet based on the event of another portlet. I want coding in ice:spaces only not any other way. If someone know solution for this please reply me as soon as possible.
Note: I m using ice:spaces in xhtml not .jsp file.
Thank you.
If you're using standard portlet technology this is not possible in a direct way. If using JSR 286 (Portlet 2.0) you could send an event (or a public render parameter) so that the portlet you want to hide can set its window state to minimized (you still see the title). Alternatively you could set the window state of the portlet requesting to hide others to maximized, this would hide all other portlets.

Categories

Resources