[JBoss Seam] - All my HtmlSelectOneRadio's are broken with Seam 1.1 (worked
by ngeadah
I know about the @SelectItems that is available and how that could be a potential solution, but I would instead like to understand why something that was working perfectly in Seam 1.0 is broken when I moved to 1.1.
I have a SFSB that exposes a List attribute. The getter populates that List and the contents of the list are displayed using an h:selectOneRadio with f:selectItems.
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| @Name("loginClient")
| public class LoginClientBean implements LoginClient {
| ...
| private List<SelectItem> customerTypes;
|
| public List<SelectItem> getCustomerTypes() {
| customerTypes = new LinkedList<SelectItem>();
| ... Adding to customerTypes
| return customerTypes;
| }
|
| public void setCustomerTypes(List<SelectItem> customerTypes) {
| this.customerTypes = customerTypes;
| }
|
And the JSF:
| <h:selectOneRadio id="customerType" value="#{loginClient.selectedCustomerType}" required="true">
| <f:selectItems value="#{loginClient.customerTypes}" />
| </h:selectOneRadio>
|
Upon submit, I now get a nasty exception:
| java.lang.IllegalArgumentException: Value binding '#{userMaintenanceClient.usersSelectItems}'of UISelectItems with component-path {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /UserMaintenance.xhtml][Class: javax.faces.component.html.HtmlForm,Id: userMaintenance][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id23][Class: javax.faces.component.html.HtmlPanelGroup,Id: _id24][Class: javax.faces.component.html.HtmlSelectOneRadio,Id: selectRadio][Class: javax.faces.component.UISelectItems,Id: _id25]} does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of type : null
|
Worked just fine in Seam 1.0.1. Something must have changed in 1.1 to break this. Thanks for any insights.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983581#3983581
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983581
19Â years, 6Â months
[JBoss Seam] - Seam examples: XHTML issues
by Eekboom
IntelliJ Idea's support for Seam is getting more and more mature.
I filed a lot of issues to their Jira and finally in 6.0.2 (EAP) version the seam example sources look quite nice, code completion, navigation, and validation is working, "find usages" understands EL, no bogus warnings...
I think the remaining warnings in the sources are in fact real (minor) issues with the examples:
* <h:commandButton> has no attribute called "class" - I think this should be "styleClass".
* Also "onClick" attribute should be "onclick" (all lowercase).
* conversations.xhtml in booking example declares
"<!DOCTYPE composition " but has "div" root tag.
* for "" tags the "alt" attribute is required.
Should I file a Jira issue?!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983579#3983579
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983579
19Â years, 6Â months
[JBoss Seam] - Re: Can Seam work with no ejb3 but with Hibernate ORM?
by pgrillo
I'd noticed this was possible, and tried to deploy a java beans only version of the booking example on tomcat.
I'm a little confused on the transaction stuff that you allude to that only is supported using ejb session/entity beans.
Seam Documentation states:
anonymous wrote : 9.4. Seam managed transactions
| ...
| Seam completely solves the problem of unwanted LazyInitializationExceptions, while working around the biggest problem in the open session in view pattern. The solution comes in two parts:
| ? use an extended persistence context that is scoped to the conversation, instead of to the request
| ? use two transactions per request; the first spans the beginning of the update model values phase until the end of the invoke application phase; the second spans the render response phase
|
and
anonymous wrote : 9.5. Configuring Seam with Hibernate in Java EE
| ...
|
| Seam JavaBean components do not provide declarative transaction demarcation like session beans do. You could manage your transactions manually using the JTA UserTransaction (you could even implement your own declarative transaction management in a Seam interceptor). But most applications will use Seam managed transactions when using Hibernate with JavaBeans. Follow the instructions above to enable SeamExtendedManagedPersistencePhaseListener.
|
But it is not clear to me if i am able or "not" able to solve the Lazy Initialization Exceptions and replace the "open session in view" pattern by using Seam "without" ejb.
Can anybody verify, that i can solve the above problem using Seam managed transactions without ejb3?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983577#3983577
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983577
19Â years, 6Â months
[JBossCache] - INVALIDATION Cache problem
by amits2
I am working on an application with Spring, hibernate and JBoss Tree cache. This application is deployed on a WEBLOGIC cluster environment. I am using tree cache to store only the SELECTED domain objects in tree cache with mode INVALIDATION_ASYNC (i also tried INVALIDATION_SYNC).
What I understood from the INVALIDATION cache is "Whenever data is changed in a cache, ohter caches in a cluster receive an invalidation message, which means their data is now state and should be evicted from cache".
This is what I am doing and I noticed while using Tree cache Invalidation_async cache:
1. I am using an interceptor (Hibernate Interceptor) to check the object to be cached. If that element is already exist in tree cache then cache object will be returned, otherwise it will continue with the normal process (step 2).
2. Here, hibernate calls goes to database and return the domain object, which are programatically put in the tree cache for later use and when a request comes for that particular object, STEP 1 is being executed.
3. My application can receive updates for the domain objects, when this updates comes, [B] I update the cache with updated object and save the new value to database.
The above steps works fine in cluster environment for REPLICATION mode and I can see the object are replicated on each and every nodes.
But when I change cache mode to "INVALIDATION_ASYNC" the problem starts:
Here is my usecase:
1. I send a request goes to node 1 of a weblogic cluster, this is what happens:
Domain object (lets say domain1) are created and put in to cache.
2. I send the same request to node 2 of weblogic cluster, this is what happens:
Domain objects [same as in request 1, domain1] are created and put in cache on node 2.
3. Then I receive an update on node 1 for Domain Object [domain1]:
Here, I put that updated domain object to cache. Now I assume it will send an invalidation message to node 2 and domain object (domain1)is eviceted from the cache on node2.
4. Now I Send the same request to node 2 of weblogic cluster (where domain1 is evicted from cache due to invalidation message from node 1's cache):
Here, I notice that cache item is not available and request is going to the database, construct the object and again put in to cache at node 2 ----------------> Absolutely RIGHT
5. Now Send the same request to node 1 of weblogic cluster (where cache item domain1 is updated]:
What I am seeing : "Cache item domain1 doesn't exist here and call is going to the database". ----------> WRONG
This might be possible that node 2 has sent an invalidation message when it has put the domain1 object in its cache and it invalidates the cache item on node 1 [for domain1] and again the call for same object from node 1 is going to database.
Am I doing something wrong OR INVALIDATION_ASYNC is not yet supported by Treecache with hibernate????
Your response will be highly appreciated !!
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983572#3983572
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983572
19Â years, 6Â months