我对Liferay Startup Events有疑问.
在Liferay文档中,它给出了:
启动事件
输入扩展的逗号分隔的类名列表
com.liferay.portal.struts.SimpleAction.这些类将在指定的事件中运行.
有人可以告诉我和之间的区别是什么global.startup.events,application.startup.events并且任何机构可以告诉我在什么情况下我们需要覆盖它们?
并且这两个启动事件应该延伸com.liferay.portal.struts.SimpleAction吗?SimpleAction除了这个,我在里面找不到任何东西:
public abstract class SimpleAction {
public abstract void run(String[] ids) throws ActionException;
}
}
Run Code Online (Sandbox Code Playgroud)
我也想知道这个类什么都不包含,Liferay如何知道要读取和处理的XML文件?
谢谢
我正在使用Liferay 6作为应用程序.我想使用Jquery作为用户界面部件而不是默认的Alloy.为此,我通过这种方式编辑liferay-portlet.xml,将JQuery与Liferay集成在一起
<portlet>
<portlet-name>First</portlet-name>
<icon>/icon.png</icon>
<instanceable>true</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<header-portlet-javascript>https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js</header-portlet-javascript>
<header-portlet-javascript>https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js</header-portlet-javascript>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>First-portlet</css-class-wrapper>
</portlet>
Run Code Online (Sandbox Code Playgroud)
这是我的view.jsp
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />
This is the <b>Sai Nath</b> portlet.
Run Code Online (Sandbox Code Playgroud)
现在请告诉我如何将以下Jquery Hello World Alert放在view.jsp中
这是我的Jquery Hello World警报程序
<html>
<head>
<title>jQuery Hello World Alert box</title>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function(){
$("#cl").click(function(){
alert("HELLO WORLD!");
});
});
</script>
<body>
<font color="red">CLICK BELOW BUTTON TO SEE ALERT BOX</font>
<br>
<br>
<button id="cl">Click Me</button>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
请让我知道,谢谢你的阅读.
我正在尝试使用mysql配置hibernate.
以下是hibernate.cfg.xml:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/TestDB</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root123</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hdm2ddl.auto">create</property>property>
<property name="show_sql">false</property>
<!-- Use the C3P0 connection pool provider -->
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
<mapping resource="com/psl/course/Course.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Run Code Online (Sandbox Code Playgroud)
但是,我收到了以下错误.堆栈跟踪如下,
15 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA 31 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found 31 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist 47 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling 78 [main] …
我有一些与Liferay与hibernate交互相关的问题.我们出于某些原因希望从应用程序中消除此层.因此以下问题:
我知道Liferay与Hibernate打包在一起,使用Hibernate API简化了Liferay数据库中对数据的访问.
主要是我们基本上想要删除几乎所有我们目的不需要的东西.
PS:我找不到一个适当的链接来回答上面的问题,因此在这里.
我将通过4个简单的问题总结逻辑:
以前的一些场景是否会改变父页面的行为?我的意思是,允许您对子页面的权限会使您自动获得查看父页面的权限.
此外,hidden和*non-hidde*n页面之间有什么区别?我可以通过链接浏览!
如何使用自定义的服务方法,Liferay的主题,在速度文件一样init_custom.vm,portal_normal.vm等等.
我看到liferay在文件中提供了许多辅助实用程序类的变量,例如$portalUtilfor PortalUtil,$getterUtilfor GetterUtil等等init.vm.
那么有可能获得我的自定义服务的实例,com.my.custom.service.MyCustomLocalServiceImpl如liferay 的实例或服务UserLocalServiceImpl吗?
这是一些伪代码,用于了解我需要的内容:
// this code calls method from MyCustomLocalServiceImpl class to fetch items
#set ($listOfItems = $myCustomLocalServiceUtil.getAllItems())
// this code calls method from UserLocalServiceImpl class to fetch users
#set ($listOfUsers = $userLocalServiceUtil.getUsers(0, 99))
Run Code Online (Sandbox Code Playgroud)
环境:Liferay 6.1 CE GA1
ALTER当已经为现有表定义主键时,我需要知道如何使用table命令定义复合主键?
数据库: Oracle 11g
我想创建一个使用新页面Web Content Display与Velocity Templates和Structures.
在我的页面上,我希望有多个选项卡,并且每个选项卡上需要以编程方式从现有portlet的模板添加.
我知道如何将现有的portlet添加到我的主题,($theme.runtime("portlet_id"))但我找不到将portlet添加到速度模板的方法,因为$theme对象在Web内容显示模板中不可用.
你能否告诉我是否可以在模板中添加一个portlet?
如果有,怎么样?
谢谢.
我想用Eclipse JUNO for Liferay 创建我自己的Portlet .我已经google了很多,但这只是为了让我使用netbeans所以任何人都可以指导我或者给我链接在eclipse中从头开始创建portlet的教程.
我试过以下内容
ADD->新的Liferay项目
然后它没有在liferay中显示我创建的portlet
我已经成功地在我的windows7中安装了liferay,并且我还集成了现成的书籍portlet,但只是创建了我自己的简单的hello world portlet
甚至在我甚至关注此链接http://www.youtube.com/watch?v=-EbyIbMWrCI之前, 但它在管理员帐户中的更新管理器选项中显示我的portlet状态为"UNKNOWN"
在Liferay中,当页面添加到站点时,它默认授予VIEWGuest角色的权限.

是否有任何方法(通过配置或通过挂钩或其他方式)禁用此功能,以便VIEW在将新页面添加到站点时默认情况下为Guest角色禁用权限?