You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jue...@we...> - 2003-05-22 15:28:00
|
Besides having reworked the form controller's handling of resubmits, = I've also created an extensive test suite for ControllerServlet and some = web support classes. We're at overall >64% now! Additionally, I've refined some ApplicationContext stuff (moved = OPTIONS_BEAN_NAME from ApplicationContext to AbstractApplicationContext = etc), and cleaned the exception handling in the beans package (e.g. = rethrow BeansException directly when catching Exception instead of = wrapping it). Rethrown exceptions don't get logged anymore, as they are logged by the = highest level exception handler anyway (-> no double stack traces in the = console). I've also commented out the println(this) on printing a = rootCause stack trace: As a root stack trace will always get printed = after the exception's message, those lines have only added redundant = information, cluttering the console. I've removed FrameworkServlet's debug support, I don't see any real use = case for it. During development, Log4J's debug log is all you need, IMO = - you exactly see what handlers/mappings/etc get used, no need for = binding them to the request. I'm also gonna move the web.mock classes back to the test sources, as = they are pretty rough, and not really meant for usage within application = development - in constrast to the JNDI mocks, for example. I'll check my stuff in within the next 2 hours. Everybody, please test = the current framework version in your apps! We should really try to = release a 0.8 as stable as possible. BTW, what's the current status in terms of code beautification (Jalopy = etc)? We have mixed headers in our files at the moment, and sometimes = inconsistent formatting. Do we aim to clean this for 0.8? Juergen -----Original Message----- From: j=FCrgen h=F6ller [werk3AT]=20 Sent: Wednesday, May 21, 2003 11:16 AM To: spr...@li... Subject: RE: [Springframework-developer] Code changes for 0.8? I'd like to address our form controller's handling of resubmits and = invalid session state before - avoid hearing this over and over again = after releasing 0.8 ;-) This will definitely be finished at the end of = this week, including testing, so it shouldn't cause any delays. On the occasion, there is a major gap in the web test suite: We don't = have any tests for FrameworkServlet and ControllerServlet currently. I = got aware of this again yesterday when I've discovered that = LocaleResolver initialization was broken (already fixed). Although they = seem to work properly now, we should probably address respective tests = before an official 0.8 release. Otherwise, I agree that we mainly depend on docs and tutorial. But let's = avoid the urge for early perfectness and just release what we have, say, = next week! Juergen -----Original Message----- From: Rod Johnson [mailto:rod...@in...] Sent: Tuesday, May 20, 2003 11:06 PM To: spr...@li... Subject: [Springframework-developer] Code changes for 0.8? Guys, Anyone in the middle of any code changes right now? I'm done, besides any bug fixing required. I suggest we go for what I'd call a soft release. That is, we get a drop = out (after agreeing what goes in it...I know Juergen had some ideas), and = each of us tests it, ideally on new machines. This release will also help = some existing users who want the latest code but can't access CVS at work. = (Like me, if I forget my USB pen :-) Once we're happy it all works, the time we actually announce will depend = on the state of the documents. Regards, Rod ------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Isabelle M. <isa...@me...> - 2003-05-22 14:21:10
|
Hi Rod, I run a shell script (attached), I've stared myself blind at it and don't see anything wrong. The system classpath contains oracle adn mysql drivers. The only difference is the mockojbjects jars I refer to, because I'm using SDK 1.4. Could that be the problem? Isabelle On Thu, May 22, 2003 at 09:26:19AM -0400, rod...@in... wrote: > Isabelle, > > How do you actually run the live tests? I could see how to > build them in the ant script but not how to run them. > (Admittedly I only had 5 minutes before my train journey > finished :-) > > I would be surprised if there's a problem with the AOP jar. > > Regards, > Rod > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com |
|
From: <rod...@in...> - 2003-05-22 13:26:43
|
Isabelle, How do you actually run the live tests? I could see how to build them in the ant script but not how to run them. (Admittedly I only had 5 minutes before my train journey finished :-) I would be surprised if there's a problem with the AOP jar. Regards, Rod |
|
From: Isabelle M. <isa...@me...> - 2003-05-22 12:42:07
|
thanks dmitryi, i'll have to try and figure out what's wrong on my local system then. isabelle On Thu, May 22, 2003 at 08:22:19AM -0400, Kopylenko, Dmitry wrote: > All tests passed on my system. > > D. > > -----Original Message----- > From: Isabelle Muszynski [mailto:isa...@me...] > Sent: Thursday, May 22, 2003 03:25 AM > To: Rod Johnson > Cc: spr...@li... > Subject: Re: [Springframework-developer] SqlUpdate and insert > functionality > > > Hi Rod, Jean-Pierre > > It can't be that, I did a clean checkout myself. Can you run the livetests? > > Isabelle > > On Wed, May 21, 2003 at 10:16:57PM +0100, Rod Johnson wrote: > > Isabelle, > > > > I'm puzzled by this. I've done a clean checkout and everything works for > me. > > The AOPAlliance sources are in synch with Spring. The aopalliance.jar file > > has moved to its own directory: is your old one still in the parent > > directory? > > > > Regards, > > Rod > > > > ----- Original Message ----- > > From: "Isabelle Muszynski" <isa...@me...> > > To: <spr...@li...> > > Sent: Wednesday, May 21, 2003 1:29 PM > > Subject: [Springframework-developer] SqlUpdate and insert functionality > > > > > > > Hi everyone, > > > > > > I've checked in a new version of SqlUpdate with insert functionality > (see > > the update methods with a KeyBinder argument). > > > > > > I cannot run any tests though, there seems to be a problem with AOP > code. > > setDataSource in jdbcTemplate gives a NoClassDefFoundError on > > org.aopalliance.interceptor. > > > > > > I've made a clean checkout of the sources from CVS into a new directory > > and the problem remains. So there seems to be something wrong with the AOP > > jars. > > > > > > By the way I've also moved the livetest source files into the correct > > directory structure for their package. > > > > > > Isabelle > > > > > > -- > > > Isabelle Muszynski > > > Software Engineer > > > Zandweellaan 4 > > > 2660 Antwerpen > > > Belgium > > > Tel. 32-(0)3-830 18 54 > > > Mobile: 32-(0)485 49 50 89 > > > Email: isa...@me... > > > Website: www.meta-logix.com > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: ObjectStore. > > > If flattening out C++ or Java code to make your application fit in a > > > relational database is painful, don't do it! Check out ObjectStore. > > > Now part of Progress Software. http://www.objectstore.net/sourceforge > > > _______________________________________________ > > > Springframework-developer mailing list > > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > -- > Isabelle Muszynski > Software Engineer > Zandweellaan 4 > 2660 Antwerpen > Belgium > Tel. 32-(0)3-830 18 54 > Mobile: 32-(0)485 49 50 89 > Email: isa...@me... > Website: www.meta-logix.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com |
|
From: Kopylenko, D. <dko...@ac...> - 2003-05-22 12:32:21
|
All tests passed on my system. D. -----Original Message----- From: Isabelle Muszynski [mailto:isa...@me...] Sent: Thursday, May 22, 2003 03:25 AM To: Rod Johnson Cc: spr...@li... Subject: Re: [Springframework-developer] SqlUpdate and insert functionality Hi Rod, Jean-Pierre It can't be that, I did a clean checkout myself. Can you run the livetests? Isabelle On Wed, May 21, 2003 at 10:16:57PM +0100, Rod Johnson wrote: > Isabelle, > > I'm puzzled by this. I've done a clean checkout and everything works for me. > The AOPAlliance sources are in synch with Spring. The aopalliance.jar file > has moved to its own directory: is your old one still in the parent > directory? > > Regards, > Rod > > ----- Original Message ----- > From: "Isabelle Muszynski" <isa...@me...> > To: <spr...@li...> > Sent: Wednesday, May 21, 2003 1:29 PM > Subject: [Springframework-developer] SqlUpdate and insert functionality > > > > Hi everyone, > > > > I've checked in a new version of SqlUpdate with insert functionality (see > the update methods with a KeyBinder argument). > > > > I cannot run any tests though, there seems to be a problem with AOP code. > setDataSource in jdbcTemplate gives a NoClassDefFoundError on > org.aopalliance.interceptor. > > > > I've made a clean checkout of the sources from CVS into a new directory > and the problem remains. So there seems to be something wrong with the AOP > jars. > > > > By the way I've also moved the livetest source files into the correct > directory structure for their package. > > > > Isabelle > > > > -- > > Isabelle Muszynski > > Software Engineer > > Zandweellaan 4 > > 2660 Antwerpen > > Belgium > > Tel. 32-(0)3-830 18 54 > > Mobile: 32-(0)485 49 50 89 > > Email: isa...@me... > > Website: www.meta-logix.com > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: ObjectStore. > > If flattening out C++ or Java code to make your application fit in a > > relational database is painful, don't do it! Check out ObjectStore. > > Now part of Progress Software. http://www.objectstore.net/sourceforge > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com ------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2003-05-22 10:50:25
|
Ken,
You're right about the back-and-resubmit-valid-form case. I've changed =
the default implementation of handleInvalidSubmit to fetch a new backing =
object and resubmit, instead of showing a new form. So you don't need to =
override handleInvalidSubmit in your case to get the desired behavior.
Note that duplicate submissions are now possible with the default =
behavior. If you want to forbid them, you need to explicitly override =
handleInvalidSubmit and either show a "invalid submit" message or =
redirect to a new form. Only then will the form object in the session =
serve as transaction token.
I hope this is now as intuitive as possible (it's also documented in =
JavaDoc). What do you think?
BTW, I'm gonna check the change in this afternoon, together with some =
polishing, and full tests for ControllerServlet and co.
Regards,
Juergen
-----Original Message-----
From: Ken Krebs [mailto:kk...@kk...]
Sent: Thursday, May 22, 2003 12:00 AM
To: j=FCrgen h=F6ller [werk3AT]
Cc: spring-dev-list
Subject: [Springframework-developer] MVC Forms
Hi Juergen,
Thanks for your changes, but there is something I still have a question=20
about.
NOTE: In the following, I have removed my IsFormSubmission override and=20
set bindOnNewForm=3Dtrue.
Consider the scenario in petclinic where a user submits some changes to=20
an owner's info. The owner page is then displayed with the changes and=20
the user notices that a change was forgotten. The user then uses the=20
Back button to go back to the "change owner info" page, makes another=20
change, and sumits the form. I expected that the change will be=20
validated and submitted and the owner page with the new info would then=20
be displayed. What happens is that=20
AbstractFormController.handleRequestInternal calls handleInvalidSubmit=20
as expected when it can't find the formObject but it then returns=20
without processing the validate/submit logic. The user must then submit=20
the new change a second time to actually get it submitted.
To make it work the way I intended, I must override handleInvalidSubmit=20
and in it call showNewForm to rebind the data to the formObject, ignore=20
it's returned ModelandView, and then process a duplicate of=20
AbstractFormController's validate/submit logic. The complete code is=20
shown below.
Is this the way you intended it to work and if so, why ?
Best Regards,
Ken
/*
* OwnerInfoForm.java
*
* Created on May 9, 2003, 9:53 AM
*/
package petclinic.web;
import petclinic.Clinic;
import petclinic.Owner;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletException;
import com.interface21.validation.BindException;
import com.interface21.web.servlet.ModelAndView;
import com.interface21.web.servlet.mvc.SimpleFormController;
import com.interface21.web.bind.ServletRequestDataBinder;
import com.interface21.context.ApplicationContextException;
/**
*
* @author Ken Krebs
*/
public class OwnerInfoForm extends SimpleFormController {
=20
/** Holds value of property clinic. */
private Clinic clinic;
=20
/** Creates a new instance of OwnerInfoForm */
public OwnerInfoForm() {
}
=20
/** Setter for property clinic.
* @param clinic New value of property plinic.
*/
public void setClinic(Clinic clinic) {
this.clinic =3D clinic;
}
=20
protected void init() throws ApplicationContextException {
if(clinic =3D=3D null)
throw new ApplicationContextException("Must set clinic bean=20
property on " + getClass());
}
=20
protected ModelAndView onSubmit(Object command) throws=20
ServletException {
Owner owner =3D (Owner) command;
// add stuff to test if adding new or updating existing owner
clinic.update(owner);
return new ModelAndView(getSuccessView(), "owner", owner);
}
=20
protected Object formBackingObject(HttpServletRequest request)=20
throws ServletException {
int ownerId =3D 0;
try {
ownerId =3D =
Integer.parseInt(request.getParameter("ownerId"));
} catch(NumberFormatException e) {/*OK to trap & ignore*/}
Owner owner =3D clinic.getOwner(ownerId);
return (owner !=3D null) ? owner : new Owner();
}
protected ModelAndView handleInvalidSubmit(HttpServletRequest=20
request, HttpServletResponse response)
throws ServletException, IOException {
showNewForm(request, response);
// process submit
Object command =3D userObject(request);
ServletRequestDataBinder errors =3D bindAndValidate(request, =
command);
return processSubmit(request, response, command, errors);
}
=20
}
j=FCrgen h=F6ller [werk3AT] wrote:
>Ken,
>
>I've further refined invalid submission handling. An invalid submit =
request in session form mode (i.e. when no form object is in the =
session) triggers AbstractFormController's handleInvalidSubmit method. =
The latter's default implementation simply shows a new form, binding the =
submitted values to the new form in case of "bindOnNewForm=3Dtrue". But =
handleInvalidSubmit can be overridden now, to show an "invalid resubmit" =
error message or redirect to some other view.
>
>Regarding transaction tokens: In session mode, form objects can serve =
as transaction tokens. If a user presses the browser's reload button, he =
either sees a new form or some custom error message (as determined by =
the handleInvalidSubmit implementation). Thus, if you need to forbid =
duplicate submissions for a certain form, switch its controller into =
session form mode in any case (even if you wouldn't need to keep the =
form object in the session otherwise).
>
>Thus, we don't really need dedicated transaction token support - just =
leverage AbstractFormController's invalid submission handling in session =
form mode. A dedicated token attribute in the session would only be =
necessary if there isn't any form object involved. Do you see a use case =
for forbidding duplicate submissions without a form?
>
>Struts has programmatic token support: You can manually add it to a =
session/request in an Action implementation when showing the form, and =
manually check its validity on submit. The html:form tag automatically =
adds a respective hidden field. I don't see actual value in this, =
though, beyond what proper session form handling already provides. BTW, =
transaction tokens aren't even mentioned in the Struts User Guide.
>
>Regards,
>Juergen
>
>
>-----Original Message-----
>From: Ken Krebs [mailto:kk...@kk...]
>Sent: Tuesday, May 20, 2003 7:21 PM
>To: j=FCrgen h=F6ller [werk3AT]
>Cc: 'spring-dev-list'
>Subject: Re: [Springframework-developer] MVC Forms
>
>
>Juergen,
>
>I haven't had a chance to look at them but your changes for the Back=20
>button problems, including some way of forbidding duplicate submission=20
>(hopefully possible through configuration of the form bean), sound like =
>they will help provide what's needed and are a real plus for =
developers.=20
>I will try to point this out in the accompanying tutorial text.
>
>As for AbstractFormController and SimpleFormController seeming=20
>restrictive, this was probably just a perception I got as I tried to=20
>solve the Back button issue. My own AbstractSearchFormController=20
>subclass of SimpleFormController shows that it is not restrictive on=20
>submission. I was concerned about how to handle things going wrong =
prior=20
>to submission (see next paragraph).
>
>There is another class of MVC problem not necessarily just with forms,=20
>and that is when the user directly enters a mapped url to a Controller, =
>and the Controller expects to see parameters that aren't there. An=20
>example of my own handling of this in petclinic is in the method=20
>ClinicController.ownerHandler. In this case, it's makes sense to just=20
>redirect the user to the FindOwnerForm as I've done. I was planning on=20
>handling this situation for the OwnerInfoForm by making the form=20
>dynamically show a "Update Owner Info" button if the preconfigured=20
>object can be provided or a "Add Owner" button if there is no=20
>preconfigured object, but redirection may be desirable in some=20
>situations. What do you think ?
>
> From the viewpoint of an organization considering adopting Spring, the =
>fact that Spring addresses these problems directly without individual=20
>developers having to craft their own adhoc solutions should be seen as =
a=20
>plus.
>
>Ken
>
>
> =20
>
|
|
From: Isabelle M. <isa...@me...> - 2003-05-22 07:25:29
|
Hi Rod, Jean-Pierre It can't be that, I did a clean checkout myself. Can you run the livetests? Isabelle On Wed, May 21, 2003 at 10:16:57PM +0100, Rod Johnson wrote: > Isabelle, > > I'm puzzled by this. I've done a clean checkout and everything works for me. > The AOPAlliance sources are in synch with Spring. The aopalliance.jar file > has moved to its own directory: is your old one still in the parent > directory? > > Regards, > Rod > > ----- Original Message ----- > From: "Isabelle Muszynski" <isa...@me...> > To: <spr...@li...> > Sent: Wednesday, May 21, 2003 1:29 PM > Subject: [Springframework-developer] SqlUpdate and insert functionality > > > > Hi everyone, > > > > I've checked in a new version of SqlUpdate with insert functionality (see > the update methods with a KeyBinder argument). > > > > I cannot run any tests though, there seems to be a problem with AOP code. > setDataSource in jdbcTemplate gives a NoClassDefFoundError on > org.aopalliance.interceptor. > > > > I've made a clean checkout of the sources from CVS into a new directory > and the problem remains. So there seems to be something wrong with the AOP > jars. > > > > By the way I've also moved the livetest source files into the correct > directory structure for their package. > > > > Isabelle > > > > -- > > Isabelle Muszynski > > Software Engineer > > Zandweellaan 4 > > 2660 Antwerpen > > Belgium > > Tel. 32-(0)3-830 18 54 > > Mobile: 32-(0)485 49 50 89 > > Email: isa...@me... > > Website: www.meta-logix.com > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: ObjectStore. > > If flattening out C++ or Java code to make your application fit in a > > relational database is painful, don't do it! Check out ObjectStore. > > Now part of Progress Software. http://www.objectstore.net/sourceforge > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com |
|
From: Ken K. <kk...@kk...> - 2003-05-21 22:05:52
|
Hi Juergen,
Thanks for your changes, but there is something I still have a question
about.
NOTE: In the following, I have removed my IsFormSubmission override and
set bindOnNewForm=true.
Consider the scenario in petclinic where a user submits some changes to
an owner's info. The owner page is then displayed with the changes and
the user notices that a change was forgotten. The user then uses the
Back button to go back to the "change owner info" page, makes another
change, and sumits the form. I expected that the change will be
validated and submitted and the owner page with the new info would then
be displayed. What happens is that
AbstractFormController.handleRequestInternal calls handleInvalidSubmit
as expected when it can't find the formObject but it then returns
without processing the validate/submit logic. The user must then submit
the new change a second time to actually get it submitted.
To make it work the way I intended, I must override handleInvalidSubmit
and in it call showNewForm to rebind the data to the formObject, ignore
it's returned ModelandView, and then process a duplicate of
AbstractFormController's validate/submit logic. The complete code is
shown below.
Is this the way you intended it to work and if so, why ?
Best Regards,
Ken
/*
* OwnerInfoForm.java
*
* Created on May 9, 2003, 9:53 AM
*/
package petclinic.web;
import petclinic.Clinic;
import petclinic.Owner;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletException;
import com.interface21.validation.BindException;
import com.interface21.web.servlet.ModelAndView;
import com.interface21.web.servlet.mvc.SimpleFormController;
import com.interface21.web.bind.ServletRequestDataBinder;
import com.interface21.context.ApplicationContextException;
/**
*
* @author Ken Krebs
*/
public class OwnerInfoForm extends SimpleFormController {
/** Holds value of property clinic. */
private Clinic clinic;
/** Creates a new instance of OwnerInfoForm */
public OwnerInfoForm() {
}
/** Setter for property clinic.
* @param clinic New value of property plinic.
*/
public void setClinic(Clinic clinic) {
this.clinic = clinic;
}
protected void init() throws ApplicationContextException {
if(clinic == null)
throw new ApplicationContextException("Must set clinic bean
property on " + getClass());
}
protected ModelAndView onSubmit(Object command) throws
ServletException {
Owner owner = (Owner) command;
// add stuff to test if adding new or updating existing owner
clinic.update(owner);
return new ModelAndView(getSuccessView(), "owner", owner);
}
protected Object formBackingObject(HttpServletRequest request)
throws ServletException {
int ownerId = 0;
try {
ownerId = Integer.parseInt(request.getParameter("ownerId"));
} catch(NumberFormatException e) {/*OK to trap & ignore*/}
Owner owner = clinic.getOwner(ownerId);
return (owner != null) ? owner : new Owner();
}
protected ModelAndView handleInvalidSubmit(HttpServletRequest
request, HttpServletResponse response)
throws ServletException, IOException {
showNewForm(request, response);
// process submit
Object command = userObject(request);
ServletRequestDataBinder errors = bindAndValidate(request, command);
return processSubmit(request, response, command, errors);
}
}
jürgen höller [werk3AT] wrote:
>Ken,
>
>I've further refined invalid submission handling. An invalid submit request in session form mode (i.e. when no form object is in the session) triggers AbstractFormController's handleInvalidSubmit method. The latter's default implementation simply shows a new form, binding the submitted values to the new form in case of "bindOnNewForm=true". But handleInvalidSubmit can be overridden now, to show an "invalid resubmit" error message or redirect to some other view.
>
>Regarding transaction tokens: In session mode, form objects can serve as transaction tokens. If a user presses the browser's reload button, he either sees a new form or some custom error message (as determined by the handleInvalidSubmit implementation). Thus, if you need to forbid duplicate submissions for a certain form, switch its controller into session form mode in any case (even if you wouldn't need to keep the form object in the session otherwise).
>
>Thus, we don't really need dedicated transaction token support - just leverage AbstractFormController's invalid submission handling in session form mode. A dedicated token attribute in the session would only be necessary if there isn't any form object involved. Do you see a use case for forbidding duplicate submissions without a form?
>
>Struts has programmatic token support: You can manually add it to a session/request in an Action implementation when showing the form, and manually check its validity on submit. The html:form tag automatically adds a respective hidden field. I don't see actual value in this, though, beyond what proper session form handling already provides. BTW, transaction tokens aren't even mentioned in the Struts User Guide.
>
>Regards,
>Juergen
>
>
>-----Original Message-----
>From: Ken Krebs [mailto:kk...@kk...]
>Sent: Tuesday, May 20, 2003 7:21 PM
>To: jürgen höller [werk3AT]
>Cc: 'spring-dev-list'
>Subject: Re: [Springframework-developer] MVC Forms
>
>
>Juergen,
>
>I haven't had a chance to look at them but your changes for the Back
>button problems, including some way of forbidding duplicate submission
>(hopefully possible through configuration of the form bean), sound like
>they will help provide what's needed and are a real plus for developers.
>I will try to point this out in the accompanying tutorial text.
>
>As for AbstractFormController and SimpleFormController seeming
>restrictive, this was probably just a perception I got as I tried to
>solve the Back button issue. My own AbstractSearchFormController
>subclass of SimpleFormController shows that it is not restrictive on
>submission. I was concerned about how to handle things going wrong prior
>to submission (see next paragraph).
>
>There is another class of MVC problem not necessarily just with forms,
>and that is when the user directly enters a mapped url to a Controller,
>and the Controller expects to see parameters that aren't there. An
>example of my own handling of this in petclinic is in the method
>ClinicController.ownerHandler. In this case, it's makes sense to just
>redirect the user to the FindOwnerForm as I've done. I was planning on
>handling this situation for the OwnerInfoForm by making the form
>dynamically show a "Update Owner Info" button if the preconfigured
>object can be provided or a "Add Owner" button if there is no
>preconfigured object, but redirection may be desirable in some
>situations. What do you think ?
>
> From the viewpoint of an organization considering adopting Spring, the
>fact that Spring addresses these problems directly without individual
>developers having to craft their own adhoc solutions should be seen as a
>plus.
>
>Ken
>
>
>
>
|
|
From: JP P. <jp....@ti...> - 2003-05-21 21:55:16
|
If it is about the testSuites, all pass on my machine. Regards, Jean-Pierre > -----Message d'origine----- > De=A0: spr...@li... > [mailto:spr...@li...] De la part > de Rod Johnson > Envoy=E9=A0: mercredi 21 mai 2003 23:17 > =C0=A0: Isabelle Muszynski; spr...@li... > Objet=A0: Re: [Springframework-developer] SqlUpdate and insert functionality >=20 > Isabelle, >=20 > I'm puzzled by this. I've done a clean checkout and everything works for > me. > The AOPAlliance sources are in synch with Spring. The aopalliance.jar file > has moved to its own directory: is your old one still in the parent > directory? >=20 > Regards, > Rod >=20 > ----- Original Message ----- > From: "Isabelle Muszynski" <isa...@me...> > To: <spr...@li...> > Sent: Wednesday, May 21, 2003 1:29 PM > Subject: [Springframework-developer] SqlUpdate and insert functionality >=20 >=20 > > Hi everyone, > > > > I've checked in a new version of SqlUpdate with insert functionality > (see > the update methods with a KeyBinder argument). > > > > I cannot run any tests though, there seems to be a problem with AOP > code. > setDataSource in jdbcTemplate gives a NoClassDefFoundError on > org.aopalliance.interceptor. > > > > I've made a clean checkout of the sources from CVS into a new directory > and the problem remains. So there seems to be something wrong with the AOP > jars. > > > > By the way I've also moved the livetest source files into the correct > directory structure for their package. > > > > Isabelle > > > > -- > > Isabelle Muszynski > > Software Engineer > > Zandweellaan 4 > > 2660 Antwerpen > > Belgium > > Tel. 32-(0)3-830 18 54 > > Mobile: 32-(0)485 49 50 89 > > Email: isa...@me... > > Website: www.meta-logix.com > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: ObjectStore. > > If flattening out C++ or Java code to make your application fit in a > > relational database is painful, don't do it! Check out ObjectStore. > > Now part of Progress Software. http://www.objectstore.net/sourceforge > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Rod J. <rod...@in...> - 2003-05-21 21:20:10
|
Isabelle, I'm puzzled by this. I've done a clean checkout and everything works for me. The AOPAlliance sources are in synch with Spring. The aopalliance.jar file has moved to its own directory: is your old one still in the parent directory? Regards, Rod ----- Original Message ----- From: "Isabelle Muszynski" <isa...@me...> To: <spr...@li...> Sent: Wednesday, May 21, 2003 1:29 PM Subject: [Springframework-developer] SqlUpdate and insert functionality > Hi everyone, > > I've checked in a new version of SqlUpdate with insert functionality (see the update methods with a KeyBinder argument). > > I cannot run any tests though, there seems to be a problem with AOP code. setDataSource in jdbcTemplate gives a NoClassDefFoundError on org.aopalliance.interceptor. > > I've made a clean checkout of the sources from CVS into a new directory and the problem remains. So there seems to be something wrong with the AOP jars. > > By the way I've also moved the livetest source files into the correct directory structure for their package. > > Isabelle > > -- > Isabelle Muszynski > Software Engineer > Zandweellaan 4 > 2660 Antwerpen > Belgium > Tel. 32-(0)3-830 18 54 > Mobile: 32-(0)485 49 50 89 > Email: isa...@me... > Website: www.meta-logix.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: JP P. <jp....@ti...> - 2003-05-21 18:23:51
|
Hello, I have now refactorized a little in the package jdbc.core.support. For the OracleSequenceMaxValueIncrementer class, I have fixed the case of the sequence returning the initial value. But I have commented with TODO instruction the code searching the initial value from the sequence in the method initPrepare(). Could anyone having an Oracle instance outcomment this code and test it and if Ok, validate the change? I am working on an extension of the class com.interface21.util.PagedListHolder and plan to do it in the week-end. But if the release is out before I finish, it can as well be included in the 0.9.=20 Regards, Jean-Pierre > -----Message d'origine----- > De=A0: spr...@li... > [mailto:spr...@li...] De la part > de Rod Johnson > Envoy=E9=A0: mardi 20 mai 2003 23:06 > =C0=A0: spr...@li... > Objet=A0: [Springframework-developer] Code changes for 0.8? >=20 > Guys, >=20 > Anyone in the middle of any code changes right now? >=20 > I'm done, besides any bug fixing required. >=20 > I suggest we go for what I'd call a soft release. That is, we get a drop > out > (after agreeing what goes in it...I know Juergen had some ideas), and each > of us tests it, ideally on new machines. This release will also help some > existing users who want the latest code but can't access CVS at work. > (Like > me, if I forget my USB pen :-) >=20 > Once we're happy it all works, the time we actually announce will depend > on > the state of the documents. >=20 > Regards, > Rod >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <tri...@tr...> - 2003-05-21 16:15:50
|
I don't have anything additional for 0.8. I'm working on code to return resultsets from a stored procedure for the 0.9 release. --Thomas > Guys, > > Anyone in the middle of any code changes right now? > > I'm done, besides any bug fixing required. > > I suggest we go for what I'd call a soft release. That is, we get a drop out > (after agreeing what goes in it...I know Juergen had some ideas), and each > of us tests it, ideally on new machines. This release will also help some > existing users who want the latest code but can't access CVS at work. (Like > me, if I forget my USB pen :-) > > Once we're happy it all works, the time we actually announce will depend on > the state of the documents. > > Regards, > Rod > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Isabelle M. <isa...@me...> - 2003-05-21 12:29:54
|
Hi everyone, I've checked in a new version of SqlUpdate with insert functionality (see the update methods with a KeyBinder argument). I cannot run any tests though, there seems to be a problem with AOP code. setDataSource in jdbcTemplate gives a NoClassDefFoundError on org.aopalliance.interceptor. I've made a clean checkout of the sources from CVS into a new directory and the problem remains. So there seems to be something wrong with the AOP jars. By the way I've also moved the livetest source files into the correct directory structure for their package. Isabelle -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com |
|
From: Isabelle M. <isa...@me...> - 2003-05-21 10:32:45
|
Hi Rod, Actually, yes, I'm in the middle of putting the insert stuff into SqlUpdate. Will commit and let everyone know once I've tested it. I'll do my best to get it done today. Isabelle On Tue, May 20, 2003 at 10:05:46PM +0100, Rod Johnson wrote: > Guys, > > Anyone in the middle of any code changes right now? > > I'm done, besides any bug fixing required. > > I suggest we go for what I'd call a soft release. That is, we get a drop out > (after agreeing what goes in it...I know Juergen had some ideas), and each > of us tests it, ideally on new machines. This release will also help some > existing users who want the latest code but can't access CVS at work. (Like > me, if I forget my USB pen :-) > > Once we're happy it all works, the time we actually announce will depend on > the state of the documents. > > Regards, > Rod > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com |
|
From: <jue...@we...> - 2003-05-21 10:04:08
|
Ken, I've further refined invalid submission handling. An invalid submit = request in session form mode (i.e. when no form object is in the = session) triggers AbstractFormController's handleInvalidSubmit method. = The latter's default implementation simply shows a new form, binding the = submitted values to the new form in case of "bindOnNewForm=3Dtrue". But = handleInvalidSubmit can be overridden now, to show an "invalid resubmit" = error message or redirect to some other view. Regarding transaction tokens: In session mode, form objects can serve as = transaction tokens. If a user presses the browser's reload button, he = either sees a new form or some custom error message (as determined by = the handleInvalidSubmit implementation). Thus, if you need to forbid = duplicate submissions for a certain form, switch its controller into = session form mode in any case (even if you wouldn't need to keep the = form object in the session otherwise). Thus, we don't really need dedicated transaction token support - just = leverage AbstractFormController's invalid submission handling in session = form mode. A dedicated token attribute in the session would only be = necessary if there isn't any form object involved. Do you see a use case = for forbidding duplicate submissions without a form? Struts has programmatic token support: You can manually add it to a = session/request in an Action implementation when showing the form, and = manually check its validity on submit. The html:form tag automatically = adds a respective hidden field. I don't see actual value in this, = though, beyond what proper session form handling already provides. BTW, = transaction tokens aren't even mentioned in the Struts User Guide. Regards, Juergen -----Original Message----- From: Ken Krebs [mailto:kk...@kk...] Sent: Tuesday, May 20, 2003 7:21 PM To: j=FCrgen h=F6ller [werk3AT] Cc: 'spring-dev-list' Subject: Re: [Springframework-developer] MVC Forms Juergen, I haven't had a chance to look at them but your changes for the Back=20 button problems, including some way of forbidding duplicate submission=20 (hopefully possible through configuration of the form bean), sound like=20 they will help provide what's needed and are a real plus for developers. = I will try to point this out in the accompanying tutorial text. As for AbstractFormController and SimpleFormController seeming=20 restrictive, this was probably just a perception I got as I tried to=20 solve the Back button issue. My own AbstractSearchFormController=20 subclass of SimpleFormController shows that it is not restrictive on=20 submission. I was concerned about how to handle things going wrong prior = to submission (see next paragraph). There is another class of MVC problem not necessarily just with forms,=20 and that is when the user directly enters a mapped url to a Controller,=20 and the Controller expects to see parameters that aren't there. An=20 example of my own handling of this in petclinic is in the method=20 ClinicController.ownerHandler. In this case, it's makes sense to just=20 redirect the user to the FindOwnerForm as I've done. I was planning on=20 handling this situation for the OwnerInfoForm by making the form=20 dynamically show a "Update Owner Info" button if the preconfigured=20 object can be provided or a "Add Owner" button if there is no=20 preconfigured object, but redirection may be desirable in some=20 situations. What do you think ? From the viewpoint of an organization considering adopting Spring, the=20 fact that Spring addresses these problems directly without individual=20 developers having to craft their own adhoc solutions should be seen as a = plus. Ken |
|
From: <jue...@we...> - 2003-05-21 09:14:22
|
I'd like to address our form controller's handling of resubmits and = invalid session state before - avoid hearing this over and over again = after releasing 0.8 ;-) This will definitely be finished at the end of = this week, including testing, so it shouldn't cause any delays. On the occasion, there is a major gap in the web test suite: We don't = have any tests for FrameworkServlet and ControllerServlet currently. I = got aware of this again yesterday when I've discovered that = LocaleResolver initialization was broken (already fixed). Although they = seem to work properly now, we should probably address respective tests = before an official 0.8 release. Otherwise, I agree that we mainly depend on docs and tutorial. But let's = avoid the urge for early perfectness and just release what we have, say, = next week! Juergen -----Original Message----- From: Rod Johnson [mailto:rod...@in...] Sent: Tuesday, May 20, 2003 11:06 PM To: spr...@li... Subject: [Springframework-developer] Code changes for 0.8? Guys, Anyone in the middle of any code changes right now? I'm done, besides any bug fixing required. I suggest we go for what I'd call a soft release. That is, we get a drop = out (after agreeing what goes in it...I know Juergen had some ideas), and = each of us tests it, ideally on new machines. This release will also help = some existing users who want the latest code but can't access CVS at work. = (Like me, if I forget my USB pen :-) Once we're happy it all works, the time we actually announce will depend = on the state of the documents. Regards, Rod ------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Rod J. <rod...@in...> - 2003-05-20 21:10:30
|
Guys, Anyone in the middle of any code changes right now? I'm done, besides any bug fixing required. I suggest we go for what I'd call a soft release. That is, we get a drop out (after agreeing what goes in it...I know Juergen had some ideas), and each of us tests it, ideally on new machines. This release will also help some existing users who want the latest code but can't access CVS at work. (Like me, if I forget my USB pen :-) Once we're happy it all works, the time we actually announce will depend on the state of the documents. Regards, Rod |
|
From: Ken K. <kk...@kk...> - 2003-05-20 17:26:28
|
Juergen, I haven't had a chance to look at them but your changes for the Back button problems, including some way of forbidding duplicate submission (hopefully possible through configuration of the form bean), sound like they will help provide what's needed and are a real plus for developers. I will try to point this out in the accompanying tutorial text. As for AbstractFormController and SimpleFormController seeming restrictive, this was probably just a perception I got as I tried to solve the Back button issue. My own AbstractSearchFormController subclass of SimpleFormController shows that it is not restrictive on submission. I was concerned about how to handle things going wrong prior to submission (see next paragraph). There is another class of MVC problem not necessarily just with forms, and that is when the user directly enters a mapped url to a Controller, and the Controller expects to see parameters that aren't there. An example of my own handling of this in petclinic is in the method ClinicController.ownerHandler. In this case, it's makes sense to just redirect the user to the FindOwnerForm as I've done. I was planning on handling this situation for the OwnerInfoForm by making the form dynamically show a "Update Owner Info" button if the preconfigured object can be provided or a "Add Owner" button if there is no preconfigured object, but redirection may be desirable in some situations. What do you think ? From the viewpoint of an organization considering adopting Spring, the fact that Spring addresses these problems directly without individual developers having to craft their own adhoc solutions should be seen as a plus. Ken jürgen höller [werk3AT] wrote: >Hi Ken, > >Hmmm, those naughty back button problems ;-) > >Anyway, you're right that going back and resubmitting the form currently results in a "Form object not found" message when using session form mode (in non-session mode it would work of course). This isn't particularly nice, so I've just added a corresponding check to AbstractFormController's handleRequestInternal. A request without a form session attribute is now always treated as new form when in session form mode. > >To avoid the silent ignoring of a user's changes in this case, I've added a general new feature: a "bindOnNewForm" property. If this is true -setBindOnNewForm(true) or a bean factory parameter -, the parameters of a request that leads to a new form get bound to the form object too. This can be used to prepopulate a new form via the calling URL, but it also keeps the user's changes in the back-and-resubmit case when using session form mode. > >Forbidding resubmissions is a good point. I'm aware of Struts' support for tokens, and I've repeatedly thought about adding support for this to Spring too. I'll probably add this sooner, maybe even this week :-) > >What about AbstractFormController and SimpleFormController do you consider restrictive? Resp. what do you mean with Struts' flexible forwarding strategy? AFAIK, you can preconfigure the form view and success view in struts-config. SimpleFormController offers a similar model: Simply preconfigure formView and successView via the application context's definition of your controller, instead of calling setFormView and setSuccessView in your constructor. > >So with Struts, you _must_ use symbolic view names in struts-config, using the one and only view resolution way. With Spring, you have the choice between defining the views in the form controller and using the application context definition. Additionally, you can choose between various ViewResolver implementations. If you want even more flexibility, you can derive from AbstractFormController, providing showForm and processSubmit yourself. > >I've already committed the changes to AbstractFormController, please have a look at them! > >Regards, >Juergen > > >-----Original Message----- >From: Ken Krebs [mailto:kk...@kk...] >Sent: Tuesday, May 20, 2003 4:37 PM >To: jürgen höller [werk3AT] >Cc: 'spring-dev-list' >Subject: [Springframework-developer] MVC Forms > > >Juergen, > >There is a problem in my version 1 prototype of the petclinic demo. > >Should a user change an owner's info and then use the Back button and >try and resubmit the form (which has sessionForm==true) to make another >change, the method AbstractFormController.handleRequestInternal will >call userObject to retrieve the form object from the session. Since the >form object is no longer there, this results in a ServletException. My >current working version works around this by overriding isFormSubmission >which only returns true if the method was POST and it can find the form >object. Since I have also overriden formBackingObject to provide the >owner info in the first place, this results in a redisplay of the form >with the user's latest changes silently ignored. This process must seem >unreasonable to users who know nothing about the problems enterprise >application developers face with the browser's Back button. Maybe I'm >going about this wrong. > >This also brings up the issue of when a developer specifically wants to >forbid resubmission as in a purchase transaction. Struts provides >support for a synchronizing token to prevent duplicate submissions using >the <html:form> tag. > >Perhaps we should provide some infrastructure to help developers solve >these problems in a consistent way. > >I am also a little bit concerned over the process used in >AbstractFormController and SimpleFormController. Developers may see this >as too restrictive, especially if they are used to the flexible >forwarding strategy of Struts. > >What are your thoughts on this ? > >Ken > > > > > > |
|
From: <jue...@we...> - 2003-05-20 16:44:01
|
Reply-to... -----Original Message----- From: j=FCrgen h=F6ller [werk3AT]=20 Sent: Tuesday, May 20, 2003 6:00 PM To: 'Ken Krebs' Subject: RE: [Springframework-developer] MVC Forms Hi Ken, Hmmm, those naughty back button problems ;-) Anyway, you're right that going back and resubmitting the form currently = results in a "Form object not found" message when using session form = mode (in non-session mode it would work of course). This isn't = particularly nice, so I've just added a corresponding check to = AbstractFormController's handleRequestInternal. A request without a form = session attribute is now always treated as new form when in session form = mode. To avoid the silent ignoring of a user's changes in this case, I've = added a general new feature: a "bindOnNewForm" property. If this is true = -setBindOnNewForm(true) or a bean factory parameter -, the parameters of = a request that leads to a new form get bound to the form object too. = This can be used to prepopulate a new form via the calling URL, but it = also keeps the user's changes in the back-and-resubmit case when using = session form mode. Forbidding resubmissions is a good point. I'm aware of Struts' support = for tokens, and I've repeatedly thought about adding support for this to = Spring too. I'll probably add this sooner, maybe even this week :-) What about AbstractFormController and SimpleFormController do you = consider restrictive? Resp. what do you mean with Struts' flexible = forwarding strategy? AFAIK, you can preconfigure the form view and = success view in struts-config. SimpleFormController offers a similar = model: Simply preconfigure formView and successView via the application = context's definition of your controller, instead of calling setFormView = and setSuccessView in your constructor. So with Struts, you _must_ use symbolic view names in struts-config, = using the one and only view resolution way. With Spring, you have the = choice between defining the views in the form controller and using the = application context definition. Additionally, you can choose between = various ViewResolver implementations. If you want even more flexibility, = you can derive from AbstractFormController, providing showForm and = processSubmit yourself. I've already committed the changes to AbstractFormController, please = have a look at them! Regards, Juergen -----Original Message----- From: Ken Krebs [mailto:kk...@kk...] Sent: Tuesday, May 20, 2003 4:37 PM To: j=FCrgen h=F6ller [werk3AT] Cc: 'spring-dev-list' Subject: [Springframework-developer] MVC Forms Juergen, There is a problem in my version 1 prototype of the petclinic demo. Should a user change an owner's info and then use the Back button and=20 try and resubmit the form (which has sessionForm=3D=3Dtrue) to make = another=20 change, the method AbstractFormController.handleRequestInternal will=20 call userObject to retrieve the form object from the session. Since the=20 form object is no longer there, this results in a ServletException. My=20 current working version works around this by overriding isFormSubmission = which only returns true if the method was POST and it can find the form=20 object. Since I have also overriden formBackingObject to provide the=20 owner info in the first place, this results in a redisplay of the form=20 with the user's latest changes silently ignored. This process must seem=20 unreasonable to users who know nothing about the problems enterprise=20 application developers face with the browser's Back button. Maybe I'm=20 going about this wrong. This also brings up the issue of when a developer specifically wants to=20 forbid resubmission as in a purchase transaction. Struts provides=20 support for a synchronizing token to prevent duplicate submissions using = the <html:form> tag. Perhaps we should provide some infrastructure to help developers solve=20 these problems in a consistent way. I am also a little bit concerned over the process used in=20 AbstractFormController and SimpleFormController. Developers may see this = as too restrictive, especially if they are used to the flexible=20 forwarding strategy of Struts. What are your thoughts on this ? Ken =20 |
|
From: <tri...@tr...> - 2003-05-20 16:36:15
|
We should also add Spring to the Wafer project From their web site: http://www.waferproject.org/index.html Wafer is a research project which compares the many open source web application frameworks which are available using a common example application. This research project is designed to compare the application frameworks on a level field by specifying an example application so that the application features become irrelevent and the merits of each framework becomes the focus. --Thomas > For publicity, maybe we could write an article or two for O'Reilly's > OnJava.com. > They also have an Open Source Directory > http://www.onjava.com/pub/q/java_os_directory > where we should be listed. > > --Thomas > > > We also need a proper publicity campaign for our first release: posting to > > TSS and any other forums (application-servers.com etc.); word-of-mouth to > > colleagues, email signatures... This is very important: a lot of good > > technologies don't get adopted because people don't hear of them. Ideas > > welcome. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: =?iso-8859-1?Q?<jp....@ti...> - 2003-05-20 16:30:00
|
Hello,=0D=0A=0D=0AStruts allows also to use the token programmatically wi= th setToken(), isTokenValid() and so on. I had implemented such a behavio= r to prevent resubmitting. But the solution asks mandatory the use of a m= anually putted token field in the form as Struts handle this beyond the s= cene. A much more general solution has to be found, but it's an effective= issue we have to care with.=0D=0A=0D=0AJean-Pierre=0D=0A=0D=0A=0D=0A----= ------ Initial Header -----------=0D=0A=0D=0AFrom : springframework-= dev...@li...=0D=0ATo : "j=FCrgen h=F6ll= er [werk3AT]"<jue...@we...>=0D=0ACc : 'spring-dev= -list' <spr...@li...>=0D=0ADate := Tue, 20 May 2003 09:36:40 -0500=0D=0ASubject : [Springframework-develope= r] MVC Forms=0D=0A=0D=0AJuergen,=0D=0A=0D=0AThere is a problem in my vers= ion 1 prototype of the petclinic demo.=0D=0A=0D=0AShould a user change an= owner's info and then use the Back button and =0D=0Atry and resubmit the= form (which has sessionForm=3D=3Dtrue) to make another =0D=0Achange, the= method AbstractFormController.handleRequestInternal will =0D=0Acall user= Object to retrieve the form object from the session. Since the =0D=0Aform= object is no longer there, this results in a ServletException. My =0D=0A= current working version works around this by overriding isFormSubmission = =0D=0Awhich only returns true if the method was POST and it can find the = form =0D=0Aobject. Since I have also overriden formBackingObject to provi= de the =0D=0Aowner info in the first place, this results in a redisplay o= f the form =0D=0Awith the user's latest changes silently ignored. This pr= ocess must seem =0D=0Aunreasonable to users who know nothing about the pr= oblems enterprise =0D=0Aapplication developers face with the browser's Ba= ck button. Maybe I'm =0D=0Agoing about this wrong.=0D=0A=0D=0AThis also b= rings up the issue of when a developer specifically wants to =0D=0Aforbid= resubmission as in a purchase transaction. Struts provides =0D=0Asupport= for a synchronizing token to prevent duplicate submissions using =0D=0At= he <html:form> tag.=0D=0A=0D=0APerhaps we should provide some infrastruct= ure to help developers solve =0D=0Athese problems in a consistent way.=0D= =0A=0D=0AI am also a little bit concerned over the process used in =0D=0A= AbstractFormController and SimpleFormController. Developers may see this = =0D=0Aas too restrictive, especially if they are used to the flexible =0D= =0Aforwarding strategy of Struts.=0D=0A=0D=0AWhat are your thoughts on th= is ?=0D=0A=0D=0AKen=0D=0A =0D=0A=0D=0A=0D=0A=0D=0A-----------------------= --------------------------------=0D=0AThis SF.net email is sponsored by: = ObjectStore.=0D=0AIf flattening out C++ or Java code to make your applica= tion fit in a=0D=0Arelational database is painful, don't do it! Check out= ObjectStore.=0D=0ANow part of Progress Software. http://www.objectstore.= net/sourceforge=0D=0A_______________________________________________=0D=0A= Springframework-developer mailing list=0D=0ASpringframework-developer@lis= ts.sourceforge.net=0D=0Ahttps://lists.sourceforge.net/lists/listinfo/spri= ngframework-developer=0D=0A=0A=0A********** SPECIAL ADSL **********=0AL'A= DSL =E0 partir de 15,95 EUR/mois et le modem ADSL offert ? C'est en excl= usivit=E9 chez Tiscali !=0APour profiter de cette offre, cliquez ici: htt= p://register.tiscali.fr/adsl/=0AOffre soumise =E0 conditions.=0A |
|
From: Ken K. <kk...@kk...> - 2003-05-20 15:17:34
|
Isabelle, Thanks for giving it your attention. Your timing is not a problem for me. I will probably be implementing all the vets use cases using the jdbc.core classes anyway as Rod wants to show some of these types of examples in this demo-app. Ken Isabelle Muszynski wrote: >Hi Ken, > >I'll have a look at it, but it may have to wait until the weekend. However, I'll do my best to do it sooner. > >Isabelle > >On Tue, May 20, 2003 at 07:38:00AM -0500, Ken Krebs wrote: > > >>Isabelle, >> >>Are there any plans to add insert functionality to the higher level part >>of the framework ? >> >>It seems inconsistent to me to force developers to use the lower level >>abstractions when I would think we would want to emphasize the higher >>level abstractions. >> >>Ken >> >>Isabelle Muszynski wrote: >> >> >> >>>Ken, >>> >>>Sorry, the methods are in JdbcTemplate. Have a look at the livetests >>>directory. >>> >>>Isabelle >>> >>>On Mon, May 19, 2003 at 09:32:44AM -0500, Ken Krebs wrote: >>> >>> >>> >>> >>>>Isabelle, >>>> >>>>I don't see any update methods in SqlUpdate that take a KeyBinder. >>>> >>>>Ken >>>> >>>> >>>> >>>>Isabelle Muszynski wrote: >>>> >>>> >>>> >>>> >>>> >>>>>Hi Ken, >>>>> >>>>>It's all hidden under update. There are some new update methods that >>>>>take a KeyBinder, those are the ones that use key auto-generation and >>>>>return you the value of the generated key. >>>>>For an insert without auto key generation, you can just use the update, >>>>>passing it an INSERT INTO ... >>>>> >>>>> >>>>>Isabelle >>>>> >>>>>On Mon, May 19, 2003 at 09:01:29AM -0500, Ken Krebs wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>Isabelle, >>>>>> >>>>>>Is there any high level (com.interface21.jdbc.object) support for >>>>>>Insert functionality ??? >>>>>> >>>>>>I've seen some comments about it being incorporated while browsing the >>>>>>CVS for SqlUpdate rev 1.4 and SqlOperation rev 1.4 but I see no actual >>>>>>differences supporting it. >>>>>> >>>>>>Is this planned for later ? >>>>>> >>>>>>Ken >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>> >>> >>> > > > |
|
From: Ken K. <kk...@kk...> - 2003-05-20 14:41:45
|
Juergen, There is a problem in my version 1 prototype of the petclinic demo. Should a user change an owner's info and then use the Back button and try and resubmit the form (which has sessionForm==true) to make another change, the method AbstractFormController.handleRequestInternal will call userObject to retrieve the form object from the session. Since the form object is no longer there, this results in a ServletException. My current working version works around this by overriding isFormSubmission which only returns true if the method was POST and it can find the form object. Since I have also overriden formBackingObject to provide the owner info in the first place, this results in a redisplay of the form with the user's latest changes silently ignored. This process must seem unreasonable to users who know nothing about the problems enterprise application developers face with the browser's Back button. Maybe I'm going about this wrong. This also brings up the issue of when a developer specifically wants to forbid resubmission as in a purchase transaction. Struts provides support for a synchronizing token to prevent duplicate submissions using the <html:form> tag. Perhaps we should provide some infrastructure to help developers solve these problems in a consistent way. I am also a little bit concerned over the process used in AbstractFormController and SimpleFormController. Developers may see this as too restrictive, especially if they are used to the flexible forwarding strategy of Struts. What are your thoughts on this ? Ken |
|
From: Ken K. <kk...@kk...> - 2003-05-20 12:43:06
|
Isabelle, Are there any plans to add insert functionality to the higher level part of the framework ? It seems inconsistent to me to force developers to use the lower level abstractions when I would think we would want to emphasize the higher level abstractions. Ken Isabelle Muszynski wrote: >Ken, > >Sorry, the methods are in JdbcTemplate. Have a look at the livetests directory. > >Isabelle > >On Mon, May 19, 2003 at 09:32:44AM -0500, Ken Krebs wrote: > > >>Isabelle, >> >>I don't see any update methods in SqlUpdate that take a KeyBinder. >> >>Ken >> >> >> >>Isabelle Muszynski wrote: >> >> >> >>>Hi Ken, >>> >>>It's all hidden under update. There are some new update methods that take >>>a KeyBinder, those are the ones that use key auto-generation and return >>>you the value of the generated key. >>>For an insert without auto key generation, you can just use the update, >>>passing it an INSERT INTO ... >>> >>> >>>Isabelle >>> >>>On Mon, May 19, 2003 at 09:01:29AM -0500, Ken Krebs wrote: >>> >>> >>> >>> >>>>Isabelle, >>>> >>>>Is there any high level (com.interface21.jdbc.object) support for Insert >>>>functionality ??? >>>> >>>>I've seen some comments about it being incorporated while browsing the >>>>CVS for SqlUpdate rev 1.4 and SqlOperation rev 1.4 but I see no actual >>>>differences supporting it. >>>> >>>>Is this planned for later ? >>>> >>>>Ken >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> > > > |
|
From: Ken K. <kk...@kk...> - 2003-05-20 12:35:13
|
Thomas, Thanks again for your help. I have already made the same changes in my=20 own latest working version as you describe in 1. I very much wanted to=20 retain the "dataSource" bean because it does show how easy it is to=20 switch datasources. The value of this will become even more apparent=20 when I have refactored to separate the persistence code from the=20 business logic. Ken tri...@tr... wrote: >To All, > >I went back to modify Ken's demo app to use J=FCrgen's JndiDataSourceBea= n and to >run with the latest version of the framework code from CVS. > >Again, I had to make just a few changes, but this time I did not touch a= ny of >Ken's original Java code. I only modified three of the deployment xml f= iles.=20 >This really shows how valuable a well designed framework is. > >These are the changes I made to the original code from Ken's Petclinic1.= zip >(Steps 2, 3 and 6 are the same as last time): > >1. Removed the <servlet> entry for ContextLoaderServlet from web.xml. T= his >class has recently been removed from CVS. Replaced it with a <listener>= entry. > > <listener> > =20 ><listener-class>com.interface21.web.context.ContextLoaderListener</liste= ner-class> > </listener> > > >2. Added a 'resource-ref' entry to web.xml. It goes at the end after >the <taglib> entries. > > <resource-ref> > <description>The default DS</description> > <res-ref-name>jdbc/SpringDS</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > >3. Created a jboss-web.xml file with the corresponding 'resource-ref' >entry pointing to the HSQL default datasource. > ><jboss-web> > <resource-ref> > <res-ref-name>jdbc/SpringDS</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <jndi-name>java:/DefaultDS</jndi-name> > </resource-ref> ></jboss-web> > > >4. Changed the "bean" entry for "dataSource" in the >applicationContext.xml - it now uses the new JndiDataSourceBean. > ><beans> =09 > > <!-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--> > <!-- Global Message source. For all servlets. --> > <!-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--> > <bean name=3D"messageSource" >class=3D"com.interface21.context.support.ResourceBundleMessageSource">=09 > <property name=3D"basename">messages</property> =09 > </bean> > > <bean name=3D"dataSource" >class=3D"com.interface21.jdbc.datasource.JndiDataSourceBean" > > <property name=3D"name">jdbc/SpringDS</property> > </bean> > =20 ></beans> > > >5. Replaced the WEB-INF/lib/spring-full-0.8.jar with the latest version. > > >6. Created a "petclinic.war" directory under the >"c:\jboss-3.2.1\server\default\deploy" directory and deployed the applic= ation there. > > >That's it for this time. > >I have attached a zip file with the changed xml files. > > >--Thomas > > =20 > |