Spring Webflow - FormAction.doValidate() isn't called when there is no validator configured

This post is relevant for the Spring Webflow 1.x users.

I have been breaking my head from 2-3 days over this problem and was able to crack it today.
I did some search on google and found that this is a open Bug on Spring Webflow (Spring Webflow 1.0.3 Bug SWF-397)

This bug has not been resolved since they can't do it in a 100% backwards compatible way. I found a workaround/solution so thought of sharing with other who are struggling on problem.

What is the issue?


The problem occurs when you have a FormAction bean configured in your application without a validator e.g.

 


The spring framework code does a check for "if (getValidator() != null) " before making a call to doValidate() method and therefore doValidate method will not be called when we have configured the FormAction bean like above.

What is the workaround?

The workaround is simple and requires you to write a simple dummy validator class which does nothing. Below is a Sample dummy validation class you can use for your application.

package example.spring.validations;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.springframework.validation.Errors;import org.springframework.validation.Validator;/*** @author swiki**/public class DummyValidation implements Validator {public boolean supports(Class clazz){return true;}public void validate(Object target, Errors errors){return;  }}


Now inject this dummy validator bean to all the form beans where you want your own doValidate method to be called. See the example bean config below

 


Thats it! Your doValidate method should start getting called now as the "if (getValidator() != null) " condition will not fail.

Please don't forget to share, if you know of a better workaround for this.

429 Post Comment

«Oldest   ‹Older   401 – 429 of 429   Newer›   Newest»
alia said...

Coimbatore Escorts
Delhi Escorts
Dhanbad Escorts
Dharwad Escorts
Gaya Escorts
Gurgaon Escorts
Jammu Escorts
Pathankot Escorts
===================================

Golden Slot said...

Slotxo บริการ สล็อตออนไลน์ สล็อตxo แจกเครดิตฟรี พร้อม ทางเข้า slotxo เกมส์ใหม่กว่า 100 เกมส์ สมัคร slotxo ได้เลยตอนนี้ บริการ 24 ชั่วโมง.
Slotxo
สล็อตxo
สล็อตxo บนมือถือ
สมัคร slotxo
สมัคร slotxo รับโบนัสฟรี

Barbara Pantuso said...

t3n.de
flythemes.net

mcafeecomactivate said...

McAfee antivirus programme is the safest way to protect against harmful viruses, malicious cyber attacks, and other malware from our PC/Laptop. McAfee antivirus offers its clients with the latest innovative security solutions, ranging from small to large companies , corporations, government, etc. It has a variety of applications, first you need to 'mcafee login' to appreciate the functionality of McAfee antivirus. A lot of web hacking, sceptic pages are very popular these days. McAfee antivirus is designed in such a manner that the unwelcome sites and risks can be quickly combated. It serves as an antibody for our tissue and defends it from horrifying viruses.

mcafeecomactivate said...

Most users are looking for these incorrect keywords, like McAfee.com/activate, McAfee.c/activate, McAfee.coom/ activate, www McAfee com activate, McAfee com activate instead of McAfee.com/activate to activate McAfee on their computer. We would love to direct you, being the premium service for this, to bear in mind the exact keywords to enable Antivirus on your computer. Since you are now aware of the protocol and helpful steps to make it easier for the McAfee com to enable the process.

mcafeecomactivate said...

While Roadrunner email is a superb email service that doesn't get it wrong with customers, it can also have some technical bugs like all the other services. However, by their feature, the purchasers have the Roadrunner customer service to unravel all the technological issues they may face. Roadrunner email settings can ensure the manner in which victimisation email services are efficient like ne'er before. Roadrunner email login customer Support Service is cared for by a variety of the most delicate technicians United Nations agency is specially trained to provide cost-effective assistance to any customer that needs easy handling of their Roadrunner email account.

mcafeecomactivate said...

Windstream Holdings , Inc. also operates as Windstream Networks or Windstream, a network operator for voice and data messaging, and regulated enterprise services throughout the United States. Windstream Email is part of Communications section. This is used to send and receive messages and mails. Follow the steps below to login and reset to windstream account for Windstream operation. With your updated password, you can then sign in at any time. You must also remember to sign off before loading the programme. Thus, these are the steps to log in and update windstream account to windstream inbox. To keep away from any more challenges follow these steps.

Emma Ludwig said...

The Importance of Content vs Backlinks

Emma Ludwig said...

The Importance of Content vs Backlinks

Satta King said...

Satta King game is drawing and lottery-based generally match-up, anyway right now it's sorted in betting.
Satta King
Satta King Gali
Satta King
Satta King Gali
Satta King Desawar
Satta King Faridabad
Satta King Ghaziabad
Satta King Ghaziabad Delhi Darbar
Satta King Peshawar
Satta King Gali
Satta King Game
Satta King Faridabad
Satta King Delhi Darbar
Satta King Desawar
Satta King Ghaziabad
Satta king live result
Satta king online result
Satta king online
Satta king result today
Satta king gali result
Satta king desawar result
Satta king faridabad result
Satta king gaziyabad result
Satta king delhi darbar result
Satta matka king
Satta king up
Satta king desawar
Satta king gali
Satta king 2020 chart
Satta king 2019 chart
Satta king 2021 chart
Satta baba king
Satta king chart
Gali live result
desawar live result
faridabad live result
ghaziabad live result
delhi darbar live result

Nino Nurmadi , S.Kom said...

ninonurmadi.com
ninonurmadi.com
ninonurmadi.com
ninonurmadi.com
ninonurmadi.com
ninonurmadi.com
ninonurmadi.com
ninonurmadi.com
ninonurmadi.com

Yulia Hasyanti said...

MkvPoker Adalah Situs Judi Poker Terbaik Dengan Taruhan Uang Asli Yang Menjaminkan Kemenangan Yang Tinggi

Wa : +855 9637 31855

Nino Nurmadi , S.Kom said...

Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom
Nino Nurmadi, S.Kom

nazirad said...

برنامه بدنسازی مجموعه ای از برنامه های تمرینی، غذایی و مکمل های غذایی می باشد که در چهارچوب مشخص برای افراد مختلفی طراحی می شود. یک برنامه بدنسازی اختصاصی با توجه به فاکتورهای فردی مانند هدف ورزشی، تیپ بدنی فرد، سوابق تمرین، تعداد جلسات تمرین در هفته، ساعت بیدار شدن و خوابیدن و … برای هر شخص تنظیم می شود.

Pokeridn13win said...

Taruhan pakai uang asli main judi poker secara online, hanya bisa kamu mainkan disini http://lennyhenry.org/daftar-situs-taruhan-judi-idn-poker-online-resmi-terbaik/.

Unknown said...

Great Article IoT Projects for Students

Deep Learning Projects for Final Year

JavaScript Training in Chennai

JavaScript Training in Chennai

The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

139.99.167.125 said...

anda penggemar permainan ceme? ingin bermain ceme online tapi bingung pilih situs judi ceme yag tepat? anda langsung kunjungi link berikut ini untuk segera bermain pada situs judi ceme terbaik banyak bonusnya!
http://139.99.167.125/daftar-situs-judi-ceme-terbaik-banyak-bonus-terbesar-tanpa-undi/

williams jones said...

Thansk for sharing What an interesting site you have i really take a good look buy cocaine online and you can also take a good look at our blog too for more information buy crack cocaine online we also recommend you to take a good look at this site too they have good content buy mdma crystals online more of the site still want you to take a closer look too as they have really good content buy crystal meth online thanks for using your time to check on the link.

williams jones said...

BUY XAXAX ONLINE
BUY COCAINE ONLINE
BUY CRACK COCAINE ONLINE
BUY HYDROMORPHONE ONLINE
BUY IBOGAINE ONLINE
BUY IBOGA SEEDS ONLINE
BUY IBOGA CAPSULES ONLINE
BUY WEED ONLINE
BUY NORTHERN LIGHT ONLINE
BUY GODFATHER OG ONLINE

Hasitha Lee said...

this is nice.
Assignment Helper

jane smith said...

McAfee programming gives the digital security services to ensure your hardware information.
you can experience its downloading and installing procedure of McAfee antivirus.
mcafee activate |
mcafee.com/activate |
www.mcafee.com/activate |
mcafee download |

jane smith said...

Internet security is a basic necessity for users to remain secure, protected from online threats.
To setup Norton antivirus on your computer visit norton setup.
These 3 simple steps of Norton setup can help you to easily log in, download, install, and enter the Norton setup key on the computer online.
norton setup |
norton.com/setup |
www.norton.com/setup |
norton download |

jane smith said...

When you download Microsoft Office from ms office,
you receive useful applications such as Excel, PowerPoint, Word, OneNote, Outlook, Teams, and so much
more along with a security blanket in some of the enterprise packages.
office.com/setup |
www.office.com/setup |
office setup |
microsoft office download |

jane smith said...

Owned and controlled by Time Warner Cable Network, it allows customers to subscribe to the e--mail which is channeled towards the network.
https://email-phone-support.com/roadrunner-email-login/

jane smith said...
This comment has been removed by the author.
jane smith said...
This comment has been removed by the author.
Assignment Help Pro said...

Advanced education students regularly need Dissertation Helper. It is one of the most overwhelming assignments at school and can represent the deciding moment a degree, which makes the dissertation help critical. It requires time, broad research, and orderly scientific capacity.

yanmaneee said...

supreme
yeezy
jordan 1
jordan shoes
golden goose shoes
kyrie 7
golden goose outlet
yeezys
curry 7 shoes
kenzo clothing

420cannabworld said...

Buy weed, buds, wax, distillate, vape cartridges and other concentrates at affordable prices both bulk and smaller orders online

«Oldest ‹Older   401 – 429 of 429   Newer› Newest»

Post a Comment

Search Web......