Today we will discuss Window States in Liferay. Their are basically 3 states :-
1)Normal
2)Maximized
3)Minimized
So lets start this step by step:-
Step 1:-Create Liferay Project and Portlet
Create a Liferay plugin project and than create a portlet in it. You can check snapshot in my previous blog Developing a MVCPortlet with Multiple Actions in Liferay.
Step 2:-Change view.jsp
Open view.jsp and paste this content:-
view.jsp
Explanation:-
Here we simply create a 3 renderURLs each represent different window states.
Step 3:-Check the Output
Deploy the portlet and Check the Output
A)Click on Normal Window State
Now Check the URL:-
http://localhost:8080/web/guest/welcome?p_p_id=demo_WAR_teststateportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1
Focus on :- p_p_state=normal
B)Click on Minimized Window State
Now Check the URL:-
http://localhost:8080/web/guest/welcome?p_p_id=demo_WAR_teststateportlet&p_p_lifecycle=0&p_p_state=minimized&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1
Focus on :- p_p_state=minimized
Note:- You can Go back to normal State by Clicking on Restore.
C)Click on Maximized Window State
Now Check the URL:-
http://localhost:8080/web/guest/welcome?p_p_id=demo_WAR_teststateportlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view
Focus on :- p_p_state=maximized
Note:- You can Go back to normal State by Clicking on Return to Full page.
Open view.jsp and paste this content:-
view.jsp
Explanation:-
Here we simply create a 3 renderURLs each represent different window states.
Step 3:-Check the Output
Deploy the portlet and Check the Output
A)Click on Normal Window State
Now Check the URL:-
http://localhost:8080/web/guest/welcome?p_p_id=demo_WAR_teststateportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1
Focus on :- p_p_state=normal
B)Click on Minimized Window State
Now Check the URL:-
http://localhost:8080/web/guest/welcome?p_p_id=demo_WAR_teststateportlet&p_p_lifecycle=0&p_p_state=minimized&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1
Focus on :- p_p_state=minimized
Note:- You can Go back to normal State by Clicking on Restore.
C)Click on Maximized Window State
http://localhost:8080/web/guest/welcome?p_p_id=demo_WAR_teststateportlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view
Focus on :- p_p_state=maximized
Note:- You can Go back to normal State by Clicking on Return to Full page.
Hope this will Help....
Related Post:-
Related Post:-
Developing a MVCPortlet with Multiple Actions in Liferay
Categorization in web content
Fetch Web Contents Programmatically
Get Journal Article Fields Programmatically
Embedding a Portlet in Web Content
Creating tabs using Web Content
Embedding a Web Content/Journal Article in a Portlet
Index Post Processor Hook
Categorization in web content
Fetch Web Contents Programmatically
Get Journal Article Fields Programmatically
Embedding a Portlet in Web Content
Creating tabs using Web Content
Embedding a Web Content/Journal Article in a Portlet
Index Post Processor Hook
No comments:
Post a Comment