Add a portlet (iframe) on LifeRay-EP (Liferay Enterprise Portal)

xiaoxiao2021-03-06  53

[Software Environment Introduction]: 1, I am using the Liferay-EP-2.0.0-JBoss-Tomcat version (hereinafter referred to as "Liferay-EP 2"), I installed her in the D: / NewportALRVER directory. 2. Use Eclipse as IDE, use UltraEdit as the primary source editor. My habit is to use Eclipse to use Eclipse to perform compilation. 3. The source code of the corresponding version is decompressed in the D: / Java_Workspace / Liferay-Portal directory. (Hereinafter referred to as "Liferay-Portal".) 4, the content I have to deploy is put in /server/default/deploy/ext.ear/ directory, relative to Liferay-EP 2 / Server / Default / Deploy /liferay-portal.ear/ directory. So the portal-web-complete.war said below is the /server/default/deploy/ext.ear/portal-web-complete.war directory, others are pushed. Below I said the "web-infault/efault/deploy/ext.ear/portal-web-complete.war/web-inf directory, is also relative to Liferay-EP 2 / Server / Default / Deploy / life-portal.ear / portal-web-complete.war / web-infers. 5, the following section XML configuration file is "XX-ext.xml" form, all of which are created with reference /Web-inf/xx.xml file. Using the "-ext.xml" file is to distinguish between the LifeRay-EP 2 itself.

[Objective]: Add a simple iframe to show a simple OA application.

【step】:

1. Go to http://sourceforge.net/project/showfiles.php?group_id=49260 to download the corresponding SRC. I downloaded Liferay-EP-2.0.0-src.zip.

2, under the Liferay-Portal / OA / SRC / COM / LIFERAY / Portlet / OA directory, followed by http://www.liferay.com/documentation/api/portal-ejb/com/liferay/portlet/iframeportlet.java. HTML creates its own iframeoAportlet.java.

3. Compile the source code in Eclipse. Copy the iFrameoAportlet.class file generated in the generation-portal / class / oa directory to D: /newportalserver/server/default/deploy/ext.ear/portal-ejb.jar/com/liferay/portlet / OA directory.

4, add: test_iframe COM .liferay.portlet.oa.iframeoAportlet 0 text / html Edit < / portlet-mode> com.liferay.portlet.strutsResourceBundle src http: // OASERVER / OAPATH / DB.NSF / FORMTODO? OpenForm auth true auth- TYPE form form-method post Basic-auth-user-name username Basic-auth-password Password < / preference> hidden-variables var1 = Hello; var2 = world

Power User user The main thing to note is: portlet-name: The names here need to be corresponding to the following steps. Here is "EXT_100". Portlet-Class: Here is the Class "com.liferay.portlet.oa.iframeoAportlet" written in the previously written. Portlet-preferences: This part is not well determined, and it is estimated that this part is mainly modified. 5, add: here is: ID: To the portlet to the previous Name, here is "EXT_100". Struts-path: For IFRAME, this path is useless.

6, add: Here you need to pay attention to: Category Name: This should be corresponding to the following steps. Here is "category.oa_todolist". Portlet ID: To correspond to portlet-name, here is "EXT_100".

7. Add the required text information required for the interface in the listAL-EJB.PROPERTIES.NATIVE file under the /portal-eb.properties.native file. Note: It is recommended to use the Notepad program that comes with the Window operating system to modify this file. Because you have to pay attention to the encoding format of this file. There are two in this example: category.oa_todolist = OA to do (test) javax.portlet.title.ext_100 = to do (test) Here you need to pay attention to: 7.1, category for category.oa_todolist Set a classification name for interface display. 7.2, for the specific this ID is "ext_100" portlet settings a content name displayed under Category.OA_TODOLIST.

转载请注明原文地址:https://www.9cbs.com/read-114407.html

New Post(0)