[tw.forms] #26: tw.forms can't display more than one form per page - fix

0 views
Skip to first unread message

Trac from toscawidgets.org

unread,
Apr 7, 2009, 10:49:10 AM4/7/09
to toscawidge...@groups.google.com
#26: tw.forms can't display more than one form per page - fix
------------------------+---------------------------------------------------
Reporter: droggisch | Owner:
Type: enhancement | Status: new
Priority: major | Version: 0.9
Keywords: |
------------------------+---------------------------------------------------
The current implementation of tw.forms can't deal with two forms being
displayed on one page & then being properly displayed with validation
errors. Additionally, cross-pollution of fields and errors can occur if
several forms on one page share the same name in a field.

The attached patches to tw.forms and ToscaWidgets fix this issue - without
breaking any existing tests, so I presume they are safe.

What happens is that the error_at_request and value_at_request-descriptors
get enhanced to store their respective content not only request-local, but
also qualified with the widget's id.

As result, a validated form will have the errors and values to re-display
attached to itself, instead of making them a request-global.

--
Ticket URL: <http://toscawidgets.org/trac/tw.forms/ticket/26>
tw.forms </trac/tw.forms>
tw.forms - Form building widgets

Trac from toscawidgets.org

unread,
Apr 24, 2009, 4:39:34 AM4/24/09
to toscawidge...@groups.google.com
#26: tw.forms can't display more than one form per page - fix
------------------------+---------------------------------------------------
Reporter: droggisch | Owner:
Type: enhancement | Status: new
Priority: major | Version: 0.9
Keywords: |
------------------------+---------------------------------------------------

Comment(by chrisz):

Looks good, but I'm not sure how we can unit test this.

--
Ticket URL: <http://toscawidgets.org/trac/tw.forms/ticket/26#comment:1>

Trac from toscawidgets.org

unread,
Apr 30, 2009, 6:11:54 AM4/30/09
to toscawidge...@groups.google.com
#26: tw.forms can't display more than one form per page - fix
------------------------+---------------------------------------------------
Reporter: droggisch | Owner: chrisz
Type: enhancement | Status: assigned
Priority: major | Version: 0.9
Keywords: |
------------------------+---------------------------------------------------
Changes (by droggisch):

* owner: => chrisz
* status: new => assigned


Comment:

I just added a test to the patch. Please review - if you remove the

qualify_with_id

from within tw.forms.core, you should see the test fail.

--
Ticket URL: <http://toscawidgets.org/trac/tw.forms/ticket/26#comment:2>

Trac from toscawidgets.org

unread,
Apr 30, 2009, 7:29:40 AM4/30/09
to toscawidge...@groups.google.com
#26: tw.forms can't display more than one form per page - fix
------------------------+---------------------------------------------------
Reporter: droggisch | Owner: chrisz
Type: enhancement | Status: assigned
Priority: major | Version: 0.9
Keywords: |
------------------------+---------------------------------------------------

Comment(by chrisz):

Ok, the test shows the expected behavior.

You should ask Alberto for push access to the two hg repositories.

--
Ticket URL: <http://toscawidgets.org/trac/tw.forms/ticket/26#comment:3>

Trac from toscawidgets.org

unread,
Jun 2, 2009, 3:21:34 PM6/2/09
to toscawidge...@groups.google.com
#26: tw.forms can't display more than one form per page - fix
------------------------+---------------------------------------------------
Reporter: droggisch | Owner: chrisz
Type: enhancement | Status: assigned
Priority: major | Version: 0.9
Keywords: |
------------------------+---------------------------------------------------

Comment(by droggisch):

I replaced the patch with a new one that works against latest tip.

--
Ticket URL: <http://toscawidgets.org/trac/tw.forms/ticket/26#comment:4>

Reply all
Reply to author
Forward
0 new messages