Click the s:link and report Exception during INVOKE_APPLICATION(5):
java.lang.IllegalArgumentException: attempt to create merge event with null
entity. But the data of product.name is displayed normal. And it seems that the
problem is the passing parameter of s:link.
| <ui:repeat value="#{productCCList}" var="productCC">
| <tr>
| <td width="91" height="100%">
| <table width="100%" height="100%" border="1"
cellspacing="0"
| cellpadding="0">
| <tr>
| <td>
| <div align="center" style="font-size:
14px;">#{productCC.name}</div>
| </td>
| </tr>
| </table>
| </td>
| <td>
| <table width="100%" border="1" cellspacing="0"
cellpadding="0">
| <ui:repeat value="#{productCC.c}"
var="productC">
| <tr>
| <td height="50">
| <div align="center"
style="font-size: 14px;">#{productC.name}</div>
| </td>
| <ui:repeat
value="#{productC.product}" var="product">
| <td>
| <div align="center"
style="font-size: 14px;"><s:link
|
id="viewProduct" value="#{product.name}"
|
action="#{hongyangManager.selectProduct(product)}" /></div>
| </td>
| </ui:repeat>
| </tr>
| </ui:repeat>
| </table>
| </td>
| </tr>
| </ui:repeat>
|
@Stateful
| @Name("hongyangManager")
| public class HongyangManagerAction implements HongyangManager {
|
| @PersistenceContext(type = PersistenceContextType.EXTENDED)
| EntityManager em;
|
| @DataModel
| List productCCList;
|
| Product currentProduct;
|
| XD currentXD;
|
| YD currentYD;
|
| @Factory
| public void getProductCCList() {
| productCCList = em.createQuery("from ProductCC productCC")
| .getResultList();
| }
|
| public String selectProduct(Product selectedProduct) {
| currentProduct = em.merge(selectedProduct);
| return "product";
| }
|
| public String selectXD(XD selectedXD) {
| currentXD = em.merge(selectedXD);
| return "xd";
| }
|
| public String selectYD(YD selectedYD) {
| currentYD = em.merge(selectedYD);
| return "yd";
| }
|
| @Destroy
| @Remove
| public void destroy() {
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004406#4004406
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004406
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user