Re: [appfuse-user] Send Email from Service Layer

2008-01-22 Thread Michael Horwitz
Just so I can catch up a bit: you no longer have a null-pointer problem when accessing the ServletContext? And the URL object returned from getResource() is non-null? I did assume that your application has an index.html - you may want to try a path you know exists within your application. Mike O

[appfuse-user] NullPointerException from personList.jsp

2008-01-22 Thread Kevin_Chan
Hi. I follow the tutorial instruction to create a web pages by JPA and Struts 2. I can completed the PersonActionTest. However, after I login at personList.jsp, the jsp throw a Null Pointer Exception. That Exception should be thrown from personManager.getAll() . After couple days of tries, I stil

[appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Leo Barrientos C.
Hello, i need two answers for a project - i need help: 1) How i can use the User model from appfuse into my project. There is a Session manager or something? 2) How i can extends the ROLE , i need a new ROLE. Thanks in advance. -- Leo Barrientos C. Responsable de operaciones - OpenSistemas

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Michael Horwitz
On 1/22/08, Leo Barrientos C. <[EMAIL PROTECTED]> wrote: > > Hello, i need two answers for a project - i need help: > > 1) How i can use the User model from appfuse into my project. There is a > Session manager or something? You can access the User model through the userManager or userDao which y

[appfuse-user] datetime picker not loged in

2008-01-22 Thread tibi
hi, my date time picker will not work when i'm not loged into the appfuse system. any clue?? this is the code: Enter a Date (dd/mm/): * dojo.require("dojo.widget.DatePicker");

[appfuse-user] appfuse.tld

2008-01-22 Thread jithesh
Hi, i have some doubts regarding 'appfuse.tld'. It is found that the file is getting generated on building the war file. The content of the generated 'appfuse.tld' is given below. 1.0 1.2 appfuse ..

[appfuse-user] Dynamically adding to AppFuse 2.0 menu

2008-01-22 Thread Rob Hills
Hi All, I have an AppFuse 2.01 + Struts + Hibernate app that has the standard AppFuse Struts menu system with a number of elements statically defined in the menu-config.xml file and rendered via menu.jsp. Once my user has logged in, I have to retrieve some contextual stuff from the database an

Re: [appfuse-user] datetime picker not loged in

2008-01-22 Thread Matt Raible
You're saying it works when you are logged in? If so, I'd suspect there's a request from Dojo to a URL that's protected by security.xml. Matt On Jan 22, 2008, at 6:25 AM, tibi wrote: hi, my date time picker will not work when i'm not loged into the appfuse system. any clue?? this is the co

Re: [appfuse-user] appfuse.tld

2008-01-22 Thread Matt Raible
If you're using AppFuse 1.9.x, this file is generated by XDoclet in build.xml. Look for a tag called jsptaglib (or something like that). Matt On Jan 22, 2008, at 6:28 AM, jithesh wrote: Hi, i have some doubts regarding 'appfuse.tld'. It is found that the file is getting generated o

Re: [appfuse-user] Dynamically adding to AppFuse 2.0 menu

2008-01-22 Thread Michael Horwitz
This example is for a database driven menu: http://demo.raibledesigns.com/struts-menu/dynamicMenu.jsp It sounds as if it could be a useful starting point for your use case? Mike On 1/22/08, Rob Hills <[EMAIL PROTECTED]> wrote: > > Hi All, > > I have an AppFuse 2.01 + Struts + Hibernate app that

[appfuse-user] integration-test -DfailIfNoTests=false

2008-01-22 Thread Gareth Davis
hi all, Just a heads up really. Not sure if anybody else has noticed this but it appears that the latest update to the maven surefire plugin has added a little feature for us. before to surefire 2.4 (released 15th Jan): > mvn integration-test -Dtest=Login would run the webtest target 'Log

Re: [appfuse-user] Rollback false

2008-01-22 Thread Matt Raible
Calling setComplete() is what you're looking for: http://tinyurl.com/3bsqon Matt On Jan 22, 2008, at 9:32 AM, Leo Barrientos C. wrote: Hello, i need to perform a test but without the rollback[true] in mvn test, i need to see the row in a database. Any idea? Thanks in advance. -- Leo Bar

Re: [appfuse-user] Rollback false

2008-01-22 Thread Michael Horwitz
Override the isRollback() method in your test to return false and the test will not rollback. Mike On 1/22/08, Leo Barrientos C. <[EMAIL PROTECTED]> wrote: > > Hello, i need to perform a test but without the rollback[true] in mvn > test, i need to see the row in a database. > > Any idea? > > Than

[appfuse-user] Rollback false

2008-01-22 Thread Leo Barrientos C.
Hello, i need to perform a test but without the rollback[true] in mvn test, i need to see the row in a database. Any idea? Thanks in advance. -- Leo Barrientos C. Responsable de operaciones - OpenSistemas Madrid. www.opensistemas.com Madrid: 902 10 73 96 Móvil: 662319448 España. --

[appfuse-user] Clob Datatype

2008-01-22 Thread tiya tiya
Hi, I defined "Name" column as a datatype CLOB in Oracle 9i.I am using struts framework using appfuse 1.9.4.How can i add setter and getter methods in my model class as a CLOB datatype???Or Give me some idea how can i convert CLOB to String or String to CLOB in my action class? Help would

Re: [appfuse-user] Rollback false

2008-01-22 Thread Leo Barrientos C.
Sorry, but .. where i call it? -- on the Test? Matt Raible wrote: Calling setComplete() is what you're looking for: http://tinyurl.com/3bsqon Matt On Jan 22, 2008, at 9:32 AM, Leo Barrientos C. wrote: Hello, i need to perform a test but without the rollback[true] in mvn test, i need to see

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Leo Barrientos C.
Hello, again 2) How i can extends the ROLE , i need a new ROLE. New roles are created by adding an entry to the role table. Mike Ok, but i need to set in the menu permisiones a new ROLE, Must i change de security.xml? Another one: How i can get the User object (with session)

Re: [appfuse-user] Rollback false

2008-01-22 Thread Matt Raible
I believe either Mike's or my solution will work. isRollback() allows you to prevent rollback for the entire test class, whereas setComplete() allows you to prevent rollback in a specific test. Matt On 1/22/08, Leo Barrientos C. <[EMAIL PROTECTED]> wrote: > Sorry, but .. where i call it? -- on th

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Michael Horwitz
On 1/22/08, Leo Barrientos C. <[EMAIL PROTECTED]> wrote: > > Hello, again > >2) How i can extends the ROLE , i need a new ROLE. > > >New roles are created by adding an entry to the role table. > >Mike > > Ok, but i need to set in the menu permisiones a new ROLE, Must i change > de

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Michael Horwitz
On 1/22/08, Leo Barrientos C. <[EMAIL PROTECTED]> wrote: > > Michael Horwitz wrote: > > > > > > On 1/22/08, *Leo Barrientos C.* <[EMAIL PROTECTED] > > > wrote: > > > > Hello, again > > > >2) How i can extends the ROLE , i need a new ROLE. > > > > > >

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Leo Barrientos C.
Thanks Michael Horwitz. The roles works!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Leo Barrientos C.
Michael Horwitz wrote: On 1/22/08, *Leo Barrientos C.* <[EMAIL PROTECTED] > wrote: Hello, again 2) How i can extends the ROLE , i need a new ROLE. New roles are created by adding an entry to the role table. Mike Ok, but i need

Re: [appfuse-user] Generating Dao and Managers

2008-01-22 Thread Fred Forester
Thanx Matt. actually, in most cases I found I have to create a customized dao and manager. the biggest reason being large tables that kill the paginated list. Thanx Again Fred Matt Raible wrote: On Jan 21, 2008, at 2:08 PM, Fred Forester wrote: Hi All. can Appfuse2 generate Dao and Ma

RE: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Ding, Qin
Again, my goal is to find out how I can get application URL from my bean in service layer. According to Mike, I made my bean servletContextAware so that I can get application URL by calling Url url = servletContext.getResource("/index.jsp"); However, I don't get the host, port information

Re: [appfuse-user] Can Hibernate map this ?

2008-01-22 Thread emmettwalsh
thanks for the reply but im not sure if your solution will work.. Lets say we do what you say and have a User base class and then a producer and consumer subclass. I assume the @discriminating column would be the role_id in the user_role table (although how you specify this im not so sure). But

Re: [appfuse-user] Can Hibernate map this ?

2008-01-22 Thread Dale Newfield
emmettwalsh wrote: Lets say we do what you say and have a User base class and then a producer and consumer subclass. I assume the @discriminating column would be the role_id in the user_role table (although how you specify this im not so sure). There is probably going to be a correlation betwee

[appfuse-user] Calling action method with parameters from JSP

2008-01-22 Thread sarat.pediredla
Hello, My action has a method like below public int getCommentCount(BlogPost post) { ... } In my JSP, I iterate through a list of objects as follows .. How do I call the getCommentCount method inside the s:iterator passing an instance of the current post? ${commentCount(pos

Re: [appfuse-user] Calling action method with parameters from JSP

2008-01-22 Thread Matt Raible
You'll need to use a Struts Tag (with OGNL) to call a method with parameters. JSP's EL doesn't support calling methods with arguments. Matt On Jan 22, 2008, at 1:34 PM, sarat.pediredla wrote: Hello, My action has a method like below public int getCommentCount(BlogPost post) { ... } I

Re: [appfuse-user] Dynamically adding to AppFuse 2.0 menu

2008-01-22 Thread Rob Hills
Hi Mike, Michael Horwitz wrote: This example is for a database driven menu: http://demo.raibledesigns.com/struts-menu/dynamicMenu.jsp It sounds as if it could be a useful starting point for your use case? That looks perfect, thanks for the link! Cheers, Rob Hills Waikiki, Western Australia

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Matt Raible
The following won't work in a test, but it may work in your running application. Spring's RequestContextListener registers the request in a ThreadLocal: private HttpServletRequest getRequest() { return (HttpServletRequest) ((ServletRequestAttributes) RequestContextHolder.getRequestAtt

[appfuse-user] Inject FacesContext to service bean

2008-01-22 Thread Ding, Qin
My goal is to find out how I can get application URL from my bean in service layer. According to Mike, I made my bean servletContextAware so that I can get application URL by calling Url url = servletContext.getResource("/index.jsp"); However, I don't get the host, port information from url.getHo

RE: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Ding, Qin
Matt: getRequest() method is not visible from requestAttributes. QD From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 22, 2008 3:04 PM To: [email protected] Subject: Re: [appfuse-user] Using User from appfuse in appz The f

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Matt Raible
You have to cast to ServletRequestAttributes - did you try the code below? I'm using this on a project with Spring 2.5 and it works. Matt On Jan 22, 2008, at 2:13 PM, Ding, Qin wrote: Matt: getRequest() method is not visible from requestAttributes. QD From: Matt Raible [mailto:[EMAIL PROT

[appfuse-user] Simple

2008-01-22 Thread Ding, Qin
How do I configure JavaMailSenderImpl and SimpleMailMessage to send HTML mail messages? Is it possible? Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Ding, Qin
Matt, Yes, I tried. I pasted the code in. It won't compile due to the fact getRequest method is not visible. I am using appfuse 1.9.4. and the spring is 2.0. Is it possible to upgrade the spring to 2.5 then? It there any known issues if I upgrade the spring to 2.5 with appfuse 1.9.4? Thank you.

Re: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Matt Raible
I don't know of any upgrade issues - I'd suggest upgrading to 2.5.1 which was released last week. Matt On Jan 22, 2008, at 2:24 PM, Ding, Qin wrote: Matt, Yes, I tried. I pasted the code in. It won’t compile due to the fact getRequest method is not visible. I am using appfuse 1.9.4. and

RE: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Ding, Qin
Ok, I will do. Thank you very much. From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 22, 2008 3:32 PM To: [email protected] Subject: Re: [appfuse-user] Using User from appfuse in appz I don't know of any upgrade issues - I'd sugg

Re: [appfuse-user] Calling action method with parameters from JSP

2008-01-22 Thread sarat.pediredla
So would I use I tried it but doesnt seem to make a difference. Even tried mraible wrote: > > You'll need to use a Struts Tag (with OGNL) to call a method with > parameters. JSP's EL doesn't support calling methods with arguments. > > Matt > > On Jan 22, 2008, at 1:34 PM, sarat.

RE: [appfuse-user] Using User from appfuse in appz

2008-01-22 Thread Ding, Qin
Matt: I updated Spring to 2.5.1 to my appfuse 1.9.4. compile and test. Test web failed on LocaleFilterTest.java. It complains on filter.setFilterConfig(new MockFilterConfig()); about no "setFilterConfig". I checked the LocalFilter, which does not have setter for the filterconfig. So seems

Re: [appfuse-user] Calling action method with parameters from JSP

2008-01-22 Thread Rob Hills
Hi Sarat, sarat.pediredla wrote: So would I use I tried it but doesnt seem to make a difference. Even tried Not sure how much difference it makes, but when I've done this (successfully), I've done the following: - used the full name of the method (in your case, "getCommentCount"

[appfuse-user] Interceptor stack help

2008-01-22 Thread
Hi, I am using appfuse 2.0.1. I am trying to customise the interceptor stack in the struts.xml file. I don't seem to be getting anything out of my changes. Below is the interceptor stack I have modifed. Does it look reasonable? How can I get log of the interceptor stack activity? Or in what way c

Re: [appfuse-user] appfuse.tld

2008-01-22 Thread jithesh
How can i change the 'tlib-version 1.0' to 1.1 ? Where should i do the changes. I am using appfuse 1.9.x Thanks, Jithesh mraible wrote: > > If you're using AppFuse 1.9.x, this file is generated by XDoclet in > build.xml. Look for a tag called jsptaglib (or something like that). > > Matt