Re: Abouts automatics forms and validation of fields ...

Stéphane Croisier <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Hi Benjamin,

Your solution seems good so no problem on our side with it.

But take care that the validation module is only one part of the problem. 
The other one is how you integrate it in the current Jahia engines. Often 
the edition engines group together several fields into "tabs". So a user 
may not go in all the tabs and then not initialize all the generated 
validation javascript. This is only when cliking on the Ok/Save button that 
you may see that certain of these fields are empty. Then you will have to 
warn the author that he perhaps forgot to fulfill a mandatory field and 
perhaps want to reposition the engine and cursor directly in the correct 
tab and field.

Regarding this behaviour and the mandatory fields there are already 
something in the dev CVS. Perhaps you may want to backport/modify this in 
the Jahia 4.0 branch if you need it urgently.

What would be nice is if we can integrate your "plugable validation" 
changes also in the CVS dev and integrate them in future Jahia releases (so 
that you avoid having to maintain a separate validation module on your own 
for future releases). But as we also plan to split the content definition 
from the JSP template (for several reasons) in the next release, we will 
then also have to check how everything will fit together.

Cheers,
Stéphane

At 14:36 14/12/2004, you wrote:

>This is a very disturbing issue for us, too. We are developing an 
>e-Business Portal based on Jahia and have some container fields, which 
>should be either mandatory or limited in length or in a particular format, 
>but according to the message 
>http://article.gmane.org/gmane.comp.cms.jahia.template/1328, there is no 
>support for plugable validators in Jahia. There are just a few fixed 
>validations for bigtext-fields, mandatory languages,...
>
>Plugable validation support is only promised in the long run, after Jahia 
>engines shift to JavaServerFaces technology.
>
>As our testers are heavily complaining about this problem, it looks that I 
>have to find a solution in the "short run". I was looking into using the 
>Apache Commons Validator framework to validate Jahia Containers. The 
>resources, which are validated by the Validator framework should be JavaBeans.
>
>First I thought I could simply let this beans be populated out of the 
>request parameters and then call the validation before engine processing, 
>but then I found out that Jahia does not use the constant defined field 
>names for the HTML input fields, but uses numbers as the HTML input field 
>name, according to the position of the field.
>
>As second I looked into the source code of the Validator framework. A 
>second possible solution would be deriving from the Validator framework to 
>allow passing a Jahia container instead of a JavaBean and then retrieve 
>the fields with getFieldValue() instead of calling the getter-Method of 
>the bean property.
>
>Before starting, I would like to ask the community if it makes sense to do 
>it this way? Has somebody already started or tried to solve this issue?
>
>Regards,
>Benjamin Papez
>
>news <[email protected]> wrote on 10.12.2004 15:24:16:
>
> > Hi,
> >
> > I appreciate the fact there is a motor of forms into JAHIA, but it seems
> > there is no validation of fields while commiting the form....
> >
> > If so, how to do it?
> >
> > Thanks.
> >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.