Re: [Stripes-users] Preventing multiple form submission

2010-11-16 Thread Pakin

Hi Nikolaos,

have you used the transaction token mechanism in Struts? A similar mechanism
should solve your problem. It would be really easy to implement. If you
don't know what I am talking about, let me know and I will explain further.

Cheers,

Angel.


Nikolaos Giannopoulos wrote:
 
 Hi,
 
 Just wondering how others elegantly solve this situation:
 
 1) User is editing a form and fills it out and clicks submit button
 2) Form gets successfully processed on the server however before a 
 response is returned the user hits the stop button, their internet 
 connection drops, etc...
 4) User clicks on submit again and tries to re-submit the same 
 information(*)
 
 Now, this would be trivial if there was a unique piece of information in 
 the content being posted however lets assume someone posting some blog / 
 news content wherein there is really no unique info (e.g. although it 
 may be rare there is nothing wrong with 2 people say posting the same 
 content with the same title).
 
 I was thinking to tag the users session with the last successfully 
 submitted Stripes _sourcePage field and direct the user to the view 
 handler if they are trying to do an edit and the _sourcePagematches.
 
 Thoughts???
 
 --Nikolaos
 
 
 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today
 http://p.sf.net/sfu/msIE9-sfdev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Preventing-multiple-form-submission-tp30229773p30233802.html
Sent from the stripes-users mailing list archive at Nabble.com.


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Form Validation: Stripes and MooTools (field-metadata Tag)

2010-11-15 Thread Pakin

That's OK,

although I want to clarify that they are related matters as what I was
suggesting has to be also reflected in client validation. 

Pretty much the use case would be the following: The framework detects if
there is any JSR-303 provider in the classpath, if so it uses all your JPA
annotated pojos that are binded to any form, so the stripes taglibs would
generate client validations at jsp rendering time. Somehow this client
validation should be able to be cross-javascript-framework sort to speak.
Although I reckon that jQuery is the de facto standard here. Once the form
is submitted the system detects if the form backing bean is a persisted
object with JPA annotation and perform the validations among other
validations you may have. This way you don't need to repeat your DB backend
related constraints using the custom Stripes validation annotations. IMHO it
would be a very agile and convenient feature.

Cheers mate,

Angel.


Nikolaos Giannopoulos wrote:
 
 Pakin,
 
 Welcome to this mailing list. It's great that you are interested in 
 collaborating.
 I totally agree that Stripes needs work in the Validation area on the 
 server side... and any thoughts would be welcome.
 
 However, this specific thread is about how to hook in client side 
 validation so as to pre-validate form input so as to improve the user 
 experience, reduce server load, etc... . I don't believe JSR-303 has 
 anything to offer here? Does it?
 
 ASIDE: Feel free to start a new thread on JSR-303 Validation. In fact, 
 if you look in the archives someone provided some code (although I don't 
 recall the details, how thorough it was, etc...). Again, I don't get me 
 wrong but I think another thread might be very worthwhile... .
 
 --Nikolaos
 
 
 
 Pakin wrote:
 Hi all,

 I am new in town and I would like to collaborate...

 I think that validation-wise, it would be more interesting trying to
 tackle
 the issue of: how to integrate Stripes server and client validation with
 JSR-303

 Frameworks like Spring MVC 3 or Loom already have it and I think it is
 indeed a competitive advantage over Stripes.

 I think Stripes validation should adopt JSR-303 because it is standard
 and
 most of the constraints to be validated come from the database and
 currently
 with stripes you have take care about those explicitly.

 You can find more information about what Spring MVC does here: 
 http://static.springsource.org/spring/docs/3.0.0.RC3/spring-framework-reference/html/ch05s07.html
 http://static.springsource.org/spring/docs/3.0.0.RC3/spring-framework-reference/html/ch05s07.html
  

 Cheers,

 Angel.


 Nikolaos Giannopoulos wrote:
   
 Hi,

 I noticed the following page which shows how to integrate Stripes w/ 
 client side validation via JQuery:
 http://www.stripesframework.org/display/stripes/Validation+Reference#ValidationReference-Usingthe{{fieldmetadata}}tag

 Has anyone done anything similar w/ MooTools?

 If so, was it a rewrite of Aaron's code or did it hook into MooTools 
 Form Validation?

 And if so - anything shared would be appreciated.

 We are debating whether to do this now (though are short on time - what 
 else is new) but anything that accelerates that could help us and in 
 turn we would post it back to the community.  I also realize the effort 
 isn't huge but JQuery notation is new to me and doing this right w/ 
 MooTools and classes will result in a pretty extensive re-write I'm
 afraid.

 Lastly, this is probably a stretch but did anyone solve the localization 
 issue in all of this i.e. localized error messages exist in resource 
 bundles on the Stripes server side yet the messages need to be 
 accessible to provide the correct message to the user... Ajax is one 
 possibility... using a generic set of translated messages is another... 
 but all don't appear optimal.

 Much Appreciated.

 --Nikolaos

 --
 Centralized Desktop Delivery: Dell and VMware Reference Architecture
 Simplifying enterprise desktop deployment and management using
 Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
 client virtualization framework. Read more!
 http://p.sf.net/sfu/dell-eql-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


 

   
 
 
 -- 
 Nikolaos Giannopoulos
 Director of Information Technology
 BrightMinds Software Inc.
 e. nikol...@brightminds.org
 w. www.brightminds.org
 t. 1.613.822.1700
 c. 1.613.797.0036
 f. 1.613.822.1915
 
 
 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today
 http://p.sf.net/sfu/msIE9