Return-Path: Delivered-To: apmail-click-dev-archive@www.apache.org Received: (qmail 96389 invoked from network); 15 Feb 2010 18:30:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2010 18:30:30 -0000 Received: (qmail 94402 invoked by uid 500); 15 Feb 2010 13:03:49 -0000 Delivered-To: apmail-click-dev-archive@click.apache.org Received: (qmail 94381 invoked by uid 500); 15 Feb 2010 13:03:49 -0000 Mailing-List: contact dev-help@click.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@click.apache.org Delivered-To: mailing list dev@click.apache.org Received: (qmail 94369 invoked by uid 99); 15 Feb 2010 13:03:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 13:03:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 13:03:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 50379234C052 for ; Mon, 15 Feb 2010 05:03:28 -0800 (PST) Message-ID: <2126251304.278051266239008327.JavaMail.jira@brutus.apache.org> Date: Mon, 15 Feb 2010 13:03:28 +0000 (UTC) From: "WarnerJan Veldhuis (JIRA)" To: dev@click.apache.org Subject: [jira] Commented: (CLK-582) No field validation on FormTable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLK-582?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1283379= 2#action_12833792 ]=20 WarnerJan Veldhuis commented on CLK-582: ---------------------------------------- Have you got any further with this one? I don't seem to get it to work eith= er. > No field validation on FormTable > -------------------------------- > > Key: CLK-582 > URL: https://issues.apache.org/jira/browse/CLK-582 > Project: Click > Issue Type: Bug > Components: extras > Affects Versions: 1.5.3 > Environment: Linux Apache mySQL > Reporter: Christophe FOIRET > Priority: Critical > > I built a page with a search Form and two FormTable > When i select a value in the SelectList of the search Form, i fill the tw= o FormTable=20 > Each FormTable contains a required Field > When i click on the Valid Button, there is no control and the required fi= elds which are not filled are not yellow (like in your example), the page i= s refreshed and the two FormTable are empty ... > I tried this case without search Form and the control is well done ...=20 > Could you give me quickly an answer to this issue, i think that the searc= h Form disturbs the Form Table behavior > See the code below :=20 > .htm code file=20 >
>

$title

>
> $formSearch > $tableInterv > $tableTps > .java code file > package vdo.actedu.page; > import java.util.List; > import net.sf.click.control.Form; > import net.sf.click.control.Option; > import net.sf.click.control.Select; > import net.sf.click.control.Submit; > import net.sf.click.control.TextField; > import net.sf.click.extras.control.FieldColumn; > import net.sf.click.extras.control.FormTable; > import vdo.actedu.hibernate.Atelier; > import vdo.actedu.hibernate.AtelierDAO; > import vdo.actedu.hibernate.AtelierIntervenant; > import vdo.actedu.hibernate.AtelierIntervenantDAO; > import vdo.actedu.hibernate.AtelierTemps; > import vdo.actedu.hibernate.AtelierTempsDAO; > public class MoveInscriptionPage extends BorderPage { > =09public String title =3D "Transfert d'inscriptions"; > =09public String atelierId =3D ""; > public Form formSearch =3D new Form(); > public FormTable tableInterv =3D new FormTable(); > public FormTable tableTps =3D new FormTable(); > Atelier atelier =3D new Atelier(); > //D=C3=A9claration listes de s=C3=A9lection > private Select atelierSceSelect =3D new Select("atelier.libelle","Ate= lier Source"); > private Select atelierSelect =3D new Select("atelier.id","Atelier = Cible"); > private Select intervSceSelect =3D new Select("intervenant.nom"); > private Select intervSelect =3D new Select("intervenant.id"); > private Select tempsSceSelect =3D new Select("temps.libelle"); > private Select tempsSelect =3D new Select("temps.id"); > List ateliers =3D new AtelierDAO().findAll(); > List intervenantsSce =3D null; > List intervenantsCible =3D null; > List tempsSce =3D null; > List tempsCible =3D null; > public MoveInscriptionPage() { > =09//Formulaire int=C3=A9grant la liste de s=C3=A9lection Atelier Cib= le > =09formSearch.setErrorsPosition("middle"); > =09formSearch.setLabelAlign("right"); > =09atelierSceSelect.setReadonly(true); > =09formSearch.add(atelierSceSelect); > =09atelierSelect.add(new Option(0,"")); > =09=09atelierSelect.addAll(ateliers,"id","libelle"); > =09=09atelierSelect.setListener(this,"onChangeAtelier"); > =09atelierSelect.setAttribute("onChange","form.submit()"); > =09formSearch.add(atelierSelect); > =09//Tableau listant les Intervenants de l'atelier Cible > tableInterv.setClass("cgvo"); > tableInterv.setHoverRows(true); > =09tableInterv.getForm().setErrorsPosition("middle"); > =09tableInterv.getForm().setButtonAlign("center"); > =09tableInterv.getForm().setLabelAlign("right"); > FieldColumn column =3D new FieldColumn("intervenant.id", "Interve= nant Source", intervSceSelect); > column.getField().setReadonly(true); > tableInterv.addColumn(column); > column =3D new FieldColumn("intervenant.nom", "Intervenant Cible"= , intervSelect); > column.getField().setRequired(true); > tableInterv.addColumn(column); > =09//Tableau listant les Temps de l'atelier Cible > tableTps.setClass("cgvo"); > tableTps.setHoverRows(true); > =09tableTps.getForm().setErrorsPosition("middle"); > =09tableTps.getForm().setButtonAlign("center"); > =09tableTps.getForm().setLabelAlign("right"); > =09column =3D new FieldColumn("temps.id", "Temps Source", tempsSceSel= ect); > =09column.getField().setReadonly(true); > tableTps.addColumn(column); > column =3D new FieldColumn("temps.libelle", "Temps Cible", tempsS= elect); > column.getField().setRequired(true); > tableTps.addColumn(column); > =09//Boutons Valider et Retour li=C3=A9s aux TableForm > =09Submit validButton =3D new Submit(" Valider ", this, "onVali= d"); > =09validButton.setAttribute("class","button1"); > =09Submit cancelButton =3D new Submit(" Retour ", this, "onCancel= "); > =09cancelButton.setAttribute("class","button1"); > =09tableTps.getForm().add(validButton); > =09tableTps.getForm().add(cancelButton); > } > public boolean onChangeAtelier() { > =09//Peuplement de la table des Intervenants de l'Atelier Source > intervenantsSce =3D new AtelierIntervenantDAO().findByAtelierStri= ng(atelierSceSelect.getValue()); > =09intervSceSelect.addAll(intervenantsSce,"intervenant.id","intervena= nt.nom"); > tableInterv.setRowList(intervenantsSce); > =09//Peuplement de la liste de s=C3=A9lection des Intervenants Cible > =09intervenantsCible =3D new AtelierIntervenantDAO().findByAtelier(ne= w Integer(atelierSelect.getValue())); > =09intervSelect.add(new Option(0,"")); > =09intervSelect.addAll(intervenantsCible,"intervenant.id","intervenan= t.nom"); > =09//Peuplement de la table des Temps de l'Atelier Source > tempsSce =3D new AtelierTempsDAO().findByAtelierString(atelierSce= Select.getValue()); > tempsSceSelect.addAll(tempsSce,"temps.id","temps.libelle"); > tableTps.setRowList(tempsSce); > =09//Peuplement de la liste de s=C3=A9lection des Temps Cible > =09tempsCible =3D new AtelierTempsDAO().findByAtelier(new Integer(ate= lierSelect.getValue())); > =09tempsSelect.add(new Option(0,"")); > =09tempsSelect.addAll(tempsCible,"temps.id","temps.libelle"); > =09return true; > } > public void onInit() { > =09atelierId =3D getContext().getRequestParameter("id"); > //Si l'id de l'atelier est renseign=C3=A9 et que l'on n'est pas e= n Post (Bouton Enregistrer) > if (atelierId !=3D null && !getContext().isPost()) { > =09//On r=C3=A9cup=C3=A8re l'atelier pass=C3=A9 en param=C3=A8tre > =09atelier =3D new AtelierDAO().findById(new Integer(atelierId)); > =09//Mise en session de l'Atelier > =09getContext().setSessionAttribute("atelier",atelier); > } else > =09//On r=C3=A9cup=C3=A8re l'atelier de la session > =09atelier =3D (Atelier)getContext().getSessionAttribute("atelier= "); > //Mise =C3=A0 jour du libell=C3=A9 de l'Atelier Source > =09=09atelierSceSelect.add(atelier.getLibelle()); > } > public boolean onValid() { > =09if (tableInterv.getForm().isValid() && tableTps.getForm().isValid(= )) { > //Transfert des Inscriptions > =09} > return true; > } > public boolean onCancel() { > setRedirect(AdmAtelierPage.class); > return true; > } > public boolean onSecurityCheck() { > if (getContext().hasSession()) { > return true; > } else { > setRedirect(LoginPage.class); > return false; > } > } > } --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.