Hibernate/Spring

2009-11-13 Thread Chris Cranford
I have done a fair amount of reading today on the topic again and developed a few simple classes to support my service, model, and dao architecture for using Hibernate 3.3.2 and Spring 2 with Struts2. The problem I am currently facing is I get a detached error when deleting an object and I get a n

Re: Trouble with struts2 validation

2009-11-13 Thread Dave Newton
vikrant S wrote: Initially I did not check for null textfield and I was able to validate the username and password directly from database.but When I applied validate method in my action class It began to validate for null fields but not for stored username and password. I am pasting my code..

RE: How to get Login page while submitting a data form

2009-11-13 Thread Sanjaya Kumar Patel
> If a requires authentication, don't render it until the > user is logged in. > > If you are worried about the user's session timing out before > the form is submitted, implement some sort of javascript timer > that (after a period equal to a session timeout), pops up a > modal login form.

Struts Dojo Question

2009-11-13 Thread Thomas Sattler
Hello all. In working through some Dojo stuff, I have come to a roadblock, on which I hope someone will be able to shed some light. I have a page that displays a user's account info. If they press "update", Dojo pops up a dialog box which allows them to update their info. Opening a Dialog box i

Re: Validation and conversion conflict - best method?

2009-11-13 Thread ben_979
I have a related question, but it's a bit of a side-track as I try to solve my original problem. What is the naming convention and the difference between the two types of -validation.xml file naming? I think I understand that ActionClass-validation.xml is called for all (non-excluded) methods

RE: How to get Login page while submitting a data form

2009-11-13 Thread Kawczynski, David
If a requires authentication, don't render it until the user is logged in. If you are worried about the user's session timing out before the form is submitted, implement some sort of javascript timer that (after a period equal to a session timeout), pops up a modal login form. Successfully su

Re: Validation and conversion conflict - best method?

2009-11-13 Thread carl ballantyne
Hi Ben, I think I understand your problem. I am have a similar situation where I have a person class with a birthday. I ended up writing a Converter to handle the date (because I needed it in the format dd/mm/). I used the Person-conversion.properties to say that I want that converter

RE: How to get Login page while submitting a data form

2009-11-13 Thread Sanjaya Kumar Patel
Hi Pawel, Thanks for the insight. I would give a try. Being a common scenario, is there any existing work already present for this, so that I don't have to reinvent the wheel? I guess there should already be some established library / code sample which people follow. What do people normally do?

RE: html:link submit with request parameters

2009-11-13 Thread Kawczynski, David
Use javascript to get a reference to the form, and call its submit method. EG function submit() { document.getElementById("form").submit() return false; } click me > -Original Message- > From: fea jabi [mailto:zy...@hotmail.com] > Sent: Thursday, November 12, 20

Re: some love for the documentation

2009-11-13 Thread Musachy Barroso
wrong link: http://cwiki.apache.org/confluence/display/S2NewDocDraft/User+Guide On Fri, Nov 13, 2009 at 11:30 AM, Musachy Barroso wrote: > I created new space to work on the documentation, the guide main page is here: > > http://cwiki.apache.org/confluence/display/S2NewDocDraft/Guides > > I think

some love for the documentation

2009-11-13 Thread Musachy Barroso
I created new space to work on the documentation, the guide main page is here: http://cwiki.apache.org/confluence/display/S2NewDocDraft/Guides I think it is very important that we clean up the documentation, document missing parts, remove outdated stuff, the "version boxes", and the snippets as w

RE: Problem with tag

2009-11-13 Thread Martin Gainty
//Assuming we have this Action //A Simple Action Class which demonstrates placing information in a Map public class GetEntryAction extends ActionSupport { private ArrayList stats_list=new ArrayList(30); //a collection of stats private class stats { private ArrayList entries_list=

Re: Problem with tag

2009-11-13 Thread Oscar
Brian Thompson escribió: Try this: Calling without specifying a value will default to the top of the value stack which ought to be the current element in the list because you're inside the tag. -Brian On Fri, Nov 13, 2009 at 12:53 PM, Oscar wrote: Hi to all, i have a simple que

Re: Problem with tag

2009-11-13 Thread Brian Thompson
Try this: Calling without specifying a value will default to the top of the value stack which ought to be the current element in the list because you're inside the tag. -Brian On Fri, Nov 13, 2009 at 12:53 PM, Oscar wrote: > Hi to all, i have a simple question about tag. Let's say t

Re: Validation and conversion conflict - best method?

2009-11-13 Thread Siddiq Syed
One quick solution might be , which I am using but most of them may not agree with me, -- Delcare a string in the action which take the value enter in the text box. -- Add the validation in the validation.xml as a regular expression and can add as "requiredString" , if the filed is mandatory to e

Problem with tag

2009-11-13 Thread Oscar
Hi to all, i have a simple question about tag. Let's say that we have a property in our action of type List, but in that list i only store Strings. When i want to print the value of the list on the JSP i use this code snipped: But i don't know if that's right, because i don't know how

Validation and conversion conflict - best method?

2009-11-13 Thread ben_979
I have an object with a java.util.Date field. I present the object inside a form with the following tag: where detail.date is a date formatting pattern. The problem arises because after getText(), the field is populated with a String. When the String is submitted, I get an error because I don

Re: displaytag - Nothing found to display.

2009-11-13 Thread Kris Reid
Whoops - made I typo whilst I was mucking around. That's not the problem though Paul Benedict-2 wrote: > > You're attributes are wrong. Should be: > > > > > @name is the name of your request attribute. > @id is the request attribute created at each the iteration. > > Paul > > - ht

Re: displaytag - Nothing found to display.

2009-11-13 Thread Paul Benedict
You're attributes are wrong. Should be: @name is the name of your request attribute. @id is the request attribute created at each the iteration. Paul On Fri, Nov 13, 2009 at 10:21 AM, Kris Reid wrote: > > > > Oscar Calderón-2 wrote: >> >> >> Are you using ajax tags (like dojo ) or something

Re: displaytag - Nothing found to display.

2009-11-13 Thread Kris Reid
Oscar Calderón-2 wrote: > > > Are you using ajax tags (like dojo ) or something like that with > displaytag? > > > No - haven't got any ajax or anything fancy I seem to have found a work around In the action class I stick the List into the request object request.setAttribute("list", list)

Re: displaytag - Nothing found to display.

2009-11-13 Thread Oscar
Kris Reid escribió: The problem has something to do with the get method in the action class not being called. Any ideas why this would happen? If I hit refresh a time or two it works fine. - http://www.kremsoft.com Kremsoft - Software Development Are you using ajax tags (like dojo )

Re: displaytag - Nothing found to display.

2009-11-13 Thread Kris Reid
The problem has something to do with the get method in the action class not being called. Any ideas why this would happen? If I hit refresh a time or two it works fine. - http://www.kremsoft.com Kremsoft - Software Development -- View this message in context: http://old.nabble.com/disp

Re: Catching: Unable to instantiate Action

2009-11-13 Thread Greg Lindholm
I haven't been following this thread so if my answer doesn't help... sorry. I have configured a default Action setup to catch all unknown actions. The default-action-ref tag [1] sets the action to use when the requested action isn't found. Login I use a restricted interc

Re: How to get Login page while submitting a data form

2009-11-13 Thread Paweł Wielgus
Hi Sanjay, when intercepting action for the first time (no logged user), You can save submited data along with request uri and put it into session/database then after login (inside login action), check if these informations are present in sesion/database and forward to desired action with all the p

RE: Struts2 + Spring/Hibernate

2009-11-13 Thread CRANFORD, CHRIS
Hi Wild Oscar, thanks for your input. First, I agree my design needs work with respect to naming conventions and thank you for the suggestions. This was more of a very crude example of how I should be relating components in the Hibernate/Spring/Struts2 design pattern so I can grasp the concept

Re: Catching: Unable to instantiate Action

2009-11-13 Thread RogerV
Brian Thompson-5 wrote: > > I can only speculate, but it seems logical that the ClassNotFoundException > is being thrown from outside the purview of Struts, in Tomcat's > ClassLoaders > - thus the Struts exception mapping never enters into it. > Theres definitely something odd going on. With

How to get Login page while submitting a data form

2009-11-13 Thread Sanjaya Kumar Patel
Hi All, My requirement is this: 1. User fills a form and submits. 2. If he has not logged in, login form comes up. 3. after logging in, the data automatically gets submitted and next page comes. I am new to struts and unable to figure out the natural solution, even after a lot of googling. As

Re: Struts2 + Spring/Hibernate

2009-11-13 Thread Jozef Fiflik
Hi, I've just created similar skeleton couple of days ago. To let Spring generate your Service and DAO beans, you have to specify also the GenericService and GenericDAO in your applicationContext xml. You (can) set them as abstract and you have to specify the inheritance relationship between the

Re: Struts2 + Spring/Hibernate

2009-11-13 Thread wild_oscar
Seems fine with me. CRANFORD, CHRIS wrote: > > >class="com.company.app.struts2.actions.PersonAction"> > > > I don't see any advantage on creating Actions with Spring. It works fine without it and it seems unnecessary configuration. Perhaps someone else can point out clear advant