Click Framework  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: CLK-337
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Malcolm Edgar
Reporter: Bob Schellink
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Click

Form#clearValues clears hiddenFields

Created: 15/Mar/08 09:47 AM   Updated: 15/Mar/08 11:13 PM
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 1.5 M1 , 1.4.1


 Description  « Hide
ClearValues clears the forms hidden fields as well. This is particularly problematic since it can clear the forms submit token.

I would think this method should not clear hidden fields.

At the least it should skip the SUBMIT_CHECK button.

CayenneForm and HibernateForm also uses HiddenFields. Calling clearValues on these forms might be problematic too.

 All   Comments   Change History      Sort Order:
Malcolm Edgar [15/Mar/08 01:48 PM]
The use case for this method is in a page which is used to create entities, i.e. you save a new entity and then want all the fields cleared so you can reuse the form again to create a new entity. In this scenario with a CayenneForm its important to clear the hidden id value, so the form is in a create new entity state.

I can see with the SUBMIT_CHECK that you would not want to clear this field, I can also imagine there are other scenarios where you want only to clear some of the fields. I suppose in the latter case it is up to the developer to decide what they need cleard.

regards Malcolm Edgar

Bob Schellink [15/Mar/08 11:13 PM]
clearValues won't clear SUBMIT_CHECK HiddenField.

fixed checked into trunk and backported to 1.4.1