-
1. Re: How to write search for "None" associations using seam & hibernate
kragoth Mar 11, 2009 3:31 AM (in response to singhjess)My general solution to this is to not overload the drop down menu.
Instead just create yourself a checkbox below your list that says:
'Find unassiged stories.'You can choose whether this become an and condition or only searches on the isNull values.
But not sure if this fits with your design :)
-
2. Re: How to write search for "None" associations using seam & hibernate
swd847 Mar 11, 2009 7:06 AM (in response to singhjess)You need to write a custom converter.
First create a class called something like 'NoPersonAssigned' that inherits from Assignee (or whatever). The create a custom converter that gives this special case a 'Magic value' such as -1. Add you NoPersonAssignedStory to your teamMemberList (you may wany to create a whole now list if this list is used in other places where 'NoPersonAssigned' does not make sense).
Now you can check in your backing bean login if story.assignee is an instance of NoPersonAssigned and if so add the appropriate criteria to the query.
-
3. Re: How to write search for "None" associations using seam & hibernate
singhjess Mar 12, 2009 1:11 PM (in response to singhjess)Thanks Stuart, I am going ahead with the custom converter approach.