You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Norbert Sándor <de...@erinors.com> on 2005/11/04 18:25:14 UTC

tabbed form validation

Hi,

I have a Form for editing large amount of data. To be more user friendly I divided the fields to separate tabs.
The problem is that because only 1 tab page is rendered at a time (the currently selected one), fields on other pages are not validated.
This may lead to database exceptions because of the invalidated data.

Do you have any idea what is the best solution for this problem?

BR,
Norbi

Re: tabbed form validation

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ughh...I was saving that feature for the next release, but I plan on adding
this functionality to tacos soon-ish. I have a demo page for two other
components that I'd like to add this functionality to in order to
demonstrate the full flickr-explorer functionality. (ie drag drop/fisheye/
tabs). I think what you want will be easy after that, but I probably won't
be working on it for a while because I'm concentrating on the holy grid
component.

j
On 11/4/05, Norbert Sándor <de...@erinors.com> wrote:
>
> Hi,
>
> I have a Form for editing large amount of data. To be more user friendly I
> divided the fields to separate tabs.
> The problem is that because only 1 tab page is rendered at a time (the
> currently selected one), fields on other pages are not validated.
> This may lead to database exceptions because of the invalidated data.
>
> Do you have any idea what is the best solution for this problem?
>
> BR,
> Norbi
>

Re: tabbed form validation

Posted by Norbert Sándor <de...@erinors.com>.
The tabs are only to separate and simplify the user interface. All fields on 
the tabs belong to one object.
Therefore I save the data to DB when the user presses the SAVE button.
When she/he changes the current tab, nothing is saved to the DB, only a 
submit is performed.

Currently I switched to a clientside solution: all tabs are rendered 
therefore they will be validated as well. Probably I will use this solution 
because of lack of time :|

BR,
Norbi

----- Original Message ----- 
From: "Ron Piterman" <rp...@gmx.net>
To: <ta...@jakarta.apache.org>
Sent: Saturday, November 05, 2005 12:56 PM
Subject: Re: tabbed form validation


> Hi Norbert -
> well it depends on how you implement the tabs, when do you save the data 
> aso -
>
> if you dump the data to the database on each Tab's submit, than you must 
> do so also when switching tabs , but there are many many possiblities 
> there - its hard to tell -
> how is the workflow generally going?
> Cheers,
> Ron
>
>
>
> ציטוט Norbert Sándor:
>> Hi,
>>
>> I have a Form for editing large amount of data. To be more user friendly 
>> I divided the fields to separate tabs.
>> The problem is that because only 1 tab page is rendered at a time (the 
>> currently selected one), fields on other pages are not validated.
>> This may lead to database exceptions because of the invalidated data.
>>
>> Do you have any idea what is the best solution for this problem?
>>
>> BR,
>> Norbi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: tabbed form validation

Posted by Ron Piterman <rp...@gmx.net>.
Hi Norbert -
well it depends on how you implement the tabs, when do you save the data 
aso -

if you dump the data to the database on each Tab's submit, than you must 
do so also when switching tabs , but there are many many possiblities 
there - its hard to tell -
how is the workflow generally going?
Cheers,
Ron



ציטוט Norbert Sándor:
> Hi,
> 
> I have a Form for editing large amount of data. To be more user friendly I divided the fields to separate tabs.
> The problem is that because only 1 tab page is rendered at a time (the currently selected one), fields on other pages are not validated.
> This may lead to database exceptions because of the invalidated data.
> 
> Do you have any idea what is the best solution for this problem?
> 
> BR,
> Norbi


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: tabbed form validation

Posted by Jesse Kuhnert <jk...@gmail.com>.
For the sake of asking for help I've pasted a previous email in here:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I don't know of a workaround for this one. You can choose which tabs div
gets re-rendered, but how on earth would you specify that you only want
components A,B,C validated but not the rest?

Well...I do in fact know exactly how to do this but it feels very icky.
You'd have to handle it from the AjaxForm. You ~could~ subclass it (at
whichever point the form goes through its components and validates them(it
calls rewindFormComponent)...

So.....The only other thing to do then is somehow pass a parameter of
"validateComponents" to your form class that will allow it to dynamically
choose which components to validate. Maybe a hidden field that you set the
value of via javascript before submitting from whichever button will do
this?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

This would be incredibly easy to add into the tacos AjaxForm, so if someone
would like to take a crack at it (and it's good) I'd love the
contribution...I don't have time to do this right now.

If you do do it please use this js package as your basis:
http://archive.dojotoolkit.org/nightly/tests/widget/test_Tabs.html

jesse

RE: tabbed form validation

Posted by Patrick Casey <pa...@adelphia.net>.
	The tabset doesn't do as-needed rendering; it renders all the tabs
and just hides them on the screen. So if you wrap all your tabs inside of
one form, then every tab, not just the current tab, gets submitted when you
submit your form.

	--- Pat

> -----Original Message-----
> From: Norbert Sándor [mailto:developer@erinors.com]
> Sent: Friday, November 04, 2005 10:12 AM
> To: Tapestry users
> Subject: Re: tabbed form validation
> 
> I checked out both tab components on tassel but none of them seems to
> solve
> my problem.
> I will experiment with them more, thanks for the suggestion.
> 
> BR,
> Norbi
> 
> ----- Original Message -----
> From: "Patrick Casey" <pa...@adelphia.net>
> To: "'Tapestry users'" <ta...@jakarta.apache.org>
> Sent: Friday, November 04, 2005 6:40 PM
> Subject: RE: tabbed form validation
> 
> 
> 
> Did you try the tabset component off of tassel? It may solve your
> problems.
> 
> http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=S
> Ta
> bSet
> 
> --- Pat
> 
> > -----Original Message-----
> > From: Norbert Sándor [mailto:developer@erinors.com]
> > Sent: Friday, November 04, 2005 9:25 AM
> > To: tapestry-user
> > Subject: tabbed form validation
> >
> > Hi,
> >
> > I have a Form for editing large amount of data. To be more user friendly
> I
> > divided the fields to separate tabs.
> > The problem is that because only 1 tab page is rendered at a time (the
> > currently selected one), fields on other pages are not validated.
> > This may lead to database exceptions because of the invalidated data.
> >
> > Do you have any idea what is the best solution for this problem?
> >
> > BR,
> > Norbi
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: tabbed form validation

Posted by Norbert Sándor <de...@erinors.com>.
I checked out both tab components on tassel but none of them seems to solve 
my problem.
I will experiment with them more, thanks for the suggestion.

BR,
Norbi

----- Original Message ----- 
From: "Patrick Casey" <pa...@adelphia.net>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Friday, November 04, 2005 6:40 PM
Subject: RE: tabbed form validation



Did you try the tabset component off of tassel? It may solve your
problems.

http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=STa
bSet

--- Pat

> -----Original Message-----
> From: Norbert Sándor [mailto:developer@erinors.com]
> Sent: Friday, November 04, 2005 9:25 AM
> To: tapestry-user
> Subject: tabbed form validation
>
> Hi,
>
> I have a Form for editing large amount of data. To be more user friendly I
> divided the fields to separate tabs.
> The problem is that because only 1 tab page is rendered at a time (the
> currently selected one), fields on other pages are not validated.
> This may lead to database exceptions because of the invalidated data.
>
> Do you have any idea what is the best solution for this problem?
>
> BR,
> Norbi



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: tabbed form validation

Posted by Patrick Casey <pa...@adelphia.net>.
	Did you try the tabset component off of tassel? It may solve your
problems.

http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=STa
bSet

	--- Pat

> -----Original Message-----
> From: Norbert Sándor [mailto:developer@erinors.com]
> Sent: Friday, November 04, 2005 9:25 AM
> To: tapestry-user
> Subject: tabbed form validation
> 
> Hi,
> 
> I have a Form for editing large amount of data. To be more user friendly I
> divided the fields to separate tabs.
> The problem is that because only 1 tab page is rendered at a time (the
> currently selected one), fields on other pages are not validated.
> This may lead to database exceptions because of the invalidated data.
> 
> Do you have any idea what is the best solution for this problem?
> 
> BR,
> Norbi



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org