History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1489
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Konstantin Pribluda
Votes: 1
Watchers: 1
Operations

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

Handling of unchecked checkboxes

Created: 30/Nov/07 02:26 AM   Updated: 02/Dec/07 09:35 AM
Component/s: None
Affects Version/s: 2.2.6
Fix Version/s: 2.2.7

File Attachments: 1. Java Source File BooleanTweaker.java (1 kb)
2. File checkbox.ftl (1.0 kb)

Environment: Any


 Description  « Hide
It is known, that browser do not send anything for unchecked checkoxes -
thus webwork in current state can not actively set "false" value to boolean fields
represented by checkbox.

This is a problem, when domain objects are not instantiated by action itself,
but loaded from somewhere else with already present state ( for example from database
via hibernate )


Proposed solution for this problem

1. Enhance simple checkbox template to provide marker false value
2. Provide additional interceptor taking care of marker values

Patches ( while files actually, as I use custom version ) are attached

 All   Comments   Change History      Sort Order:
Konstantin Pribluda - [30/Nov/07 02:27 AM ]
Trivial interceptor tweaking fake falses to correct parameter names.
use before vanilla parameter interceptor

tm_jee - [02/Dec/07 09:32 AM ]
I've added it into svn. Thanks Konstantin. I think you have access to the svn, so you could just add those features directly. :-)

Added test case and updated the docs as well.

cheers.

tm_jee - [02/Dec/07 09:35 AM ]
Resolving this issue. Thx Konstantin