[JBoss Seam] - Please help me, urgent, waiting online
by Seto
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
19 years, 3 months
[JBoss Seam] - Detecting updates to Session Scoped Entity Beans
by cwac5
Hi,
I am having some trouble understanding the interactions of managed beans and Seam. I will give a concrete example as I don't think I can really explain the cocepts.
I have a Session scoped entity bean that represents a meeting, as part of a larger calender application. I want a display to appear on the top of the page that says the current meeting with a link to the details page. It isnt really part of a conversation, which is why it is Session scoped.
I have a timer that is set when a meeting is created that uses an entity manager to lookup the meeting and change the state to 'complete' when the duration of the meeting has passed. It can cancel a meeting prematurely if no one has called in (it integrates voip), as to not waste voip resources.
The problem: when the meeting is canceled the session scoped entity bean's state is not changed. It is an issue of persistence contexts/management I assume, but I don't know how to make the timer interact with the proper context, or to configure the session scoped bean to know about the timer's changes.
Any suggestions?
Thanks!
Chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004397#4004397
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004397
19 years, 3 months
[JBoss Seam] - Re: iText (PDF) support in Seam
by norman.richards@jboss.com
As best as I can tell, iText will not compute column widths for you. You need to determine your column structure in advance. Keep in mind that in iText, the table begins rendering to the PDF long before the end of the table is reached. (allowing for long multi-page tables)
You are right. I actually thought I added a renderer for h:outputText, but looking back I see I only added one for literal text. I'll try and get that sometime this weekend.
You can specify any page size, but looking through the itext page sizes, I see there are no constants for lanscape mode. I've added pageSize="width height" and orientation="landscape|portrait" to deal with this.
I didn't realize I left the DocumentStore in the session. Woops. That should be a conversational component.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004373#4004373
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004373
19 years, 3 months