[JBoss-user] [JBoss Seam] - Re: Seam component with the same name

2006-07-07 Thread jtucker
I have uploaded a patch to JIRA which will: a) use the class defined in components.xml over an annotated component b) recognise a "precedence" attribute on the element in components.xml. The highest numbered class will be loaded. It errors and doesn't register a component if it cannot determine

[JBoss-user] [JBoss Seam] - Re: Does anyone know of an automatic Seam-JSF form generator

2006-07-06 Thread jtucker
How about I whip up a proof of concept as soon as I can to test the concept and interest. Stay tuned. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955826#3955826 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955826

[JBoss-user] [JBoss Seam] - Re: Does anyone know of an automatic Seam-JSF form generator

2006-07-06 Thread jtucker
My understanding of the current hibernate application generation tool (I assume that's the one you are talking about) is that the generation happens at build-time, whereas I am talking about runtime generation. But perhaps in future the Seam application generator could generate this code :) I t

[JBoss-user] [JBoss Seam] - Re: Does anyone know of an automatic Seam-JSF form generator

2006-07-06 Thread jtucker
I have been giving this a lot of thought lately. Since most of my entities will always display a property in the same way (e.g. date, menu, etc) but on many pages. I was considering using annotations on the property which wire it up to a JSF component, validator, converter, etc. Then you could

[JBoss-user] [JBoss Seam] - Re: Seam component with the same name

2006-07-06 Thread jtucker
My main concern with the orderby in the JAR is that it may make tracking down errors more difficult. Lets say you install a 3rd party jar where the orderby for X is 2, and you set up another X component but orderby is 1 (thinking it overrides a default of 0), it's going to take a while to track

[JBoss-user] [JBoss Seam] - Re: Seam component with the same name

2006-07-05 Thread jtucker
I like the idea where if the component is defined in component.xml, it overrides the default Seam scanning. So CptnKirk, like you imply in your post, you only want to end up with a single X component being managed by Seam - this would be the one defined in components.xml. Order-by doesn't see

[JBoss-user] [JBoss Seam] - Re: Seam component with the same name

2006-07-05 Thread jtucker
I haven't played with any advanced config using components.xml but I understand from the doc that you can use it to create a Seam component from a class that doesn't have to be annotated with @Name. Would it work in your example to leave @Name off anything reusable you include in your jar and i

[JBoss-user] [JBoss Seam] - Re: Maven2 and JBoss Seam DVD Store demo

2006-07-05 Thread jtucker
It's probably not picking up your JNDI pattern from components.xml. Create a second WEB-INF directory in /src/test/resources and move your components.xml file in there. This ensures that it is in the right place in the maven classpath for Seam to pick it up. It's pretty ugly I know but it's t

[JBoss-user] [JBoss Seam] - Re: Seam component with the same name

2006-07-04 Thread jtucker
There was a recent fix in CVS for #JBSEAM-111 to issue a "warn" level logging message if 2 components are registered with the same name. There is no provision to specify precedence... But I am interested to know why you want to override a component? View the original post : http://www.jboss.c

[JBoss-user] [JBoss Seam] - Re: help with Maven 2 and SeamTest (part 2)

2006-06-28 Thread jtucker
Try putting an empty seam.properties file in your src/main/resources/. ps. you are right of course about the src/main/resources/ for the conf files. Should be src/test/resources/ View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954083#3954083 Reply to the pos

[JBoss-user] [JBoss Seam] - Re: help with Maven 2 and SeamTest (part 2)

2006-06-28 Thread jtucker
There's nothing too tricky to getting it running in Maven2. Your problem sounds like you need to take the config files out of target/test-classes/conf/ and just have them in target/test-classes/ instead. This means that if you are using a standard Maven2 layout, they should probably be in src/m

[JBoss-user] [JBoss Seam] - Re: running Eclipse TestNG plugin on a Seam project

2006-06-28 Thread jtucker
Glad to hear you are up and running! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953975#3953975 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953975 Using Tomcat but need to do more? Need to support web services, s

[JBoss-user] [JBoss Seam] - Re: Acces EntityManager from outside of ejb beans(Custome JS

2006-06-27 Thread jtucker
Just grab the EntityManagerFactory from JNDI. Make sure you have a line like this in persistence.xml to specify where the EMF is stored... | | And use this code to get the EMF and create the EntityManager... | Hashtable env = new Hashtable(); | env.put("java.naming.factory.initial"

[JBoss-user] [JBoss Seam] - Re: running Eclipse TestNG plugin on a Seam project

2006-06-24 Thread jtucker
Sounds like you are close! Hopefully the only thing you are missing now is a META-INF dir in your resources source folder. It should contain ejb-jar.xml and persistence.xml. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953173#3953173 Reply to the post :

[JBoss-user] [JBoss Seam] - Re: running Eclipse TestNG plugin on a Seam project

2006-06-23 Thread jtucker
Could be related to the reason I'm proposing a move of components.xml (see the other thread underway at the moment). TestNG as an eclipse plugin runs with a different classpath to running with ant so check in the TestNG output that components.xml is being read correctly. I had to create a WEB-

[JBoss-user] [JBoss Seam] - Re: Proposed move of components.xml location

2006-06-23 Thread jtucker
Yeah it's easy enough with an ant build, but not with a maven directory structure or running the eclipse TestNG plugin. I'm working around by including a second WEB-INF directory in a source folder which only contains components.xml. View the original post : http://www.jboss.com/index.html?mod

[JBoss-user] [JBoss Seam] - Re: Proposed move of components.xml location

2006-06-23 Thread jtucker
Except it doesn't help my case where it's not being loaded in my SeamTests unless I explicitly copy /WEB-INF/ to my classpath. This proposal may also be relevant for JBSEAM-255 - testing components inside containers but outside JSF lifecycles. Would a cascading configuration be more suitable wh

[JBoss-user] [JBoss Seam] - Re: Proposed move of components.xml location

2006-06-22 Thread jtucker
My vote is either META-INF or right next to components.properties at the root of the classpath. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952645#3952645 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3952645 All t

[JBoss-user] [JBoss Seam] - Proposed move of components.xml location

2006-06-22 Thread jtucker
I'm suggesting that components.xml be moved from it's hard-coded location at /WEB-INF/components.xml to simply be loaded from the classpath. The main reason is that I'm having to do workarounds when using SeamTest to include the WEB-INF directory in my test classpath. I can't think of any advan

[JBoss-user] [JBoss Seam] - Re: SeamTest (TestNG), Maven 2, and Embeddable EJB3

2006-06-21 Thread jtucker
We use SeamTest, TestNG, EEJB3 and Maven 2 all the time without a problem so I can guarantee that it does work. You probably just need to override SeamTest's initServletContext method in your TestNG class with this... | public void initServletContext(Map initParams) { | ini

[JBoss-user] [JBoss Seam] - Re: NullPointerException

2006-04-15 Thread jtucker
This can happen if you specify /WEB-INF/faces-config.xml as one of the files in javax.faces.CONFIG_FILES and your SeamPhaseListener is configured in faces-config.xml. MyFaces reads all the files listed in javax.faces.CONFIG_FILES as well as /WEB-INF/faces-config.xml. This must register the pha