[jboss-user] [JBoss Seam] - Inserting into secondry table

kaviarasu do-not-reply at jboss.com
Mon Jul 30 07:07:12 EDT 2007


hi 
i want to insert values in primary and secondry table using JSF
im using one to many annotation to combine primary and secondry table 
the secondry table is mapped as set 
can any one tell how to inseert values in secondry table from jsf
i have pasted the coding below, the  REVIEW_ENTRY_ID is primary key.
i have written trigger to insert review enteryId in secondry table when it is entered in primary, i want to insert reviewHeading in secondry table,

primary table
@Name("write")
  | @Id
  | 	@Column(name="REVIEW_ENTRY_ID")
  | 	private BigDecimal reviewEntryId;
  | @OneToMany(mappedBy="reviewEntryId")
  | 	private Set<TblUserReviews> tblUserReviewsCollection;

secondry table 

@Column(name="REVIEW_HEADING")
  | 	private String reviewHeading;
  | @ManyToOne
  | 	@JoinColumn(name="REVIEW_ENTRY_ID")
  | 	private TblReviews reviewEntryId;

JSF

<table border="0" style=" width : 771px;">
  | 					<tr>
  | 						<td>Rate the product</td>
  | 						<td><rich:inputNumberSlider value="#{write.reviewEntryId}"/>
  | 						</td>
  | 					  <td>
  | 						</td>
  | 					</tr>
  | 				<tr style=" height : 6px;">
  | 						<td>Review Title</td>
  | 						 <td><h:inputTextarea value="#{write.reviewHeading}" style=" width : 445px; height : 34px;"></h:inputTextarea>
  | 						</td>
  | 					</tr>
  | 						</table>


Thank you
regards
Kaviarasu


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068670#4068670

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068670



More information about the jboss-user mailing list