我是liferay的新手,想要创建一个具有多个jsp的自定义Web表单portlet。 就像在一个jsp上我必须显示用户的所有详细信息,即名字姓氏等,使用下一个按钮(它将用户重定向到另一个jsp),其中包含带有提交按钮的消息框。 点击提交按钮后,两个jsp的数据都将保存在数据库中! 我创建了一个register.jsp页面
<%@include file="/init.jsp" %>
<html>
<body>
<form action="<portlet:actionURL></portlet:actionURL>" method="post" name="userForm" onsubmit="return Account();">
<b>First Name:</b>
<input type="text" name="<portlet:namespace/>firstName" id="<portlet:namespace/>firstName"/><br/>
<b>Last Name:</b>
<input type="text" name="<portlet:namespace/>lastName" id="<portlet:namespace/>lastName"/><br/>
<b>E-mail:</b>
<input type="text" name="<portlet:namespace/>eMail" id="<portlet:namespace/>eMail"/><br/>
<b>Age:</b>
<select name="<portlet:namespace/>age">
<option value="20">20</option>
<option value="20-25">20-25</option>
<option value="25-30">25-30</option>
<option value="30-35">30-35</option>
<option value="35+">35+</option>
</select><br/>
<b>Region:</b>
<select name="<portlet:namespace/>region">
<option value="east">east</option>
<option value="west">west</option>
<option value="north">north</option>
<option value="south">south</option>
</select><br/>
<b>Gender</b><br/>
<input type="radio" name="<portlet:namespace/>sex" value="male">Male<br>
<input type="radio" name="<portlet:namespace/>sex" value="female">Female<br/>
</form>
<br/><a href="<portlet:renderURL/>"> <button class="btn btn-primary">Go Back</button></a>
<portlet:renderURL var="submitDetailURL">
<portlet:param name="jspPage" value="/submit.jsp"/>
</portlet:renderURL>
<a href="<%=submitDetailURL %>"> <button class="btn btn-primary">Next</button></a>
,下一个按钮将重定向到submit.jsp页面
<%@include file="/init.jsp" %>
<html>
<body>
<form action='<portlet:actionURL></portlet:actionURL>' method="post" name="valid" onsubmit="return Account();">
<b>Message:</b>
<textarea rows="4" cols="50" name="<portlet:namespace/>address">
</textarea>
<a href="<portlet:renderURL/>"> <button class="btn btn-primary">Go Back</button></a>
<input type="submit" name="addUser" id="addUser" value="Submit">
</tr>
</form>
</body>
</html>
我的service.xml是
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd">
<service-builder package-path="com.yogisha">
<author>Sony</author>
<namespace>yogisha</namespace>
<entity name="Campaign" local-service="true" remote-service="false">
<column name="campaignId" type="long" primary="true"></column>
<column name="firstName" type="String"></column>
<column name="lastName" type="String"></column>
<column name="eMail" type="String"></column>
<column name="age" type="String"></column>
<column name="region" type="String"></column>
<column name="sex" type="String"></column>
<column name="content" type="String"></column>
</entity>
</service-builder>
但它似乎不起作用。谁能告诉我我错过了什么?