Liferay get current friendly url
This method is only used internally. An anchor URL will cause the user's browser to automatically jump down to the specified portlet after the page loads, avoiding the need to scroll. When a page is accessed while impersonating a user, it will appear exactly as it would to that user. In an encrypted URL, the value of every parameter will be encrypted using the company's key.SEE VIDEO BY TOPIC: Lesson 2: Adding a Friendly URL
Post a Comment. Search for:. Friday, June 13, In liferay generally we can create any Portlet URL and portlet URL consist of many request parameters and its values apart from those we will add some more request parameters so that finally URL seems to very long. When we request the URL in browser address bar it seems to very long and have many parameters.
Some time we might not need all parameters and its values and some of parameters always same, some parameters may be default and some parameters may be constants for every time. We consider all above in mind we can shorten the request URLs. Generally in the Portlet Request URL its look like always query string so we can also change the pattern of Portlet URLs from query string pattern to other pattern so that is very convent to remember and understand by others. Working with Liferay URLs.
Friendly URL Implementation. Configure URL routes in xml file. We will decide different pattern for the Portlet URLs and its parameters and values we will configure in the.
We have different xml tags in the DTD so should use predefined tags bases on our need. The following are the important tags. The routes element is the root of the deployment descriptor for a set of Liferay. Friendly URL mapper routes. The route element contains information on a single route. The pattern element specifies the pattern of the mapped friendly URL and this will apper in the address bar. The generated-parameter element specifies the pattern of a parameter that will be generated from other parameters when a URL is recognized.
When a URL is built, these virtual parameters will be parsed from the generated parameter and made available in the route pattern for constructing the URL. It have the name attribute specifies the name of the parameter to be ignored. The ignored-parameter element specifies a parameter that should be ignored and not included in generated URLs. Ignored parameters do not effect URL recognition. The implicit-parameter element specifies a parameter that is not present in the route pattern.
When any parameter has static values then we can make it as implicit-parameter. The overridden-parameter element specifies a parameter that should be set to a certain value when a URL is recognized. This override value will be set regardless of any preexisting value, including one from a implicit-parameter or one extracted from the URL.
Most of Tags description was took form liferay DTD file. When we configure Friendly URL tags we need follow the order otherwise its show syntax error. Order as follows. We need one java implementation class to generate friendly URLs based on routes. We have liferay implemented class i. Apart from this we can also implement our own implementation class so that it should generate URLs as for our requirement.
Configure the Friendly URL information in liferay-portlet. Configure Friendly URL Configuration java class, routes configuration xml file and its main friendly mapper in liferay-portlet. When we navigate to each page we just need jsp page name in the URL.
The following is implementation. Step: 1. Configuration in liferay-portlet. Step: 2. Configure routes in configuration file and we need to defined pattern by using friendly URL xml tags.
The following is configuration in employee-management-friendly-url-routes. In the pattern tag we need specify the pattern how we want see the URL after generation in the browser address bar and we are using generated parameter for mvcPath so that each time mvcPath parameter value replaced in pattern path. We need to create this xml file in src directory. We need provide fully qualified package name in the configuration when we do in liferay-portlet.
Scenario: 2. Assume our URL pattern as follows. In the pattern tag we specified the actual pattern how we want see and we are using generated parameter for javax. We already know we are performing action and we need portlet action URL. Add Employee Page. Edit Employee Page. Search Employee Page. Scenario: 3. Assume we are deleting employee by Emplyee Id and the following is our pattern. Same we can think get employee by employeeId. When pass employee Id then particulate employee will be deleted same when we pass employee id then employee will be return these are based on action we used.
We will use regular expression for each parameter so that it will consider the value with given regular expression. Example employee should be digit. Insatiable Portlets. If the portlet is instanceable then we should always use instance id in the URL pattern when we configure routes otherwise it could not generate friendly URL.
Portlet liferay-portlet. Portlet Action Class. Liferay IDE 2. Deployment and its Working. Download portlet you can source or war file to deploy into liferay portal as your convenient. Once portlet successfully deployed drag the portlet in any desired page. Portlet is available in sample category name as Employee Liferay Mvc. Now access jsp pages and perform the action then observe all URL in the browser address so that you can see very shorten URLs.
Portlet Screens:. Default Page. Reference Links. Meera Prince. Liferay Top Contributor Award Winne r. Email This BlogThis! Share to Twitter Share to Facebook. Newer Post Older Post Home. Subscribe to: Post Comments Atom. Liferay AUI Validator. Environment: Liferay 6. Liferay Spring Portlet.
Download Lifer Liferay Search Container. Introduction: Liferay have very build in UI components and we can simply use those UI components when we develop portlets. About Me Meera Prince View my complete profile. Powered by Blogger. Total Pageviews. Subscribe To Posts Atom.
Comments Atom. Follow by Email. Liferay Savvy. User expand 2 liferay util 2 liferay. Liferay ui search form 1 Liferay servlet filter hook 1 Liferay spring annotation 1 Liferay theme development 1 Liferay theme plugin 1 Liferay theme velocity variables 1 Liferay velocity variables 1 Liferay virtual host 1 Liferay web content email forms.
Web content structure 1 velocity templates 1 vm varibles 1 wcm 1 web application 1 web applications 1 web content display 1 web content email forms 1 web content froms 1 web content structures 1 web content template 1 web content templates 1 web content to pdf 1 web content velocity variables 1 web content workflow 1 web server 1 web service invoker 1 wedeploy 1 workflow definition xml 1 workflow designer 1 xhtml 1 xpath 1 yahoo news 1 yahoo stocks 1 yahoo weather 1 yql 1 yui 1.
Find Us On Facebook. OSGi bundle application context Application Scope application server arrayble operator Asset Framework asynchronous audit 6. Liferay DXP Custom Field Liferay Declarative Service Liferay Declarative Services liferay deploy portlets liferay deployment liferay developer certification liferay development Liferay development tools liferay dialog liferay doc conversion liferay doc viewer liferay dockbar notification liferay document converter liferay document library record Liferay Document Media ADT liferay document viewer liferay document viewer.
Liferay hook filter Liferay hook plugins liferay hot deployment liferay IDE liferay image magick liferay image slide show Liferay individual permission liferay inherited roles liferay install portlets liferay installation Liferay Inter Portlet Communication Liferay Interview Questions liferay ios liferay ipc Liferay ivy liferay ivy problem Liferay java 1. Liferay ui search form liferay search result liferay server side validation Liferay Service Liferay service builder liferay service builder portlet liferay services liferay services in velocity Liferay servlet filter hook Liferay Servlet Request Wrapper liferay setup liferay site liferay sites Liferay SMS Liferay SMS API Liferay SMS Portlet Liferay SMS URL Liferay SPA Liferay spring Liferay spring annotation liferay spring annotations liferay spring portlet liferay ssl liferay sso liferay store liferay structures Liferay Struts liferay table joins liferay tag library liferay tags liferay templates liferay test liferay theme Liferay theme development Liferay theme plugin Liferay theme velocity variables liferay themes Liferay Theoretical Architecture Liferay Third Party Jars liferay tips liferay tld liferay toggle liferay tomcat liferay topics liferay tutorial liferay ui column liferay ui custom attribute liferay ui search liferay ui search container liferay ui tags liferay ui tags.
User expand Liferay Upgrade process liferay url liferay user liferay user group liferay user groups liferay user roles liferay user tracker liferay util liferay util tags liferay validation liferay validator liferay velocity Liferay velocity variables Liferay virtual host Liferay VM Liferay Vocabulary liferay wcm liferay weather liferay web content Liferay web content email forms.
Post a Comment. Search for:. Friday, June 13, In liferay generally we can create any Portlet URL and portlet URL consist of many request parameters and its values apart from those we will add some more request parameters so that finally URL seems to very long.
Removing the Primary Key from Portlet URLs
Subscribe to RSS