[JBoss Seam] - Re: SeamGen+EntityQuery - 'argument type mismatch'
by trouby
Well,
I actually tried almost anything possible that is elegant enough,
I also tried to a add the referenced entity as a property for the EntityQuery but nothing,
| Address address;
|
| getter/setter
|
and in the view I have added an EntityConverter for this address via a SelectOneMenu/selectItems, then I get a EntityManager is closed exception,
I think the problem is due to the fact that the generated EntityQuery via Seam-Gen is not bound to any conv/session contexts, and keeping the search parameters/values is done via parameters specified within the page descriptor.
This is -too- basic, I am definitely sure there's a way to add restrictions based on -entities- associated to the main entity that being fetched except of criteria based on primitive datatypes !
anyone? :)
Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078920#4078920
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078920
18Â years, 8Â months
[Persistence, JBoss/CMP, Hibernate, Database] - Best Practices Question
by arnieOag
BACKGROUND
I'm in the process of building a suite of classes for my team to use when authenticating and authorizing users to applications and determining their rights w/i an application. The suite uses Hibernate as our auditing rules require such information in a database setup for such tracking.
The class files that relate to the tables (the ones referenced in the .hbm.xml files) need to be available in some fashion so that the team's code will compile. But they don't actually need the code to develop. They DO need the .har file exported with their application, however.
What I've setup is a .har file containing JUST the .hbm.xml files which is in a separate project they can check out and add as a component to the application .ear (via Eclipse). There are no .class files in this project.
Another project has the .java files and I export them to a .jar of their own which team members then can add to their project class paths via the User Library functionality.
This .jar file of compiled classes I then put in the <jboss-home>/server/default/lib folder and thus far, my application appears to run just fine.
QUESTION
This is the best way to do this?
We have several databases that will be accessed via Hibernate which then requires a .har file - but I don't want to have to redistribute the Java classes over and and over in each project. (That would mean that a change to the library would require a recompile/deploy of every application - something I want to avoid.)
If anyone has any suggestions to the contrary, I would be very interested.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078918#4078918
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078918
18Â years, 8Â months
[Persistence, JBoss/CMP, Hibernate, Database] - impl.SessionFactoryObjectFactory: Not found: Jboss issue/bug
by ssuyamboo
By looking at log I am successfully loading the SessionFactory,
2007-08-28 13:57:36,808 INFO [main] impl.SessionFactoryObjectFactory: Not binding factory to JNDI, no JNDI name configured
2007-08-28 13:57:36,808 INFO [main] util.NamingHelper: JNDI InitialContext properties:{}
2007-08-28 13:57:36,808 INFO [main] cache.UpdateTimestampsCache: starting update timestamps cache at region: org.hibernate.c
ache.UpdateTimestampsCache
2007-08-28 13:57:36,808 WARN [main] cache.EhCacheProvider: Could not find configuration [org.hibernate.cache.UpdateTimestamp
sCache]; using defaults.
2007-08-28 13:57:36,828 INFO [main] cache.StandardQueryCache: starting query cache at region: org.hibernate.cache.StandardQu
eryCache
2007-08-28 13:57:36,828 WARN [main] cache.EhCacheProvider: Could not find configuration [org.hibernate.cache.StandardQueryCa
che]; using defaults.
2007-08-28 13:57:36,828 INFO [main] impl.SessionFactoryImpl: Checking 0 named HQL queries
2007-08-28 13:57:36,828 INFO [main] impl.SessionFactoryImpl: Checking 0 named SQL queries
2007-08-28 13:57:36,838 INFO [main] jmx.Hibernate: SessionFactory successfully built and bound into JNDI [java:/hibernate/Se
ssionFactoryTest]
Then I tried to execute a database operation by a Servlet which is part of .war file in the same .EAR and it threw , the following
2007-08-28 13:57:56,927 WARN [http-0.0.0.0-8080-1] impl.SessionFactoryObjectFactory: Not found: 2c98b24214add5fe0114add60028
0000 .
Is this a known issue/bug?
Sun
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078916#4078916
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078916
18Â years, 8Â months
[JBoss Seam] - Uisng h:dataTable as part of a form
by wiberto
Hi,
I'm trying to update the members of a list, so I'm trying to use the h:dataTable to display the list and allow me to edit the fields of the elements.
So I have something like this:
| <h:dataTable styleClass="cooltable" value="#{product.productLimits}" var="currentLimit">
| <h:column>
| <f:facet name="header">Name</f:facet>
| <h:inputText id="endDate" value="#{currentLimit.limitName}" tabindex="1" class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"/>
| </h:column>
| <h:column>
| <f:facet name="header">Display Label</f:facet>
| <h:inputText id="endDate" value="#{currentLimit.limitDisplayLabel}" tabindex="1" class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"/>
|
| </h:column>
|
| </h:dataTable>
|
This is just a piece of the form since I edit other product fileds also.
When I don't have the dataTable piece in the page the edit action of the form is called. As soon as I add the datatable nothing happens. I don't see an exception, but the same page is rendered but the updates were not persisted since the action was not called.
Is what I'm trying to do allowed? How do oyu guys update the members of a list? I could use the DataModel and the click on the table to edit, but I would like to avoid having to go down another level. Would be nice to do it all in the same page.
Here's the top of the form just in case it helps:
| <tr>
| <td class="big"><strong>Product Information</strong></td>
| <td align="right" >
| <h:commandButton type="submit" value="Save" action="#{productmanager.editProduct(product)}"/>
| <h:commandButton value="Cancel" action="#{productmanager.noUpdates(product)}"/>
| </td>
| </tr>
| </table>
|
| <table border="0" cellpadding="5" cellspacing="0" width="500">
| <tr style="height:30px" >
| <td align="right" width="35%" class="dvtCellLabel">Product ID</td>
| <td align="left" width="65%" class="dvtCellInfo">#{product.productId}</td>
| </tr>
| <tr style="height:30px" >
| <td align="right" width="35%" class="dvtCellLabel">Product Name</td>
| <td align="left" width="65%" class="dvtCellInfo">
| <h:inputText value="#{product.productName}" class="detailedViewTextBox" onFocus="this.class='detailedViewTextBoxOn'" onBlur="this.class='detailedViewTextBox'"/>
| </td>
| </tr>
|
Thanks,
Jose
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078913#4078913
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078913
18Â years, 8Â months
[JBoss Seam] - Help with EntityHome Maintaining Conversation State
by jfrankman
How are the fields on a seam-gen-ed Edit page synchronized with the instance in the EntityHome? I know they work when you save or update the instance, but what if you navigate to another page in the same conversation and come back to the edit page? How can you maintain the state of all the text fields on the page so user changes are not lost? Is there a way to do this without persisting the entity?
I have a simple create/edit page generated from seam-gen 1.2 that uses the EntityHome to handle persistence. I also have a field with a lookup button next to it that allows users to lookup information on a search screen that is used to populate the Create/Edit pages' form fields.. The user clicks the button and is presented another search screen. When the user searches and finds what is wanted s/he select the appropriate record and is sent back to the Create/Edit page. When s/he is returned to the Create/Edit page any fields that the user had filled in but not saved are empty. It was my understanding that the EntityHome would maintian the state of all values on my Create/Edit page since this is done in a conversation manner. (I have verified when the user moves from the create/edit page to the search page and back again, it all happens in the same conversation). But something is happening when the "Lookup" button is clicked where the input text fields are not updating the Entity instance in the EntityHome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078910#4078910
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078910
18Â years, 8Â months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: [SessionFactoryObjectFactory] Not found: Jboss Bug?
by ssuyamboo
By looking at log I am successfully loading the SessionFactory,
2007-08-28 13:57:36,808 INFO [main] impl.SessionFactoryObjectFactory: Not binding factory to JNDI, no JNDI name configured
2007-08-28 13:57:36,808 INFO [main] util.NamingHelper: JNDI InitialContext properties:{}
2007-08-28 13:57:36,808 INFO [main] cache.UpdateTimestampsCache: starting update timestamps cache at region: org.hibernate.c
ache.UpdateTimestampsCache
2007-08-28 13:57:36,808 WARN [main] cache.EhCacheProvider: Could not find configuration [org.hibernate.cache.UpdateTimestamp
sCache]; using defaults.
2007-08-28 13:57:36,828 INFO [main] cache.StandardQueryCache: starting query cache at region: org.hibernate.cache.StandardQu
eryCache
2007-08-28 13:57:36,828 WARN [main] cache.EhCacheProvider: Could not find configuration [org.hibernate.cache.StandardQueryCa
che]; using defaults.
2007-08-28 13:57:36,828 INFO [main] impl.SessionFactoryImpl: Checking 0 named HQL queries
2007-08-28 13:57:36,828 INFO [main] impl.SessionFactoryImpl: Checking 0 named SQL queries
2007-08-28 13:57:36,838 INFO [main] jmx.Hibernate: SessionFactory successfully built and bound into JNDI [java:/hibernate/Se
ssionFactoryTest]
Then I tried to execute a database operation by a Servlet which is part of .war file in the same .EAR and it threw , the following
2007-08-28 13:57:56,927 WARN [http-0.0.0.0-8080-1] impl.SessionFactoryObjectFactory: Not found: 2c98b24214add5fe0114add60028
0000.
Is this a known issue/bug?
Sun
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078908#4078908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078908
18Â years, 8Â months