[jboss-user] [JBoss Seam] - Re: Two login pages/methods

2008-01-17 Thread david.spark
I use Roles for this situation. Presumably you have some field in the database which indicates if someone is a user or an admin. If so then you can add an appropriate role in the Authenticate method of the Authenticator and have something like this in your login.page.xml: page |navigation

[jboss-user] [JBoss Seam] - Re: Two login pages/methods

2008-01-17 Thread david.spark
Oh right, I see what you're trying to do now :-) I think what I would do is take the username / password and in the Authenticate method try and validate it as both a user and an admin and then set the role to whichever one it validates as. Obviously the one assumption here is that there will

[jboss-user] [JBoss Seam] - Re: Two login pages/methods

2008-01-17 Thread david.spark
hubaghdadi wrote : Well, I think you will kill me soon :) | Login page for the public contains: username and password fields. | Login page for the admin contains: EmployeeID only | Two different pages dude :D I still think my method would work, both different pages can use the same

[jboss-user] [JBoss Seam] - Re: Easiest way to disable UrlRewrite in Seam examples?

2008-01-10 Thread david.spark
For the Wiki example there's no UrlRewriteFilter section in web.xml, but there was something in Components.xml. I tried removing the following code from Components.xml: component name=wikiUrlRewriteFilter class=org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter precedence=30 |

[jboss-user] [JBoss Seam] - Re: Easiest way to disable UrlRewrite in Seam examples?

2008-01-10 Thread david.spark
Unfortunately that didn't work, I get the error: java.lang.IllegalArgumentException: no such setter method: org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter.disabled I also tried removing the line include name=urlrewrite*.jar / from build.xml but when I do this there's no errors starting the

[jboss-user] [JBoss Seam] - Easiest way to disable UrlRewrite in Seam examples?

2008-01-09 Thread david.spark
I'm trying to gain inspiration from the Seam examples (the Wiki one in this case) but it would be handy if I could see the actual URLs to help me figure out in my head what's going on. What's the simplest way to turn off the UrlRewrite functionality so I can see the bare URLs? Thanks!

[jboss-user] [JBoss Seam] - Re: framework:entity-query called on pages that don't use it

2007-10-29 Thread david.spark
So I've been digging about in my code and have discovered that the reason for these queries is not related to web.xml, it's just coincidence that similar queries are defined there. It's actually related to a particular Entity bean (and Entity beans in general I guess). I run a query which

[jboss-user] [JBoss Seam] - framework:entity-query called on pages that don't use it?

2007-10-26 Thread david.spark
I've been looking at the console log for my site and I've notice that the framework:entity-queries from web.xml are being called on some pages where there is no reference to the query name. It seems to only happen the first time that the page is loaded. I'm wondering if this is normal behaviour

[jboss-user] [JBoss Seam] - Re: getting the id of the object inserted...

2007-10-22 Thread david.spark
If you use entityManager.merge(pojo) then it returns the persisted Pojo object from which you can get the ID. So, for example, you can do Pojo pojo = new Pojo(); | //Fill pojo with info | Pojo pojo2 = entityManager.merge(pojo); | pojo2.getId(); //There it is Actual code might need

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Mapping relationship where database ID's are different forma

2007-10-19 Thread david.spark
I'm trying to map a OneToOne relationship in a legacy database. The problem I have is that I keep getting the following error: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: LocationID, expected: tinyint | at

[jboss-user] [JBoss Seam] - Re: Problem with s:selectItems not showing correct value

2007-10-16 Thread david.spark
Yes sorry, I meant the hashcode. Overriding the two methods as suggested fixes the problem nicely. Thanks for the help. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4095707#4095707 Reply to the post :

[jboss-user] [JBoss Seam] - Problem with s:selectItems not showing correct value

2007-10-12 Thread david.spark
I have a problem with a h:selectOneMenu using a s:selectItems list. The code is: h:outputText value=#{webUser.clientContact.client.dressCode.maleTop}/ | h:selectOneMenu value=#{webUser.clientContact.client.dressCode.maleTop} | s:selectItems value=#{maleTops.resultList} |

[jboss-user] [JBoss Seam] - Re: @in(create=true) not working !

2007-09-25 Thread david.spark
I managed to fix my error by explicitly naming the bean using the @Name annotation. In the past Seam has inferred the bean name from the class name (i.e. they are the same) but it appears this is no longer the case? View the original post :

[jboss-user] [JBoss Seam] - Re: @in(create=true) not working !

2007-09-24 Thread david.spark
I get the same problem after upgrading from Seam 2 Beta to CR1. I also the same error for @Out annotated variables too. The full error trace is: 14:25:21,093 ERROR [SeamPhaseListener] uncaught exception | javax.el.ELException: javax.ejb.EJBTransactionRolledbackException: In attribute requires

[jboss-user] [JBoss Seam] - Radio button select list to create data in foreign table

2007-08-21 Thread david.spark
I'm sure this must be fairly trivial but I can't seem to get it to work (too late in the day I think :) ). I want to link the value of a radio button set to a value in a foreign table. The problem I seem to be having is that initially there is no value set so there is no corresponding row in

[jboss-user] [EJB 3.0] - Re: Problems updating hibernate

2007-08-13 Thread david.spark
Not sure if it's the same cause but I had a java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.init error when trying to update Hibernate and it turned out to be that my update method was to rename the old jar file (e.g. add an extension of .old) then copy the new file

[jboss-user] [JBoss Seam] - Re: ManyToOne OneToMany

2007-08-09 Thread david.spark
One problem is that the @Out annotation should be in the code where the athlete was originally selected. How is the athlete that you want to upload the workout for selected? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072446#4072446 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ManyToOne OneToMany

2007-08-09 Thread david.spark
I don't use seam-gen much so can't really imagine that page :-) It seems like you're passing the athleteID to workoutList.xhtml. That's not the same as passing an instance of athlete, so unless something happens in workoutList.xhtml to convert the ID back to an instance of Athlete there's no

[jboss-user] [JBoss Seam] - Re: ManyToOne OneToMany

2007-08-09 Thread david.spark
OK so assuming that athleteList.xthml is correctly generating a list of athlete objects I would change your s:link to be something like: h:column | f:facet name=headerCalendar/f:facet | h:commandLink id=athlete | value=Calendar |

[jboss-user] [JBoss Seam] - Re: ManyToOne OneToMany

2007-08-09 Thread david.spark
If the h:column is part of a h:dataTable then the h:form tags need to be outside the h:dataTable tags. Could that be your problem? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072615#4072615 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ManyToOne OneToMany

2007-08-09 Thread david.spark
Ah ignore my last post then :-) Glad you got it working. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072618#4072618 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072618 ___

[jboss-user] [JBoss Seam] - Problem calling resultList.size() on framework entity-query

2007-08-03 Thread david.spark
I'm trying to get the number of results from the following query (in components.xml): framework:entity-query | name=clients | ejbql=SELECT c FROM Client c | max-results=20/ And this is in my page: h:outputText value=#{clients.resultList.size()} clients available/ But when I

[jboss-user] [JBoss Seam] - Re: s:selectDate control within RichFaces Tab

2007-07-27 Thread david.spark
Hi, I had the same problem and it appears to be that the date selection control is rendered underneath the tabPanel. I solved the problem by updating to Seam 2.0.0(beta) which renders this correctly. View the original post :

[jboss-user] [JBoss Seam] - s:selectDate type control for time?

2007-07-23 Thread david.spark
As there isn't a s:selectTime component does anyone have any experience of solutions for inputting times? I'm trying to use two drop down lists (one for hours one for minutes) but am having problems mapping that to a single time field in the database. View the original post :