It's clumsy but what I did was duplicate my disabled fields with a dummy set of 
t:ids and condition them with an if on the same disabled property value and 
then I removed the validate attribute which works fine. In my else block I have 
the regular form to submit with the non disabled fields and the validate 
attribute.

What I find odd is that the client side invalid state is passed to the server. 
I don't see why the server side should deal with any invalid content from the 
client, but it seems the accordian allows invalid form submission for the 
fields that are not in view. So accordian subtly breaks client side validation. 
What I will do next is code the accordian so that any panels with errors in 
open on rerendering in sequence.

John
  ----- Original Message ----- 
  From: Nathan Quirynen 
  To: Tapestry users 
  Sent: Tuesday, August 27, 2013 7:46 AM
  Subject: Re: jquery.accordion with forms


  Disabled elements don't get submitted in HTML:

  http://www.w3.org/TR/html4/interact/forms.html#h-17.12

  " Disabled controls cannot be successful."

  You could use the readonly attribute, but this for some reason can only be 
used on input elements of type TEXT, PASSWORD or TEXTAREA

  On 26/08/13 23:50, John wrote:

It seems that the rendering is good, but there are some problems with form 
submission and rerendering when client validation fails (see my other recent 
thread) with some fields I show as disabled.

Removing either the disabled or client side validate attributes seems to work 
for submission. Of course I am left with a bit of a problem when invalid input 
is spread across more than 1 of the accordian tabs! Then you can't see some 
errors when the form is redisplayed.

John
  ----- Original Message ----- 
  From: Thiago H de Paula Figueiredo 
  To: Tapestry users 
  Sent: Monday, August 26, 2013 12:55 PM
  Subject: Re: jquery.accordion with forms


  On Mon, 26 Aug 2013 07:13:31 -0300, John <j...@quivinco.com> wrote:

  > Can a form be spread accross multipe accordion blocks?

  If they're all rendered inside the same Form component, I think yes, but I  
  haven't tested this. Could you please try it and post the results? :)

  -- 
  Thiago H. de Paula Figueiredo

  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org




  -- 

  Een klare kijk op aanvullende pensioenen

  Nathan Quirynen
  03 340 04 60 | 0494 28 45 15
  nat...@pensionarchitects.be

  Follow us on Web | Twitter | LinkedIn | RSS | YouTube

Reply via email to