[appfuse-user] Re: Re: Help needed for Many to Many relation

2008-04-08 Thread Derek Broughton
Rob Hills wrote: > You're absolutely right of course, I'd completely forgotten about the > @ManyToMany annotation. I believe that a very slight tweak to your > suggested HQL: "select employees from Project where > Project.employeeId=?" should work if the Entities have an @ManyToMany > annotation.

[appfuse-user] Re: Help needed for Many to Many relation

2008-04-08 Thread Derek Broughton
Rob Hills wrote: > Hi Trish, > > Trish wrote: >> Hi >> >> Im new to appfuse and trying to implement manay to many relation for >> Employee Project tables, the created model classes as follows >> > At a quick glance, your entities look OK to me. >> public List getByProject(Long projectId, Long

[appfuse-user] Re: Re: How to create parent objects?

2008-04-02 Thread Derek Broughton
Rob Hills wrote: > ref="gltransactionDao" /> Woo-hoo! That appears to have done it. Thanks a lot! -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[appfuse-user] Re: Re: How to create parent objects?

2008-04-02 Thread Derek Broughton
ry adding the following: > > Derek Broughton wrote: >> and in ApplicationContext.xml: >> > <..> >> > class="ca.pointerstop.cocoa.service.impl.GlaccountManagerImpl"> >> >> > ref=&quo

[appfuse-user] Re: Re: How to create parent objects?

2008-04-02 Thread Derek Broughton
Rob Hills wrote: >> @Override >> public Journalentry save(Journalentry object) { >> if (object.getTransaction() == null){ >> Gltransaction trans = gltransactionDao.save(new >> Gltransaction()); >> > This isn't related to the main problem y

[appfuse-user] Re: How to create parent objects?

2008-04-01 Thread Derek Broughton
Rob Hills wrote: > Make sure your DAO attributes are references to the Interface rather > than the Hibernate implementation. For example, if you've got a UtoDao > interface and a UtoDaoHibernate class, your manager should include > something like this: > > UtoDao utoDao; > > public void setUtoD

[appfuse-user] Re: Re: Re: Appfuse .war in tomcat

2008-04-01 Thread Derek Broughton
Nathan Anderson wrote: > Hi Derek, > > I just remembered the other problem I had. Make sure that all the files > in the tomcat directory are owned by the tomcat user (I think it is > tomcat55 or something like that). There is a problem where if the > /var/lib/tomcat5.5/logs isn't owned by the t

[appfuse-user] Re: Re: Re: How to create parent objects?

2008-04-01 Thread Derek Broughton
Nathan Anderson wrote: > > - "Dustin Pearce" > <[EMAIL PROTECTED]> wrote: > >> ... >> Seems like we will need to clarify the DAO/Manager concept, so users >> don't feel constrained by a one to one pattern. >> >> -D > > Not a bad idea... I just copied a couple of sentences taken from the >

[appfuse-user] Re: Re: How to create parent objects?

2008-04-01 Thread Derek Broughton
Rob Hills wrote: > Hi Derek, > > Derek Broughton wrote: >> Rob Hills wrote: >> >>> I'd >>> be looking to empower a Manager class with the wherewithall to do the >>> job. I'd create a Manager class for your unnamed third object (

[appfuse-user] Re: How to create parent objects?

2008-04-01 Thread Derek Broughton
Rob Hills wrote: > That said, I believe I've previously got into problems with this kind of > issue by focusing too much on the model level. I hear you. I'm not uncomfortable with object databases, but I suspect that this whole concept of Object-relational mapping is encouraging me to think to

[appfuse-user] Re: Re: How to create parent objects?

2008-03-31 Thread Derek Broughton
Nathan Anderson wrote: > Okay, if the DB transactional safety can be ignored in this example. The > only way that comes to mind to make this work is to have your JE objects > have an option Transaction property. Then after you create the > Transaction instance you would set it on each of the JE'

[appfuse-user] Re: Re: Appfuse .war in tomcat

2008-03-31 Thread Derek Broughton
Nathan Anderson wrote: > Hi Derek, > > I don't remember the error message, but I had some issues when I upgraded > to Ubuntu 7.10. See the link for explanation of the problem and the > solution that I used: > > http://appfuse.org/display/APF/OS+Specific+Issues > > If this is not your problem

[appfuse-user] Re: Re: Appfuse .war in tomcat

2008-03-31 Thread Derek Broughton
Nathan Anderson wrote: > Hi Derek, > > I don't remember the error message, but I had some issues when I upgraded > to Ubuntu 7.10. See the link for explanation of the problem and the > solution that I used: > > http://appfuse.org/display/APF/OS+Specific+Issues > > If this is not your problem

[appfuse-user] Re: How to create parent objects?

2008-03-31 Thread Derek Broughton
Nathan Anderson wrote: > Hello all, > > I assume a "JE" is a Journal Entry and in modern accounting practices it > is typical that a single "Transaction" has at least 2 JE's. What I'm not > sure about is why the JE's are required to be created before the > Transaction. This sounds like a case w

[appfuse-user] Re: How to create parent objects?

2008-03-31 Thread Derek Broughton
dusty wrote: > > Yeah Derek, we are not sure what a JE is, and transaction can mean a > number > of things. Can you post your model code and describe what you are trying > to do in a little more detail? > "what" a JE or Transaction is is really irrelevant. They're just records. If this was

[appfuse-user] Re: Appfuse .war in tomcat

2008-03-31 Thread Derek Broughton
Sorry this isn't threaded, it's not on my server anymore. Did anybody figure out the problem in http://www.nabble.com/Re:-Appfuse-.war-in-tomcat-p15061918s2369.html in which Tomcat refuses to load the appfuse project war file with nothing more than a: SEVERE: Error listenerStart message? The us

[appfuse-user] Re: Displaying list (with DisplayTag) starting at last page

2008-03-31 Thread Derek Broughton
dusty wrote: > > I think I get what you are saying. I don't think there is an easy way to > do that in displayTag, but you could do the following instead: > > * Remove DisplayTags paging links and replace with your own. > * Determine what years you want to display and then create a link for ea

[appfuse-user] Re: Re: Displaying list (with DisplayTag) starting at last page

2008-03-31 Thread Derek Broughton
Philip Barlow wrote: > Ok, from experience, if i was displaying transactional data to a user, > (I don't know if your data contains transactions) i would sort by most > recent first, so page 1 is 2007, page 2 is 2006, most people seem fine > with this. This is also how banks show your transactions

[appfuse-user] Re: Displaying list (with DisplayTag) starting at last page

2008-03-31 Thread Derek Broughton
Philip Barlow wrote: > Hi Derek, > > I think you may be over complicating this issue but i am not fully sure > what you are trying to achieve. Is it not as simple as sorting your > list, so the page you want to display first is page 1 of 7 and page 2 of > 7, 3 of 7 etc. contains the relevant foll

[appfuse-user] How to create parent objects?

2008-03-29 Thread Derek Broughton
I am s frustrated. I have an accounting app, where accounts have JEs, and multiple JEs belong to a transaction. So when I create a JE, there may not yet be a transaction. I can't figure out any (clean) way to make that parent record. What's the proper procedure? -- derek

[appfuse-user] Displaying list (with DisplayTag) starting at last page

2008-03-27 Thread Derek Broughton
Is there a simple way to start displaying a list from the last page of data? That is, I have a list sorted by date, with 160 rows. I'm displaying 25 rows per page, I'd like the first page to appear as "Page 7 of 7", showing rows 136-160. I figure I could retrieve a list sorted by descending date

[appfuse-user]

2008-03-23 Thread Derek Broughton
Something more mundane. Why does use of: inside a generate a tag before the (it actually wraps the in a and the in )? It doesn't seem to be part of the specification. For now the bullet before the SELECT is the least of my problems :-) And what do I have to do to actually get the def

[appfuse-user] Re: Re: Executing Named query

2008-03-22 Thread Derek Broughton
Rob Hills wrote: > That may well work, but I suspect it's a bad habit to get into. > Creating your own Manager (extending GenericManager) and Dao (extending > GenericDao) and their implementing classes can be a bit of a chore, but > unless your app is a _very_ simple one, I think the collective wi

[appfuse-user] Re: Re: Executing Named query

2008-03-22 Thread Derek Broughton
Rob Hills wrote: > Derek Broughton wrote: >> > Yes, and GenericManager does its DB stuff via GenericDao... >> I think I have it, now. It's trivial :-) >> >> WebApplicationContext ctx = >> WebApplicationContextUtils.getRequiredWebApplic

[appfuse-user] Re: Executing Named query

2008-03-22 Thread Derek Broughton
Rob Hills wrote: > Hi Derek, > > Derek Broughton wrote: >> Appfuse 2.0, Struts basic, Postgres >> >> I want to execute a Hibernate NamedQuery, but I can't figure out how to >> get the hibernate Session from within my Action. >> >> Can some

[appfuse-user] Executing Named query

2008-03-22 Thread Derek Broughton
Appfuse 2.0, Struts basic, Postgres I want to execute a Hibernate NamedQuery, but I can't figure out how to get the hibernate Session from within my Action. Can somebody point me to some useful documentation - every example I've found assumes you already have the Session. -- derek

[appfuse-user] Re: Debugging missing pages

2008-03-15 Thread Derek Broughton
Rob Hills wrote: > Hi Derek, > > Derek Broughton wrote: >> Appfuse 2.0.1, Struts basic >> >> Can anybody suggest what I need to do to figure out why a page simply >> refuses to display? If I'm on my accountList.jsp (where the URL >> is /account

[appfuse-user] Debugging missing pages

2008-03-14 Thread Derek Broughton
Appfuse 2.0.1, Struts basic Can anybody suggest what I need to do to figure out why a page simply refuses to display? If I'm on my accountList.jsp (where the URL is /accounts.html) page, and click on a link to edit an account (url /editAccounts.html, page is accountForm.jsp), nothing happens - no

[appfuse-user] Re: dbunit database initialization

2008-03-02 Thread Derek Broughton
Rob Hills wrote: > Hi Derek, > > On 2 Mar 2008 at 17:13, Derek Broughton wrote: > >> Clearly I'm misunderstanding something in the way this works. >> >> Having received the error: >> Error casting value for table 'glaccount' and column '

[appfuse-user] dbunit database initialization

2008-03-02 Thread Derek Broughton
Clearly I'm misunderstanding something in the way this works. Having received the error: Error casting value for table 'glaccount' and column 'gltype_id' no matter what I put in src/test/resources/sample-data.xml for the gltype_id column (it's defined in postgres as "bigint" and the numbers it's

[appfuse-user] Re: Re: Problem in surefire tests

2008-02-22 Thread Derek Broughton
Michael Horwitz wrote: > On 22/02/2008, Derek Broughton > <[EMAIL PROTECTED]> wrote: >> > Do you have a model class called Transaction? If so it may have created an > entry for a bean in the Spring files called "transactionManager". You will > need to change t

[appfuse-user] Re: Problem in surefire tests

2008-02-22 Thread Derek Broughton
Michael Horwitz wrote: > On 22/02/2008, Derek Broughton > <[EMAIL PROTECTED]> wrote: >> >> >>2.0.1 >>2.5 >> >> >>1.1.0 >>2.0 >>4.4 >>2.4 >>1.2 >

[appfuse-user] Re: mvn dbunit:operation - error in CLEAN_INSERT

2008-02-17 Thread Derek Broughton
Derek Broughton wrote: > I have finally got my pojos, actions and tests to all compile, but now > when > I try to test I get the following. Since this _has_ been working, I'm > sure it's something I've done, but how can I find out exactly what > CLEAN_INSERT is tryi

[appfuse-user] mvn dbunit:operation - error in CLEAN_INSERT

2008-02-17 Thread Derek Broughton
I have finally got my pojos, actions and tests to all compile, but now when I try to test I get the following. Since this _has_ been working, I'm sure it's something I've done, but how can I find out exactly what CLEAN_INSERT is trying to pass to the database, so that I debug it? Embedded error:

[appfuse-user] Re: Decrypting the user's password

2007-10-02 Thread Derek Broughton
Michael Horwitz wrote: > The encryption method is set in security.xml - look for the bean called > passwordEncoder. The default setting is ShaPasswordEncoder which is a > one-way hash, so the password cannot be decoded. > > On 10/2/07, John Kwon <[EMAIL PROTECTED]> > wrote: >> >> getUsername gets

[appfuse-user] Re: Problem implementing Serializable

2007-09-17 Thread Derek Broughton
adriel manalansan wrote: > Hello everybody, > > I think this is a stupid question but I really cant make it work. I am > using appfuse 1.9.4 and webwork. In appfuse, it is default that > BaseObject class implements java.io.Serializable. I have a superclass > named BaseModel: > > public abstract

[appfuse-user] Re: Best way to add to org.appfuse.model.User

2007-09-10 Thread Derek Broughton
Michael Horwitz wrote: > For AppFuse 2.0.X the easiest approach is simply to include the code for > the User class and modify as required: > http://www.appfuse.org/display/APF/AppFuse+Core+Classes > > > On 9/7/07, Rob Hills > <[EMAIL PROTECTED]> wrote: >> >> I need to add a single attribute to t

[appfuse-user] Re: Field 'DTYPE' doesn't have a default value

2007-09-06 Thread Derek Broughton
Matt Raible wrote: > Thank *you* - we love users that solve their own problems. ;-) > > Matt > > On 9/4/07, gederer <[EMAIL PROTECTED]> wrote: >> >> Problem solved. I had to add DTYPE to sample-data.xml. >> More importantly - users who report back to the list when they solve their own problems,

[appfuse-user] Re: Login problem - "Bad SQL Grammar"

2007-09-04 Thread Derek Broughton
Derek Broughton wrote: > Rob Hills wrote: > >> However, when I build my proper application against the Postgres >> database, I can't login.  After much sleuthing, I've established that >> it's using Acegi security whereas the default for Appfuse 1.9.x a

[appfuse-user] Re: Login problem - "Bad SQL Grammar"

2007-09-03 Thread Derek Broughton
Rob Hills wrote: > However, when I build my proper application against the Postgres database, > I can't login.  After much sleuthing, I've established that it's using > Acegi security whereas the default for Appfuse 1.9.x appears to be > Container Managed.  The problem appears to be with the SQL u

[appfuse-user] Re: More problems with AMP

2007-09-02 Thread Derek Broughton
Matt Raible wrote: > We haven't done anything in AMP to handle subclasses. If it happens to > generate files for them, that's a coincidence. ;-) > > We'd like to add this feature, but are having a hard time finding the > time to do it. > Well, in that case, I think I'll just assume it's no big

[appfuse-user] More problems with AMP

2007-09-01 Thread Derek Broughton
I can't really decide if I have a problem here, or not. appfuse:gen won't automatically build my subclasses, but I can't tell whether it's just that tool or whether there's something inherently wrong with my table structure. I have a number of joined tables, defined like: @Entity @Inheritance(st

[appfuse-user] Re: Appfuse Maven Plugin (2.0.M5)

2007-08-26 Thread Derek Broughton
Matt Raible wrote: > If you notice - the log message is not a warning or an error, just > informational. I'd like to figure out a way to suppress this message, > but haven't figured out how to do it yet. > Hmmm. I _didn't_ notice, but I thought it hadn't actually generated anything. Since it w

[appfuse-user] Appfuse Maven Plugin (2.0.M5)

2007-08-26 Thread Derek Broughton
When I try: mvn appfuse:gen I get an error: [INFO] src/main/resources/database.properties not found within the project. Trying absolute path. [INFO] No hibernate properties file loaded. which is, of course, correct - I don't have a database.properties file, but then I don't seem to need one in 2

[appfuse-user] Re: Re: Struts test failure

2007-08-20 Thread Derek Broughton
Matt Raible wrote: > On 8/20/07, Derek Broughton <[EMAIL PROTECTED]> >> >> I really think that if autowiring doesn't work with the example, "zero >> configuration" shouldn't even be mentioned on that page; it's just >> misleading. >

[appfuse-user] Re: Struts test failure

2007-08-20 Thread Derek Broughton
Matt Raible wrote: > The test does use manual wiring: > > > action = new PersonAction(); > GenericManager personManager = (GenericManager) > applicationContext.getBean("personManager"); > action.setPersonManager(personManager); > > Ah. I see. Sorry, Matt, but that migh

[appfuse-user] Re: Re: Struts test failure

2007-08-20 Thread Derek Broughton
Matt Raible wrote: > Yes, you are correct in that you have to manually wire your actions in > your test cases. One solution to this problem may be extending > StrutsTestCase instead of BaseActionTestCase. > > http://struts.apache.org/2.0.9/struts2-core/apidocs/org/apache/struts2/StrutsTestCase.ht

[appfuse-user] Re: Re: Struts test failure

2007-08-20 Thread Derek Broughton
Matt Raible wrote: > Yes, you are correct in that you have to manually wire your actions in > your test cases. One solution to this problem may be extending > StrutsTestCase instead of BaseActionTestCase. Oh no! I'll give that a try, but the http://www.appfuse.org/display/APF/Using+Struts+2 page

[appfuse-user] Re: Struts test failure

2007-08-19 Thread Derek Broughton
Derek Broughton wrote: > In a new (2.0m5) project created in Eclipse with Candy4Appfuse, I get the > following error on "mvn surefire:test". While I thought I had followed > the instructions in http://www.appfuse.org/display/APF/Using+Struts+2, I > think > this mu

[appfuse-user] Struts test failure

2007-08-18 Thread Derek Broughton
In a new (2.0m5) project created in Eclipse with Candy4Appfuse, I get the following error on "mvn surefire:test". While I thought I had followed the instructions in http://www.appfuse.org/display/APF/Using+Struts+2, I think this must mean that I don't have zeroconfig setup correctly. Am I on the

[appfuse-user] Re: Allow user (One off) to configure datasource at runtime

2007-08-18 Thread Derek Broughton
If you or Matt don't do this, I'm going to have to (but I'm probably a couple of months away from it) :-) Keep us informed, please. mark.forster wrote: > > Cheers matt, no worries. > > I have pro spring infront of me here an i'm gonna have a tinker with the > datasource bean. > > what doesnt

[appfuse-user] Re: strange ie body and textarea

2007-07-24 Thread Derek Broughton
Matt Raible wrote: > Do you feel confident that IE on Linux is the same as IE on Windows? > Because most folks will run IE on Windows, you might want to confirm > the same behavior happens with IE/Win. > It can't behave otherwise. It _is_ IE/Win running under WINE. It could crash and burn at t

[appfuse-user] Re: Deploying to a linux box

2007-07-17 Thread Derek Broughton
Aled Rhys Jones wrote: > Hi all > > I've got a linux box with red hat enterprise 4 that I need to get my > appfuse project running on. > It currently has MySQL and Apache Httpd 2. > What's the best course to follow in getting my build (currently running > on windows) up and running on the linux b

[appfuse-user] Re: Issue with candy/appfuse - sun tools.jar r1.4.2

2007-07-14 Thread Derek Broughton
Marcelo Alcantara wrote: > Hi, > > I am trying to use candy with appfuse 2M5 but when trying to build it > gives me an error complaining about the tools.jar from 1.4.2 JDK. > > What is the best solution for that? Wouldn´t it have to be solved > automatically? Just been there, done that. Candy

[appfuse-user] RE: RE: many-to-many with attribute ... again

2007-07-09 Thread Derek Broughton
syg6 wrote: > > I figured it out. My fault. Forgot to put @Entity in the Person class! > > One last question - I think PersonRequest should have a combination of > 'person_id' and 'request_id' as its primary key, how can I do that? > Currently it has its own auto-numeric key but I think it's mor

[appfuse-user] Re: Error with mvn hibernate3:hbm2ddl under eclipse

2007-04-17 Thread Derek Broughton
Matt Raible wrote: > On 4/17/07, Derek Broughton <[EMAIL PROTECTED]> > wrote: >> I'm new to all of appfuse, maven and eclipse. Matt, you rock! > > It's not me - it's the community. This project wouldn't exist without > the users and all the

[appfuse-user] Error with mvn hibernate3:hbm2ddl under eclipse

2007-04-17 Thread Derek Broughton
I'm new to all of appfuse, maven and eclipse. Matt, you rock! Google hasn't been able to help me. I'm using Appfuse 2.0-m4, Maven 2.0.5 and Eclipse 3.2.1, on Linux (Ubuntu 06.10) When I run: mvn hibernate3:hbm2ddl from a terminal, my project compiles and generates the DDL. When I do it from

[appfuse-user] Re: how to config smtp via ssl ? for example gmail's smtp ?

2007-04-17 Thread Derek Broughton
Matt Raible wrote: > Googling for it turns up a couple of commercial packages - the first > one costing $1000. > > http://www.google.com/search?q=smtp+ssl+java > That seems a hefty price to pay for what would seem like it should be built into javamail (most apps that talk SMTP have no trouble d

[appfuse-user] Re: Problem wiring up Jasper reports and appfuse (Spring mvc)

2007-04-16 Thread Derek Broughton
Ivan Garcia wrote: > > Did you find the solution? > > the xml you attached is not well nested: > >?property name="paramName"/> >action > > should be like: > >?property name="paramName"> >action > ?/property > Nor valid - a tag should be closed with a not a