在Java Hibernate中,从两个表中选择“从表单”中获得两个值
我坚持这样做:
我在.jsp中选择了一个选择的表单。它从第二个表项目中获取列表=“ $ {categoryList}”。但是,当我想按名称保存选择时,则仅在表A中更新category_id。但是我也需要名字。
有没有办法从一个选择中返回一个列表中的2个值? 摘自JSP
category
<form:select itemLabel="name" itemValue="id"
path="category.id" items="${categoryList}"/>
enter code here
i stuck on this:
I hava a select form in .jsp. It takes a list from second table items="${categoryList}" . But when i want to save the selection by name then only category_id is updated in table A. I need to have category name in tableA from the list and at the same time category_id in TableA (which works now). But i need name also.
Is there a way to return 2 values from one list in one select?
Extract from jsp
category
<form:select itemLabel="name" itemValue="id"
path="category.id" items="${categoryList}"/>
enter code here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论