one-to-many persistence, ConstraintViolationException

2010-06-21 Thread Jake Vang
i am following the example at http://struts.apache.org/2.1.8.1/docs/struts-2-spring-2-jpa-ajax.html. in this example, a very simple persistence is given (of which i am thankful). but, what i am trying to do is slightly more complicated with persistence. i need to persist a one-to-many relationship.

Re: i need more documentation on applicationContext.xml

2010-06-21 Thread Jens Hadlich
Hi Jake, the simply tells Spring to put transactional advice on any class or method that has an @Transactional annotation on it. Regards, Jens Am 21.06.2010 18:16, schrieb Jake Vang: Stephen, i know it is a spring xml file. i can tell that with the element, they are defining a transaction

Re: unit test the service layer (aka data access layer)

2010-06-21 Thread Jake Vang
James, thank you! that second link at the spring site was precisely what i needed. i have one more question, my spring.xml file refers to a properties file, how do i annotate to make the reference work? On Mon, Jun 21, 2010 at 12:31 PM, James Cook wrote: > You would still have you build your own

RE: How to set a variable in session in the JSP

2010-06-21 Thread Mano Dasanayaka
Hi Kushan, You can access the session object using a jsp scriplet and set your required variables there. <% request.getSession().setAttribute("your_variable",obj) %> >From the Action class , you can get access to session either by implementing the ServletRequestAware Interface within your acti

Re: Jasper Report Problem in HTML format

2010-06-21 Thread Celinio Fernandes
Hi, I ran into the same problem a while ago. The JasperReports plugin works with a servlet to display the images. The attribute to add is imageServletUrl  : /servlets/image?image=  Of course you need to declare that servlet in your web.xml :     ImageServlet     net.sf.jasperreports.j2e

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
You would still have you build your own EntityManager, like if you were doing it for Tomcat eg. http://najfiles.blogspot.com/2010/01/jpa-cat-spring.html Then check out: http://static.springsource.org/spring/docs/2.5.x/reference/testing.html Particularly the bit where it talks about extending

Re: unit test the service layer (aka data access layer)

2010-06-21 Thread Jake Vang
james, would setting up the unit test in that way load up the service class as if it would in in the J2EE container? the reason why i asked is because in the tutorial, as far as i understand, they have wired in using Spring a transaction manager. that means in my service object, when i call updat

Re: Jasper Report Problem in HTML format

2010-06-21 Thread Amol Ghotankar
Yes it could be path issue, but the images point to the images folder in web content. No images are generated in my case as I have searched them everywhere. Where are the images generally kept when using jasper reports in html format using struts2. On Mon, Jun 21, 2010 at 5:55 PM, Rahul Mohan w

Re: i need more documentation on applicationContext.xml

2010-06-21 Thread Jake Vang
thanks Martin. that gives me a little more confidence. that takes a little mystery away from that XML file. by the way, do you know any books that discusses Struts 2 (the latest latest version 2.1.x)? i would purchase it in a heartbeat. On Mon, Jun 21, 2010 at 11:42 AM, Martin Gainty wrote: > a

Re: i need more documentation on applicationContext.xml

2010-06-21 Thread Jake Vang
Stephen, i know it is a spring xml file. i can tell that with the element, they are defining a transaction manager. however, what does do? to me, intuitively, it defines a transaction manager that will process by annotations. the tutorial that gives this applicationContext.xml shows us how to g

Re: Is CookiesAware read only?

2010-06-21 Thread Chris Pratt
Yes, CookiesAware is meant to inject the cookies, individually or the entire Map, into the action. It is effectively read-only. As far as I know the only way to add a cookie is to get the HttpServletResponse (using ServletResponseAware would be the suggested method) and adding it using ServletRes

RE: i need more documentation on applicationContext.xml

2010-06-21 Thread Martin Gainty
a listing of persistence-providers //notice the vendorAdapter changes for every vendor Toplink: vendorAdapter TransactionManager: ? Spring OpenJpa: TransactionMana

Is CookiesAware read only?

2010-06-21 Thread Rebecca Case
I'm wanting to be able to create a cookie if it doesn't exist yet and update it if the cookie is already existing. Is this possible using CookiesAware and the cookie interceptor or are these read only? I realize that this can be accomplished by using the request and response directly, but I wa

Re: struts 2 display tag problem

2010-06-21 Thread sukumar.viper
Hi Rakesh, I had the same problem but i fixed the bug copy and paste this under package in the struts.xml file

Re: i need more documentation on applicationContext.xml

2010-06-21 Thread Stephen Turner
On Mon, 21 Jun 2010 00:56:19 -0400, Jake Vang wrote: hi, i've been reading and studying http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html. i want to know what is actually going on in applicationContext.xml. for example, what do these two lines do? please explain or refer

RE: Struts timepicker

2010-06-21 Thread Martin Gainty
//in your html/jsp //notice this association of hourContainerNode to onSetSelectedHour event which needs to be disconnected so the onSetSelectedHour event does not fire //in your html/jsp //then change the bolded text found in this definition for isContainer //notice this assoc

RE: Struts timepicker

2010-06-21 Thread john . varghese
Good morning friendsIs there a way to achieve the below mentioned functionality? -Original Message- From: john.vargh...@smartonline.com Sent: Friday, June 18, 2010 2:28pm To: user@struts.apache.org Subject: Strust timepicker The current Struts dojo timepicker closes when the User

Re: Jasper Report Problem in HTML format

2010-06-21 Thread Rahul Mohan
Looks like its a path issue. Please see if the image tags in the generated HTML point to the proper URL for images. From: Amol Ghotankar To: Struts Users Mailing List Date: 21-06-2010 17:21 Subject: Re: Jasper Report Problem in HTML format Dear List members, My problem is still not reso

Problem in passing value to javascript function call onclick of

2010-06-21 Thread Dheeraj Singh
Hi All, My apology if this message is mailed to wrong forum. As per requirements, I am showing a list of vehicle makes on the page in table format. Every row has three buttons (Edit, Delete, Purge) along with make details. I have called javascript method setMakeCode(this.form, makeCode) on eac

Re: Jasper Report Problem in HTML format

2010-06-21 Thread Amol Ghotankar
Dear List members, My problem is still not resolved. I am not able to show jasper reports in html format in struts 2. The images that are generated in html format are missing. Please help me on it. Regards, Amol ghotankar On Sun, Jun 20, 2010 at 11:56 PM, Amol Ghotankar wrote: > As per my k

Re: Problem with iterator and images

2010-06-21 Thread Fabio Perfetti
Thanks Brian!! I resolved!! " width="50" /> Thanks a lot!! 2010/6/19 Brian Thompson > " /> > > Brian > > On Jun 19, 2010 5:01 AM, "Fabio Perfetti" wrote: > > Hi all, before to start, i want say sorry for my bad english. > I am developing an easy social network for a university projec

RE: Struts 2 creates a DIV tag

2010-06-21 Thread Martin Gainty
description of submit attributes: targets String Comma delimited list of ids of the elements whose content will be updated (usually div tags) set target attribute to null Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de

Struts 2 creates a DIV tag

2010-06-21 Thread Kushan Jayathilake
Hi Guys, i have noticed that button creates a DIV tag, i have disabled it creating a by specifying "struts.ui.theme=css_xhtml " in struts.properties file, but still i couldnt find a way to stop creating the DIV tag, can anyone help me on this...? -- Regards Kushan Jayathilake

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
Get involved with: Junit 4.4 Spring-test libs And started your service test class like such: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:/testConfigXML.xml") public class MyServiceImplTest extends AbstractJUnit4SpringContextTests { @Autowired(require