[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Can't catch exception caused by unique constraint?

2009-06-17 Thread fernando_jmt
In fact, I'm using a manual flushing, that's the reason it was working in JBoss 4.2.3. My service: | @Stateless | @Name(genericService) | @AutoCreate | public class GenericServiceBean implements GenericService { | | | @In(value = #{entityManager}) | private

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Can't catch exception caused by unique constraint?

2009-06-17 Thread fernando_jmt
jaikiran wrote : This looks like a Hibernate EntityManager problem http://opensource.atlassian.com/projects/hibernate/browse/EJB-382. JBoss AS 5.1.0 GA ships with 3.4.0 GA version of Hibernate Entitymanager and the bug is reported against that version. Seems to be fixed in 3.4.1 Yes you're

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Can't catch exception caused by unique constraint?

2009-06-16 Thread fernando_jmt
Did you find some solution to this problem? I had my application working pretty fine catching a EntityExistsException and throwing my own @ApplicationException exception in JBoss 4.2.3. Now that I upgraded to JBoss 5.1, the same code does not work anymore, I'm unable to catch neither

[jboss-user] [JBoss Seam] - Re: [NEWBIE Q] redirecting to a certain page if already logg

2008-01-31 Thread fernando_jmt
Try the following change: | | ?xml version=1.0 encoding=UTF-8? | page xmlns=http://jboss.com/products/seam/pages; | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; | xsi:schemaLocation=http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd;

[jboss-user] [JBoss Seam] - Re: [NEWBIE Q] redirecting to a certain page if already logg

2008-01-30 Thread fernando_jmt
How your pages.xml login page is configured? Does it have login-required=false? like: | page view-id=/login.xhtml action=#{identity.login} login-required=false | navigation from-action=#{identity.login} | rule if=#{identity.loggedIn} | redirect

[jboss-user] [JBoss Seam] - Re: s:message and the clientId

2007-10-13 Thread fernando_jmt
Define the label attribute in your input component. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4094875#4094875 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4094875 ___

[jboss-user] [JBoss Seam] - Re: Discussion: FlushModeType.NONE ?

2007-09-27 Thread fernando_jmt
org.jboss.seam.annotations.FlushModeType | @Begin(flushMode = FlushModeType.MANUAL) | public String myaction() { | | } | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4089308#4089308 Reply to the post :

[jboss-user] [JBoss Seam] - Re: org.hibernate.exception.GenericJDBCException: Cannot ope

2007-09-19 Thread fernando_jmt
wise_guybg wrote : | I have been dealing with a similar problem in a previous project at work where we used Hibernate. The solution was to create a backing session that will help you recover gracefully in case of DBException/ContraintViolation. | | I was wondering if something similar

[jboss-user] [JBoss Seam] - Re: org.hibernate.exception.GenericJDBCException: Cannot ope

2007-09-19 Thread fernando_jmt
EntryDuplicatedException is a custome exception I have: | | @ApplicationException(rollback = true) | public class EntryDuplicatedException extends Exception { | | public EntryDuplicatedException() { | } | | } | addDuplicatedMessage() is just a simple method to

[jboss-user] [JBoss Seam] - Re: Recovering from a Constraint violation exception

2007-09-18 Thread fernando_jmt
I do use a Action + Service pattern in order to catch all EJB/JPA exceptions and stay in the same page or display a pretty nice error messages. The action is a simple POJO and the Service is an @EJB , @TransactionAttribute(REQUIRES_NEW) over the method makes me happy in this case. IIRC, I've

[jboss-user] [JBoss Seam] - Re: required=true validation messages

2007-09-14 Thread fernando_jmt
Have you tried the label attribute in your input component (JSF 1.2)? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4084671#4084671 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084671

[jboss-user] [JBoss Seam] - Re: Invoking a Seam component method from pages.xml?

2007-09-06 Thread fernando_jmt
I think you should use a page action. | page view-id=/admin/userList.xhtml action=#{userList.reload} | /page | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4081724#4081724 Reply to the post :

[jboss-user] [JBoss Seam] - Re: problem with Authenticator

2007-09-05 Thread fernando_jmt
AFAIK, you can't use @EJB in POJO components. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4081428#4081428 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081428 ___ jboss-user

[jboss-user] [JBoss Seam] - Re: renew the @Factory

2007-09-05 Thread fernando_jmt
See all my comments here, this maybe can help you. http://www.jboss.com/index.html?module=bbop=viewtopict=117469 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4081461#4081461 Reply to the post :

[jboss-user] [JBoss Seam] - Re: please help me out of this problem

2007-09-03 Thread fernando_jmt
Yes, you're right, user is stateless, but take a look what return initUser method. It returns the reference to the instance variable user. So, this should work: | private User user; | public void saveCurrentUser() { | userDao.update(user); | } | BTW, I improved a bit my last

[jboss-user] [JBoss Seam] - Re: please help me out of this problem

2007-09-03 Thread fernando_jmt
Did you try it? Because I have the same case (I wrote) working in my application. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4080489#4080489 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4080489

[jboss-user] [JBoss Seam] - Re: please help me out of this problem

2007-09-03 Thread fernando_jmt
Also take into account the last change I did regarding the reloading of the user, because if a new instance of the same user is reloaded every time, then you don't expect to have the same reference instance variable updated. View the original post :

[jboss-user] [JBoss Seam] - Re: please help me out of this problem

2007-09-03 Thread fernando_jmt
Yes your'e right. STATELESS @Factory means it will be called every time the name is referenced in the page. In this case returning the already instantiated class. And yes, the value change listener is invoked when the value is changed in the selectbox, enabling the @Factory method to reload

[jboss-user] [JBoss Seam] - Re: please help me out of this problem

2007-09-02 Thread fernando_jmt
I would use a @Factory. Java: | | @Stateful | @Name(userRegister) | @Scope(ScopeType.SESSION) | public class UserRegisterAction implements UserRegister { | | private Log logger = LogFactory.getLog(UserRegisterAction.class); | | private User user; | private

[jboss-user] [JBoss Seam] - Re: JSF or Seam Question?

2007-09-02 Thread fernando_jmt
I will be great to have this in Seam UI. Thanks. JIRA issue added: http://jira.jboss.com/jira/browse/JBSEAM-1893 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4080335#4080335 Reply to the post :

[jboss-user] [JBoss Seam] - Re: resource not registered org.richfaces.renderkit.images.T

2007-08-31 Thread fernando_jmt
BTW, if you want to know the causes check the following link out: http://www.jboss.com/index.html?module=bbop=viewtopict=107897postdays=0postorder=ascstart=20#4051281 The problem is currently solved in RichFaces 3.1.0 http://jira.jboss.com/jira/browse/RF-401 View the original post :

[jboss-user] [JBoss Seam] - Re: UnsupportedOperationException when using h:selectManyLis

2007-08-29 Thread fernando_jmt
try this: | | if(!entityManager.contains(exam)) | entityManager.merge(exam) | | HTH. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4079219#4079219 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Can I define some

2007-08-29 Thread fernando_jmt
I have somethig like this: | | component name=sysConfig auto-create=true class=com.myapp.SystemConfig scope=APPLICATION | property name=rowsPerPage5/property | property name=fileUrlwhateverpath/property | /component | | | | @In | SystemConfig

[jboss-user] [JBoss Seam] - Re: can not access a member of class ... with modifiers

2007-08-29 Thread fernando_jmt
Do you have defined such method in the business interface? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4079362#4079362 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4079362

[jboss-user] [JBoss Seam] - Re: can not access a member of class ... with modifiers

2007-08-29 Thread fernando_jmt
So, it seems something related with some properties' modifiers. I saw something related here: http://www.jboss.com/index.html?module=bbop=viewtopict=114028 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4079415#4079415 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Layering the code in Seam

2007-08-24 Thread fernando_jmt
Yes, magoicochea is absolutely right. By instance, my application is using ACTION + DAO layers. Actions are Seam POJOs and DAOs are Session Beans (EJB). BTW, you can take a look to wiki example in the Seam distribution, it uses action + DAO on POJO components (maybe you want something like

[jboss-user] [JBoss Seam] - Re: How to use EntityManager for SELECT COUNT(1)?

2007-08-15 Thread fernando_jmt
If you're trying to execute an SQL (not JPA QL), just try with this: | int rowCnt= (Integer) em.createNativeQuery(SELECT count(1) FROM TableA).getSingleResult(); | HTH. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074625#4074625 Reply to the

[jboss-user] [JBoss Seam] - Re: Hibernate Exception

2007-08-13 Thread fernando_jmt
How your JPA QL for batch update looks like? (post code) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073525#4073525 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073525 ___

[jboss-user] [JBoss Seam] - Re: Seam + Ajax4JSF

2007-08-13 Thread fernando_jmt
If you are using a conversation you can start it using manual flush mode. | @Begin(flushMode = FlushModeType.MANUAL) | public String select(User instance) { |user = em.find |return result; | } | | | @End | public String create() { |

[jboss-user] [JBoss Seam] - Re: validation

2007-08-12 Thread fernando_jmt
I see three options: A) To catch the Exception in your code and then show the respective message. | public void create(Object entity) throws MyDuplicatedException { | try { | em.persist(entity); | em.flush(); | } catch (EntityExistsException e)

[jboss-user] [JBoss Seam] - Re: entity-query : resultCount problem with join fetch

2007-08-12 Thread fernando_jmt
[EMAIL PROTECTED] wrote : no, there is no JIRA issue for this Now there's one: http://jira.jboss.org/jira/browse/JBSEAM-1786 Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073382#4073382 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Entity Bean and Jboss seam

2007-08-09 Thread fernando_jmt
User @Transient on your property. | @Transient | private String situation; | or: | | private transient String situation; | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072600#4072600 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Seam 2.0.0.BETA1, transaction:ejb-transaction and SeamTe

2007-08-07 Thread fernando_jmt
Done: http://jira.jboss.org/jira/browse/JBSEAM-1771 Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4071641#4071641 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4071641

[jboss-user] [JBoss Seam] - Re: resource not registered org.richfaces.renderkit.images.T

2007-07-26 Thread fernando_jmt
Try Pressing Ctrl+F5 in your browser. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4067952#4067952 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4067952 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: h:selectManyCheckbox replaces PersistentBag with Arrays.

2007-07-02 Thread fernando_jmt
Seems related to this: http://www.jboss.com/index.html?module=bbop=viewtopict=49 HTH. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4059610#4059610 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059610

[jboss-user] [JBoss Seam] - Re: Page parameter and returnToCapturedView

2007-07-02 Thread fernando_jmt
Can anyone point me out? Please. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4059776#4059776 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059776 ___ jboss-user mailing list

[jboss-user] [JBoss Seam] - transaction:ejb-transaction/ and SeamTest

2007-06-30 Thread fernando_jmt
I just migrated my application from Seam 1.2 to Seam 2.0.0.BETA1 using Tomcat 6 and Embedded Jboss, it works like a charm. But, when I tried to execute the test suites I got the following exceptions: | uildfile: D:\Fer\srcEjemplos\Seam\seam2gen\build.xml | compiletest: |

[jboss-user] [JBoss Seam] - Re: Scary, scary thing: browser cache + Ajax4JSF???

2007-06-28 Thread fernando_jmt
First, this is a Ajax4JSF issue. You can see in the following link my intents to try A4J guys take this into account, but it seems I'm one in a million, and they don't care about this. http://www.jboss.com/index.html?module=bbop=viewtopict=107897postdays=0postorder=ascstart=20#4051281 Maybe

[jboss-user] [JBoss Seam] - Re: Scary, scary thing: browser cache + Ajax4JSF???

2007-06-28 Thread fernando_jmt
Ok, thanks. I also encourage people of this forum who is using Ajax4JSF to make a crowd and help to improve this small but critical issue for production systems. Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4058803#4058803 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Scary, scary thing: browser cache + Ajax4JSF???

2007-06-28 Thread fernando_jmt
That's great! Sure, I just vote for it. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4058917#4058917 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058917 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: ResourceNotFoundException after Seam 2.0 upgrade

2007-06-27 Thread fernando_jmt
Remove your browser cache: Ctrl+F5 or F5 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4058498#4058498 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058498 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Page parameter and returnToCapturedView

2007-06-26 Thread fernando_jmt
Hi. I have page parameter registered with a converter which encrypts and decrypts the value, something like this: | page view-id=/admin/user.xhtml | param name=id value=#{userAction.id} converter=#{cipherConverter.forLong}/ | /page | I also have registered the following in

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: the never ending flow of optimistic locking questions

2007-06-19 Thread fernando_jmt
I dealt with this time ago. Here you can find a topic related (whether it's of your interest): http://forum.hibernate.org/viewtopic.php?t=969898 After several tries I figured out that the only way (at least for me) to have this working is to have a POJO action and a SFSB DAO. POJO action and

[jboss-user] [JBoss Seam] - Re: DataModel refresh

2007-06-17 Thread fernando_jmt
Have you tried a page action to reset the componentLayoutList when the page is load? Something like this: | | page view-id=/admin/actions/componentlayout/list.xhtml action=#{componentLayoutListAction.reset} | /page | | HTH View the original post :

[jboss-user] [JBoss Seam] - Re: Greate thanks to Jboss team and Jboss-Seam team especial

2007-06-15 Thread fernando_jmt
+1 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054767#4054767 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054767 ___ jboss-user mailing list jboss-user@lists.jboss.org

[jboss-user] [JBoss Seam] - Re: Problems setting up Seam-managed persistence context

2007-06-15 Thread fernando_jmt
Have you configured your jta-data-source/ name of your persistence.xml in the jboss-beans.xml? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054852#4054852 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054852

[jboss-user] [JBoss Seam] - Re: Problems setting up Seam-managed persistence context

2007-06-15 Thread fernando_jmt
Yes, it was I meant. You are right if @PersistenceContext is working fine, it seems the problem is with some configuration (components.xml) or component declaration. Could I see your components.xml configuration and also the whole class (component) where you are trying to inject the the

[jboss-user] [JBoss Seam] - Seam 1.3.0.ALPHA UI example doubt

2007-06-15 Thread fernando_jmt
I lost a lot of time trying to find out the reason for the problem I described here: http://www.jboss.com/index.html?module=bbop=viewtopict=110611 (Problem of UnsupportedOperationException when using @ManyToMany and s:convertEntity/) I tried a lot of things (debug, simplify my code, with EJB,

[jboss-user] [JBoss Seam] - Re: Seam on tomcat functionality

2007-06-13 Thread fernando_jmt
Actually I have a Seam application running on Tomcat using Ajax4JSF and RichFaces. So, what I recomend you to start is to go into booking seam example folder, open an console and type ant deploy.tomcat (you need to have configured your build.properties for tomcat home). View the original post

[jboss-user] [JBoss Seam] - Re: Session problems

2007-06-12 Thread fernando_jmt
You can use a page action to refresh your list (when using SESSION scope). Like this: | Stateful | @Scope(ScopeType.SESSION) | @Name(partsListFinder) | public class PartsListFinderBean implements PartsListFinder { | @In(required=false) | private String

[jboss-user] [JBoss Seam] - Re: Session problems

2007-06-12 Thread fernando_jmt
I don't understand you very well, nevertheless I avoided the LazyInitializationException using SMPC and this in my faces-config: | | lifecycle | phase-listenerorg.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener/phase-listener | /lifecycle | | | |

[jboss-user] [JBoss Seam] - Re: Beginner Question

2007-06-12 Thread fernando_jmt
At first glance I can see one wrong thing, your entity component name is LoginAccount, so if you want to biject it, you should declare it as follows: | @In @Out | public LoginAccount LoginAccount; | or | @In(value=#{LoginAccount}) @Out(value=#{LoginAccount}) | public

[jboss-user] [JBoss Seam] - Re: Beginner Question

2007-06-12 Thread fernando_jmt
Typo in the second option I mentioned, it should be: |@In(value=#{LoginAccount}) | @Out(value=#{LoginAccount}) | public LoginAccount account; | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4053648#4053648 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Seam, Facelets, JSF and XML comments

2007-06-11 Thread fernando_jmt
Actually, it is not a seam issue, it is a Facelets behaviour, you can avoid it adding below configuration in your web.xml | context-param | param-namefacelets.SKIP_COMMENTS/param-name | param-valuetrue/param-value | /context-param | View the original post :

[jboss-user] [JBoss Seam] - Issue when upgrading to Seam 1.3.0.ALPHA (CVS)

2007-06-10 Thread fernando_jmt
Hi, Using Seam 1.2.1 I had a relationship like: | //User Entity. | @ManyToMany(fetch = FetchType.LAZY) | @JoinTable( | name = userrole, | joinColumns = @JoinColumn(name = userid), | inverseJoinColumns = @JoinColumn(name = roleid) | ) |

[jboss-user] [JBoss Seam] - Re: Issue when upgrading to Seam 1.3.0.ALPHA (CVS)

2007-06-10 Thread fernando_jmt
[EMAIL PROTECTED] wrote : What is the class of the List that throws UOE? Use your debugger to find out. | After debugging I saw that the UOE is thrown by the class org.hibernate.type.CollectionType, in the method replaceElements. | ... | java.util.Collection result = (

[jboss-user] [JBoss Seam] - Re: GF with Seam 1.3 - Caused by: java.lang.UnsupportedOpera

2007-06-06 Thread fernando_jmt
trouby wrote : anonymous wrote : | | Remove the expression language factory thing in faces-config.xml | | | | Remove what? I don't think I have anything related to EL factory, | | I only have seam's el-resolved and the phase-listener life cycle, | | | Thanks Remove the

[jboss-user] [JBoss Seam] - Re: GF with Seam 1.3 - Caused by: java.lang.UnsupportedOpera

2007-06-06 Thread fernando_jmt
- You should update the XML namespace for your configuration files to 1.3. - Your web.xml pointed to web-app_2_5.xsd - If you are suing Ajax4JSF you must change the VIEW_HANDLER as follows: | context-param | param-nameorg.ajax4jsf.VIEW_HANDLERS/param-name |

[jboss-user] [JBoss Seam] - Latest CVS EntityQuery troubles/doubts

2007-06-03 Thread fernando_jmt
Hi. I've updated to latest SEAM CVS (20070602), the improvements are good. Nevertheless I have some questions/doubts: A) The method isNextExists() always returns false. I made some debug and I found that isNextExits() method is called before than getResultList() (I'm sure it is related with

[jboss-user] [JBoss Seam] - Re: migration concerns. Seam 1.3 + Jboss 4.2 +?

2007-06-01 Thread fernando_jmt
AFAIK, since Tomahawk 1.1.3 you can use it in any JSF implementation. So I think you can use it with JSF RI. The only thing you need to care about is that Tomahawk 1.1.3 is for JSF 1.1, and Seam 1.3 will use JSF 1.2, this means you could also need to have a Tomahawk version which is compliant

[jboss-user] [JBoss Seam] - Re: ManyToMany with EntityManager in flush mode manual

2007-05-29 Thread fernando_jmt
torsty wrote : forgot to say: when I used fluh mode manual I flushed before persisting. Don't you think this is the cause of your problem? You should call em.flush() explicitly after all interactions with EM are performed. I have a same scenario with User-Role (ManyToMany) relationship using

[jboss-user] [JBoss Seam] - Re: stupid question about message

2007-05-29 Thread fernando_jmt
mnrz wrote : Hi | | When I log in using seam Authenticator, a message Welcome user_name will be displayed | | I can't find that message in any resource bundle. I want to display another message with related language that user specified how can I remove that message :)) | | I am

[jboss-user] [JBoss Seam] - Re: Problem about EntityManager.

2007-05-29 Thread fernando_jmt
You have declared SMPC as entityManager, then you should use as follows: | @In | EntityManager entityManager; | or (if you prefer): | @In(#{entityManager}) | EntityManager em; | or: | @In(value=#{entityManager}) | EntityManager em; | HTH. View the original post :

[jboss-user] [JBoss Seam] - Re: Domain model duplicates validation

2007-05-28 Thread fernando_jmt
Hi. anonymous wrote : | But in some weird case where my validation require some kind of twisted logic using some properties from the Person entity and all the other entities already persisted, is there a clean way to add this logic in the model? Or this is conceptually wrong? | For me,

[jboss-user] [JBoss Seam] - Re: can't get it working: exception redirection

2007-05-28 Thread fernando_jmt
If you are using Facelets (.xhtml as default) | exception class=org.jboss.seam.web.FileUploadException | end-conversation/ | redirect view-id=/errors/fue.xhtml | message severity=errorFile size is above allowable maximum/message | /redirect |

[jboss-user] [JBoss Seam] - Re: Domain model duplicates validation

2007-05-27 Thread fernando_jmt
I don't know what exactly you mean with without mapping that to the database, but anyway I have solved something similar as follows: | @Entity | @Table(name = person, uniqueConstraints = @UniqueConstraint(columnNames = {firstname, lastname})) | public class Person { | @Id |

[jboss-user] [JBoss Seam] - Re: EntityHome for nested entity CRUD?

2007-05-25 Thread fernando_jmt
In order to avoid to have basically the same page twice, I think you can improve that in two ways: 1) Use a page composition for Edit form and pass the component instance as ui:param. 2) Declare in your pages.html alias view-id for each case but render only one page. Something like this:

[jboss-user] [JBoss Seam] - Re: EntityHome for nested entity CRUD?

2007-05-25 Thread fernando_jmt
In my last post in point 2) I meant pages.xml not pages.html View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4048761#4048761 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048761

[jboss-user] [JBoss Seam] - Re: @Embeddable question

2007-05-21 Thread fernando_jmt
Have you declared the ABC as follows?: | public class XYZ { | ... | private ABC abc = new ABC(); | | ... | getters/setters | } | | In this case abc should be referenced in the view, not ABC. HTH. View the original post :

[jboss-user] [JBoss Seam] - Re: why conversation-timeout doesn't work properly?

2007-05-21 Thread fernando_jmt
anonymous wrote : | You must be logged in to perform this action | That message tell that the HTTP Session has been timed out (session time out destroys any active conversation). How long are your http session defined? View the original post :

[jboss-user] [JBoss Seam] - Re: @Digit Annotation

2007-05-21 Thread fernando_jmt
I will really appreciate if the next release of Seam has bundled the latest Hibernate libraries (Core, EM, Validator...). There are some bugs corrected in such versions currently I'm waiting for. Thanks in advance. View the original post :

[jboss-user] [JBoss Seam] - Re: @Embeddable question

2007-05-21 Thread fernando_jmt
I make a mistake in my last post, the code shoul be: | public class XYZ { | ... | @Embedded | private ABC abc = new ABC(); | | ... | getters/setters | } | | And your ABC must have @Embeddable at type level. do you have it in this way? View the original post :

[jboss-user] [JBoss Seam] - Re: @Digit Annotation

2007-05-21 Thread fernando_jmt
Seam distribution has a hibernate-all.jar which I am currently using to deploy in Tomcat. I don't know how hibernate is distributed on JBoss AS, but I guess is not something like hibernate-all.jar. Anyway in this case it would be nice to do the upgrading also (if is not done yet) View the

[jboss-user] [JBoss Seam] - Re: does EJB3 support hibernate @Filter annotation..?

2007-05-21 Thread fernando_jmt
See http://www.jboss.com/index.html?module=bbop=viewtopicp=4045495 HTH. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4047310#4047310 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4047310

[jboss-user] [JBoss Seam] - Re: Own HttpServlet and No application context active

2007-05-21 Thread fernando_jmt
Surrond SeamFilter to your Servlet. | filter | filter-nameSeam Filter/filter-name | filter-classorg.jboss.seam.web.SeamFilter/filter-class | /filter | | | filter-mapping | filter-nameSeam Filter/filter-name | url-pattern/*/url-pattern

[jboss-user] [JBoss Seam] - Re: LazyInitializationException on SeamTest

2007-05-19 Thread fernando_jmt
Forget this post. It was my fault (I was using @PersistenceContext instead SMPC by accident), now it is working fine. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4046999#4046999 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Hibernate SQL statements are not getting logged

2007-05-19 Thread fernando_jmt
| property name=hibernate.show_sql value=true/ | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4047023#4047023 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4047023 ___

[jboss-user] [JBoss Seam] - Re: Test EJB3/Seam from eclipse

2007-05-18 Thread fernando_jmt
Yes, you are in the right track. Seam provides a way you can do unit and integration (functional) tests. See: http://docs.jboss.com/seam/latest/reference/en/html/testing.html View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4046908#4046908 Reply to the post :

[jboss-user] [JBoss Seam] - LazyInitializationException on SeamTest

2007-05-18 Thread fernando_jmt
Hi. Somebody knows how to deal with LazyInitializationException when using Seam integration test? I got this exception: org.hibernate.LazyInitializationException. The simple test: | public class LoginTest extends SeamTest { | | @Test | public void testLogin() throws

[jboss-user] [JBoss Seam] - Re: Seam EL: How to get msg from resource file?

2007-05-17 Thread fernando_jmt
But you can do this: | ... | @In private MapString, String res; | | String label = res.get(enum.typeA.label); | or this: | ... | @In(#{res['enum.typeA.label']}) | private String label; | | HTH. View the original post :

[jboss-user] [JBoss Seam] - Re: JSF Composition Components with Seam

2007-05-16 Thread fernando_jmt
I have this in my web.xml: | context-param | param-namefacelets.LIBRARIES/param-name | param-value | /WEB-INF/facelets/myapp.taglib.xml | /param-value | /context-param | myapp.taglib.xml | ?xml version=1.0? | !DOCTYPE facelet-taglib

[jboss-user] [JBoss Seam] - Re: @Filter example

2007-05-16 Thread fernando_jmt
The reason you got that error resides here: | entity-manager-factory=#{entityManager} | Just change your second persistence context as follows: | | core:managed-persistence-context name=filteredEntityManager | auto-create=true |

[jboss-user] [JBoss Seam] - Re: Invoking a (refresh) method when user select a RichFaces

2007-05-16 Thread fernando_jmt
Use a page action. Something like: | page view-id=userList.xhtml action=#{userListing.refresh}/ | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4046141#4046141 Reply to the post :

[jboss-user] [JBoss Seam] - Re: @Create

2007-05-15 Thread fernando_jmt
Post some code in order to see how currently is. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045832#4045832 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045832 ___ jboss-user

[jboss-user] [JBoss Seam] - Re: @Filter example

2007-05-15 Thread fernando_jmt
Post the page where you are setting the currentHub in the session (where you are using @Out). And also post the code where you are trying to use the entityManager you have configured in components.xml. View the original post :

[jboss-user] [JBoss Seam] - Re: JSF Composition Components with Seam

2007-05-15 Thread fernando_jmt
Post the page where you are using the composition tag. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045836#4045836 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045836 ___

[jboss-user] [JBoss Seam] - Re: Best Practise: Form / Confirm / Save | Getting current p

2007-05-15 Thread fernando_jmt
You should use the CONVERSATION scope and use flushMode = FlushModeType.MANUAL in the @Begin annotation, then you can explicitly call entityManager.flush() if you want yo save the data, otherwise you can do anything with the data you want to edit while you conversation is active. Regarding

[jboss-user] [JBoss Seam] - Re: JSF Composition Components with Seam

2007-05-15 Thread fernando_jmt
And, also tell us where is located your field.xhtml? webapp/ ? webapp/WEB-INF? ...etc. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045839#4045839 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045839

[jboss-user] [JBoss Seam] - Re: @Filter example

2007-05-14 Thread fernando_jmt
1.- Define the Filter in your Entity. | | @Entity | @Table(name=NODE) | @org.hibernate.annotations.FilterDef( | name = accessLevelFilter, | parameters = [EMAIL PROTECTED](name = currentAccessLevel, type=integer)} | ) | @org.hibernate.annotations.Filter( | name =

[jboss-user] [JBoss Seam] - Re: @Filter example

2007-05-14 Thread fernando_jmt
AFAIK, Wiki example is in the CVS only. Regarding class type parameter, I don't have any example and I don't know much about it. Looks like Hibernate specific stuff, so see Hibernate for this (but I guess you already did it). View the original post :

[jboss-user] [JBoss Seam] - Re: Injection of SESSION POJO into event/session scoped POJO

2007-05-14 Thread fernando_jmt
I will suggest you the following: (The reasons I do this are in the Seam reference documentation) | @Name(balance) | @Scope(EVENT) | public class Balance implements Serializable | { |private double totalMarketValue; |private double cash; |private double margin; |

[jboss-user] [JBoss Seam] - Re: Injection of SESSION POJO into event/session scoped POJO

2007-05-14 Thread fernando_jmt
The name initialize does not matter. You can mane as you want, the most important thing here is the @Create annotation, which tells Seam to execute such method just after the component is successfuly initialized (all Seam components are available, ready to be injected). View the original post

[jboss-user] [JBoss Seam] - Re: Simple question with ajax4jsf

2007-05-11 Thread fernando_jmt
Have you tried surrounding your input-checkbox with a4j:region? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045043#4045043 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045043

[jboss-user] [JBoss Seam] - Re: framework:entity-query class attribute

2007-05-09 Thread fernando_jmt
Thanks Pete, for your suggestion, nevertheless that was something I did previously. To be specific, in the extended EntityQuery I added some generic (for all lists) methods like the total pages and the current page (among others). These changes should be used for all entity-queries in my app.

[jboss-user] [JBoss Seam] - Re: framework:entity-query class attribute

2007-05-09 Thread fernando_jmt
Thanks Pete. I also thought in that solution. But I was afraid to loose the namespace stuff for entity-query. Now, I think this is my only chance (or define my own namespace). Only by curiosity. Do you know what is the purpose of the class attribute in the framework:entity-query stuff? I

[jboss-user] [JBoss Seam] - Re: EntityQuery: showing last page with no results?

2007-05-09 Thread fernando_jmt
Not yet. I'm tested with max-results defined. But I din't test with no max-result (not paged) defined. And also I'm thinking about to contribute some improvements, like total pages, current page, and some other minus bugs I found. When I will have this ok, I will report the errors and suggest

[jboss-user] [JBoss Seam] - Re: Distinguishing between Error and Info FacesMessages

2007-05-09 Thread fernando_jmt
Have you tried this?: | h:messages globalOnly=true styleClass=message errorClass=messageError infoClass=messageInfo warnClass=messageWarn/ | HTH. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4044515#4044515 Reply to the post :

[jboss-user] [JBoss Seam] - Re: EntityQuery: showing last page with no results?

2007-05-08 Thread fernando_jmt
If you are using the query with max-results defined, then you must to extend the EntityQuery class and override the following methods as follows: | @Override | @Transactional | public long getLastFirstResult() { | | long page = (getResultCount() / getMaxResults()) *

[jboss-user] [JBoss Seam] - framework:entity-query class attribute

2007-05-08 Thread fernando_jmt
I was using entity-query, now I need to make some extensions to EntityQuery provided by Seam. I assumed that using the class atribute for the framework:entity-query I can define a subclass of the EntityQuery. Is my assumption correct? | public class MyEntityQuery extends

[jboss-user] [JBoss Seam] - Re: javax.faces.el.EvaluationException: More than one method

2007-05-01 Thread fernando_jmt
Can anyone help me?, please. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042157#4042157 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042157 ___ jboss-user mailing list

  1   2   >