Hey, guys, now that there's actually ADF Faces source code to point you at - can I point you at the ADF Faces code that does client validation?
The general approach we use is that client-side validation happens "magically": you add a JSF validator, converter, or set "required", and we automatically figure out what client-side validation is needed and render it without further prodding from the page author. This happens with some optional interfaces that a validator or converter can add. This is more than just a nice feature - it's architecturally very important that web applications always have client-side validation as a subset of server-side validation (maybe equals, but never ever more); so it's dangerous to let people get in the habit of separately adding client-side validation in case they start thinking "hey, I already validated on the client, I can save time and not re-validate on the server". -- Adam On 1/11/06, Martin Marinschek <[EMAIL PROTECTED]> wrote: > 1) you say JSF file - you mean js, right? > > > On 1/11/06, Cagatay Civici <[EMAIL PROTECTED]> wrote: > > Hi Martin, > > > > I am working on integrating the client validators to tomahawk now and have a > > couple of questions, hope you don't mind. > > > > 1) I am using a .jsf file, where should I put this file exactly, I guess, > > > > tomahawk\src\main\resources\org\apache\myfaces\custom\clientvalidators\resource\clientvalidators.js > > > > 2) I observed in myfaces there is an extensions filter to serve the > > resources like javascript files from jar instead of using them externally. > > What should I do to add this feature to my code, I've tried AddResouce but > > could not make it right I guess. > > > > 3) I have added a package name clientvalidators under tomahawk, there are a > > total of 6 different components I implemented and how should be the the > > folder structure? Should I seperate each component or put them all under one > > folder, I mean; > > > > org\apache\myfaces\custom\clientvalidators\RequiredFieldValidatorTag.java > > or > > org\apache\myfaces\custom\clientvalidators\RequiredFieldValidator\RequiredFieldValidatorTag.java, > > etc. > > > > 4) I am still confused about this resource location, I'am still seeing same > > resources under; > > \tomahawk\src\main\java\org\apache\myfaces\custom\popup\resource\popup.js > > \tomahawk\src\main\resources\org\apache\myfaces\custom\popup\resource\popup.js > > > > So far, I've managed to integrate my code to tomahawk, have a build, deploy > > and test OK. The js file is used externally during my tests, both mozilla > > and ie are supported now. > > > > Thank you for your time, > > > > Regards, > > > > Cagatay, > > > > > > > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces >
