struts2 action 保存应该怎么写?
Meal表:MealId,typeId,userId,num,ucomment //外键...
Meal表:MealId,typeId,userId,num,ucomment //外键关联MealType表:typeId,typeName,priceUser表:userId,userName,password,fullname,answer Meal.javaprivate Long mealId; private MealType mealType; private MealUser mealUser; private Long num; private String ucomment;//getter&setter MealType.javaprivate Long typeId; private String typeName; private Double price;//getter&setterUser.javaprivate Long userId; private String username; private String password; private String fullname; private String answer;//getter&setter addMeal.jsp<body> <s:form action="meal!orderMeal"> <s:textfield label="num" name="num" /> <br><s:select list="#session.MTList" listKey="typeId" listValue="typeName" name="typeId" label="订餐类型"> </s:select> <s:textfield label="ucomment" name="ucomment" /> <br> <s:submit value="确认"></s:submit> </s:form> </body>
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询