Re: [appfuse-user] Why the GenericManager can not be injected when the model ID is a String ?

2007-12-17 Thread Matt Raible
Is your setter named setDRegionManager? If so, and it's not working, it's probably because you're not following JavaBeans conventions (capital letters right next to each other). I'd try changing your setter to setDregionManager. Matt On Dec 17, 2007, at 11:43 PM, Vachel Chan wrote: Ye

Re: [appfuse-user] Why the GenericManager can not be injected when the model ID is a String ?

2007-12-17 Thread Matt Raible
What's the bug? Your DRegionAction isn't getting its manager injected properly? Since this works for the "Person" object in the tutorials, I don't think it's a bug. However, there may be something in your application that's causing this behavior. Matt On Dec 17, 2007, at 11:36 PM, Vachel C

Re: [appfuse-user] Why the GenericManager can not be injected when the model ID is a String ?

2007-12-17 Thread Vachel Chan
Yes, I'm using Struts 2 + Hibernate. When I run "mvn integration-test", all the unit test is passed, until run to the web-test "SearchDRegion" , I got the NULL exception. That means DRegionActionTest worked very well ! But DRegionAction.list() is failed in web-test. I think it's a b

Re: [appfuse-user] Auto copy data from JSP page to data model when clicking a button

2007-12-17 Thread Nathan Anderson
I have three ideas that might help... The first solution that comes to mind is to have one form for uploading the picture and editing the user. I'm guessing that at the moment when you press "upload" it is a different form which means the fields used for editing the user are not passed back to

Re: [appfuse-user] Appfuse 2.0 + Struts + Hibernate - customising Hibernate error messages

2007-12-17 Thread Rob Hills
Hi Matt, Matt Raible wrote: In struts.xml, you can map global exceptions: exception="org.springframework.dao.DataAccessException" result="dataAccessFailure"/> http://struts.apache.org/2.x/docs/exception-configuration.html That looks just like what I need. I not

Re: [appfuse-user] Appfuse 2.0 + Struts + Hibernate - customising Hibernate error messages

2007-12-17 Thread Matt Raible
In struts.xml, you can map global exceptions: exception="org.springframework.dao.DataAccessException" result="dataAccessFailure"/> http://struts.apache.org/2.x/docs/exception-configuration.html Hope this helps, Matt On Dec 17, 2007, at 9:34 PM, Rob Hills wrote

[appfuse-user] Appfuse 2.0 + Struts + Hibernate - customising Hibernate error messages

2007-12-17 Thread Rob Hills
Hi All, I'm currently grappling with a weird Hibernate concurrency problem and it occurred to me that in the event that a user of my app runs into a "real" concurrency problem (where two users are actually editing the same record at the same time), s/he will be presented with a rather unfrien

[appfuse-user] Using GenericDao with Inheritance

2007-12-17 Thread Alexander Coles
Hi, What would be best practice for using GenericDao with model classes and inheritance? Here are my model classes: @Entity @Table(name = "ITEMS") @Inheritance(strategy = SINGLE_TABLE) @DiscriminatorColumn(name = "TYPE", discriminatorType = STRING, length = 3) public abstract class Item {

Re: [appfuse-user] Change default date format

2007-12-17 Thread Matt Raible
The BaseFormController reads this same value (from the i18n bundle). Did you forget to call super.initBinder() in your initBinder() method? Matt On Dec 17, 2007, at 3:24 PM, ickphum wrote: In the code snippet you refer to above, there is a variable ${datePattern}. You don't say which vers

Re: [appfuse-user] Change default date format

2007-12-17 Thread ickphum
> In the code snippet you refer to above, there is > a variable ${datePattern}. You don't say which version of AppFuse > you're using, but in AppFuse 2, this variable is set in > common/taglibs.jsp, using the "date.format" string in your > ApplicationResources.properties file. Absolutely rig

Re: [appfuse-user] Don't know where to post this bug!!!???? Hope somene do read!

2007-12-17 Thread Matt Raible
You should be able to check the mailing lists archives to see if your question shows up. http://myfaces.markmail.org/search/?q=order:date-backward If you don't receive an answer - it's likely because no one knows the answer. Matt On Dec 17, 2007, at 2:48 PM, Carlos Ortiz wrote: Ok, I am

Re: [appfuse-user] Don't know where to post this bug!!!???? Hope somene do read!

2007-12-17 Thread Carlos Ortiz
Ok, I am again subscribed to the MyFaces Disctussion mailing list. And I don't know if It gets seen or should I post the same question to de developers list, should it not be the case. On Dec 17, 2007 3:36 PM, Carlos Ortiz <[EMAIL PROTECTED]> wrote: > Yes, I have tried there but I don't know if

Re: [appfuse-user] Automatic timestamping of all persisted data

2007-12-17 Thread MarcelR
I use: @Version private Timestamp changeDate; Standard in jpa (that I use most), don't know about hibernate Marcel Rob Hills wrote: > > Hi All, > > I'm using AppFuse 2.0 + Struts2 + Hibernate. > > I need to timestamp all of my persisted data. > > I have a base model cla

Re: [appfuse-user] Don't know where to post this bug!!!???? Hope somene do read!

2007-12-17 Thread Carlos Ortiz
Yes, I have tried there but I don't know if my eMail system is having trouble because I don't know if it has been delivered, then I had to unsubscribe. Well, I will try again. I suspected this has to be done, I will try again, thanks a lot. Uff, I guess you read all of these mail messages. Good

Re: [appfuse-user] Multiple Dependent Projects

2007-12-17 Thread Mike Wille
Just one war file. They are stand alone projects in the sense that there are two maven projectsI started down this path after reading: http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html I just realized that there is no corresponding feature for JARs. So my Project B c

Re: [appfuse-user] Multiple Dependent Projects

2007-12-17 Thread Alexander Coles
I am not quite clear - if that's the case, then project A and project B aren't standalone projects. In other words, how many WAR files will you be deploying to Tomcat (or your container)? Cheers, Alex On 17 Dec 2007, at 19:18, Mike Wille wrote: I just realized that I have left something ou

Re: [appfuse-user] Problem with PropertyConfigurer/ Compass + JPA + AppFuse 2.0 Integration

2007-12-17 Thread Alexander Coles
Just FYI, that was the issue. For anyone else interested, see Compass Forums: http://forums.opensymphony.com/thread.jspa?messageID=191907𮶣 Compass JIRA issue: http://jira.compassframework.org/browse/CMP-457 Looks like its best, and more flexible, to avoid using the Compass schema. Alex On

[appfuse-user] Appfuse 2 + Struts2 + hibernate - version incrementing x 2 between "edit" and "save"

2007-12-17 Thread Rob Hills
Hi All, I have had a problem suddenly appear on a form I'm working on and I can't for the life of me work out what I've done to cause it. Unfortunately I've done a lot of work on it since the last commit to the repository so I can't check that :-( I am updating an entity that has optimistic

Re: [appfuse-user] Appfuse 2.0 + Struts2 Dropdown menus problem

2007-12-17 Thread Rob Hills
Hi Matt, Matt Raible wrote: The easiest way to solve this problem (with Struts Menu) is to add onmouseover events to menu-config.xml that hide the offending elements. Thanks for the reply. I've seen that method mentioned around the traps. I may have to do it, but unfortunately there are a lot

Re: [appfuse-user] Multiple Dependent Projects

2007-12-17 Thread Mike Wille
I just realized that I have left something out. My end goal was to generate one combined web app from project A and B using the jar/war overlay feature. Does that change anything? Thanks! -Mike Alexander Coles wrote: I think so. I am offering this as a purely suggestion - the system I am c

Re: [appfuse-user] Multiple Dependent Projects

2007-12-17 Thread Alexander Coles
I think so. I am offering this as a purely suggestion - the system I am currently working on -- with two WARs/web apps - is constrained by exactly what you mentioned: Tomcat is the deployment environment for the enterprise, so I don't have the full J2EE stack available to me. Instead I've j

Re: [appfuse-user] Multiple Dependent Projects

2007-12-17 Thread Mike Wille
Yes, project A is also a stand alone project. It has both Core and Web modules. Thanks for the links. I will take a look. At first glance, it seems that this creates an EAR file and would then require something more then Jetty or Tomcat. Thanks! -Mike Alexander Coles wrote: Is Project A

Re: [appfuse-user] Problem with PropertyConfigurer/ Compass + JPA + AppFuse 2.0 Integration

2007-12-17 Thread Matt Raible
On Dec 17, 2007, at 10:21 AM, Alexander Coles wrote: Thanks for your suggestions, Matt. That's what I immediately thought of - but I doubled checked both the spellings, and that BaseDaoTestCase.java loads applicationContext-resources.xml. I also added search.index to jdbc.properties and

Re: [appfuse-user] Multiple Dependent Projects

2007-12-17 Thread Alexander Coles
Is Project A also a stand alone project, or does it just provide infrastructure support? If I am understanding your requirement rightly, you could create a shared parent application context: http://blog.interface21.com/main/2007/06/11/using-a-shared-parent-application-context-in-a-multi-war-

Re: [appfuse-user] Problem with PropertyConfigurer/ Compass + JPA + AppFuse 2.0 Integration

2007-12-17 Thread Alexander Coles
Thanks for your suggestions, Matt. That's what I immediately thought of - but I doubled checked both the spellings, and that BaseDaoTestCase.java loads applicationContext- resources.xml. I also added search.index to jdbc.properties and still get this issue: [news] WARN [main] SystemPropertyU

Re: [appfuse-user] Accessing managers from custom JSP tags

2007-12-17 Thread Dale Newfield
Matt Raible wrote: You should be able to get the WebApplicationContext from the ServletContext. In the end that's what this solution does, too, but it seems simpler to me: If you implement SimpleTag (for example, by extending SimpleTagSupport) you can get the pageContext from getJspContext()

[appfuse-user] Multiple Dependent Projects

2007-12-17 Thread Mike Wille
Hi All, I'm looking for advice on setting up multiple projects. I've been using the Spring MVC Modular archetype with appfuse and it works great. Now I was thinking about trying it out on a larger scale. I'm setting up a second project (multi module) that depends on the first. Everything

[appfuse-user] org.springframework.mail.SimpleMailMessage not work with UTF-8?

2007-12-17 Thread BruceLee
Dear Team, We want to send Asian character email with UTF-8 encoding. But receiver gets all ?? Our env: appfuse 1.9.4 with WebWork2, Linux Tomcat web server. Not sure what mail server on our web hosting. Thanks! -Bruce -- View this message in context: http://www.nabble.com/org.springframew

[appfuse-user] Auto copy data from JSP page to data model when clicking a button

2007-12-17 Thread BruceLee
Dear Team, My User form also has a 'Upload' button to upload user's picture. But After user uploads a file and redirects back User form, the changes just made on editbox (like First Name) are gone. Is it any way, when user clicks 'Upload', code logic copies the data on JSP page to data model Use

Re: [appfuse-user] CSS in dataTable

2007-12-17 Thread garyng
you need to create a more refined css element(effectively means use this css only for link element inside a table inside a form), something like form table a { color: #ff } alternatively, just give the rows your own class name and define it there. So long you css is included after th

Re: [appfuse-user] Appfuse 2.0 + Struts2 Dropdown menus problem

2007-12-17 Thread Matt Raible
The easiest way to solve this problem (with Struts Menu) is to add onmouseover events to menu-config.xml that hide the offending elements. Matt On Dec 17, 2007, at 9:27 AM, Rob Hills wrote: Hi All, I'm using Appfuse 2.0 + Struts 2. In my project, I'm using the "standard" horizontal nav m

[appfuse-user] Appfuse 2.0 + Struts2 Dropdown menus problem

2007-12-17 Thread Rob Hills
Hi All, I'm using Appfuse 2.0 + Struts 2. In my project, I'm using the "standard" horizontal nav menu used by the default AppFuse 2 theme. I'm having a problem with elements "bleeding through" the dropdown menus and not only is it unsightly, but it causes functional problems because you can't

Re: [appfuse-user] CSS in dataTable

2007-12-17 Thread Matt Raible
You might try changing myfaces.css since it has specific styles for the dataTable. You could also narrow your CSS selector and use something like ".table a:hover". The styles for ".table" are in layout.css (I believe). Here's the classes set on datatable: class="scrollerTable table" Matt

Re: [appfuse-user] Don't know where to post this bug!!!???? Hope somene do read!

2007-12-17 Thread Matt Raible
This sounds like a MyFaces issue. Have you tried posting this to their mailing list? Matt On Dec 14, 2007, at 1:52 PM, Carlos Ortiz wrote: Hi I have this org.apache.myfaces.ADD_RESOURCE_CLASS value>org.apache.myfaces.component.html.util.StreamingAddResourceparam-value> I ne

Re: [appfuse-user] Why the GenericManager can not be injected when the model ID is a String ?

2007-12-17 Thread Matt Raible
Which web framework are you using? If it's Struts 2, the manager is injected via the setXXXManager method in your action. However, it's only injected when running in the server since the Spring Plugin facilitates this. For your tests, you should manually call setXXXManager. The tests genera

Re: [appfuse-user] Accessing managers from custom JSP tags

2007-12-17 Thread Matt Raible
You should be able to get the WebApplicationContext from the ServletContext. Here's how we do it in Spring MVC's LabelTag.java: /** * Get the validator resources from a ValidatorFactory defined in the * web application context or one of its parent contexts. * The bean is r

Re: [appfuse-user] Problem with PropertyConfigurer/ Compass + JPA + AppFuse 2.0 Integration

2007-12-17 Thread Matt Raible
The only thing I can think of is: 1. You've misspelled the property name in search.properties. 2. You're not loading applicationContext-resources.xml in your tests. You might try adding search.index to mail.properties or jdbc.properties and see if that works. Matt On Dec 15, 2007, at 6:51 P

Re: [appfuse-user] Unexpected Command Object Update in FormController

2007-12-17 Thread Matt Raible
Have you changed any transaction boundaries to take place in your Controller? Transactions should begin in the service layer. I've seen your problem happen when transactions are demarcated in the FormController or an interceptor. Matt On Dec 14, 2007, at 1:22 PM, mavenj wrote: I am usin

Re: [appfuse-user] struts2 validator

2007-12-17 Thread Matt Raible
If you look in struts.xml, you'll see that the validator is excluded from certain methods: name="excludeMethods">cancel,execute,delete,edit,list Matt On Dec 14, 2007, at 12:48 AM, tibi wrote: hi, can someone enlight me on struts valid

RE: [appfuse-user] Updating POJO results in new database entry

2007-12-17 Thread vpacheco
Yes, please add this note to the tutorial. It would definitely help all us newbies out there. Vanessa Pacheco Programmer Bowman Systems L.L.C 318.213.8780x307 == IMPORTANT WARNING: This message is intended for the use of the person or entity to which it is addr

[appfuse-user] CSS in dataTable

2007-12-17 Thread mikebgx
I have displayed some links in a dataTable and I would like to set their hover-colour. I tried editing forms.css/a:hover/color:#ff; which worked, but of course this changed the colour of ALL links, I'd like to just change the links in the table. Any ideas please? Regards, Mike. -- View this

Re: [appfuse-user] Updating POJO results in new database entry

2007-12-17 Thread Matt Raible
You are correct that the version property is missing from the tutorials. However, that is done on purpose since the Person object (in the tutorials) doesn't have a version property. Yes, we could add it, but I'm not sure that version is used in the majority of projects. I tend to think it's

Re: [appfuse-user] Does somebody know?

2007-12-17 Thread Matt Raible
I don't understand your question. Can you post some code explaining what you're trying to do and the errors you're seeing? Thanks, Matt On Dec 14, 2007, at 7:36 AM, Carlos Ortiz wrote: Hi everyoune A question. Does somebody know if in SiteMesh library I can generate dynamic content insid

Re: [appfuse-user] [Appfuse2.0] Best Practise Design Pattern for Multiple Dao Access from managers

2007-12-17 Thread Alexander Coles
The tutorials provide an example of how to write an expectation with JMock too: http://www.appfuse.org/display/APF/Services#Services-managertest Just as every JUnit test needs one or more assertions, a test with JMock needs an expectation. If you stick with JMock (the default), then you jus

[appfuse-user] Don't know where to post this bug!!!???? Hope somene do read!

2007-12-17 Thread Carlos Ortiz
Hi I have this org.apache.myfaces.ADD_RESOURCE_CLASS org.apache.myfaces.component.html.util.StreamingAddResource I need to use this because I need special characters in my HTML rendered code such as áéñ, etc and shown in an alert in the javascript code included in a page (The peo

Re: [appfuse-user] [Appfuse2.0] Best Practise Design Pattern for Multiple Dao Access from managers

2007-12-17 Thread Peter Schneider-Manzell
Yes, you need a expectation for every call on a mock executed during a test. I would recommend to use EasyMock instead of JMock. It's very easy to use, e.g. creating a mock: GameDAO gameDAO = EasyMock.createStricktMock(GameDAO.class); If you call a method e.g. public Game getGame(Long id) on gam

Re: [appfuse-user] [Appfuse2.0] Best Practise Design Pattern for Multiple Dao Access from managers

2007-12-17 Thread Struts2 Fan
I have no expectation for the moveDao, must I define an expectation for each Dao I have used in methods? -- View this message in context: http://www.nabble.com/-Appfuse2.0--Best-Practise-Design-Pattern-for-Multiple-Dao-Access-from-managers-tp14116309s2369p14370264.html Sent from the AppFuse -

Re: [appfuse-user] [Appfuse2.0] Best Practise Design Pattern for Multiple Dao Access from managers

2007-12-17 Thread Struts2 Fan
Thanks for the reply, I did the same steps as you explained. I get this error, when I test the GameManagerImplTest. public class GameManagerImpl extends GameManager{ public Game autoPlay() { //. Move move = moveDao.getBestMove(); //. } } public class