On Aug 25, 2011, at 2:01 PM, David Avendasora wrote:

> :-/
> 
> Yep. That "works". The radio button uiMode is ugly as sin, and uses 
> table-based layout... sigh.

Well I did mention a subclass (^_^)  My radio button UI is validating semantic 
XHTML using fieldsets and legends and labels, oh my!

https://github.com/nullterminated/ponder/tree/master/ERR2d2w/Components/Nonlocalized.lproj/R2D2WQueryBoolean.wo

> 
> If only Git didn't totally frustrate me... and I knew CSS better...
> 
> Anyway, out of curiosity, what kind of rule do you use to specify 
> ERD2WCustomQueryBoolean? I've got:
> 
> 100 : (task = 'query' and not (attribute = null) and attribute.className = 
> 'java.lang.Boolean') => componentName = "ERD2WCustomQueryBoolean" 
> [com.webobjects.directtoweb.Assignment]

I use:

31 : (task = 'query' and (smartAttribute.className = 'java.lang.Boolean' or 
((smartAttribute.userInfo.erPrototype = 'Boolean' or 
smartAttribute.userInfo.erPrototype = 'BooleanYesNo' or 
smartAttribute.valueType = 'c') and (smartAttribute.className = 
'java.math.BigDecimal' or smartAttribute.className = 'java.lang.Number')))) => 
componentName = R2D2WQueryBoolean [com.webobjects.directtoweb.Assignment]

Same as ERD2W, but one point higher.

Ramsey

> 
> Maybe I should just use 1 and 0 in my DB column instead of true and false.
> 
> Dave
> 
> 
> On Aug 26, 2011, at 12:08 AM, Ramsey Gurley wrote:
> 
>> Hi Dave,
>> 
>> Have you tried an ERD2WCustomQueryBoolean instead? I use a subclass of that 
>> in my framework and I don't recall having issues like this one.
>> 
>> Ramsey
>> 
>> On Aug 25, 2011, at 12:17 AM, David Avendasora wrote:
>> 
>>> Hi all,
>>> 
>>> I'm have a boolean (in the DB as a VARCHAR(5), using the Wonder boolean 
>>> prototype) attribute that I want to be able to search on. When I search 
>>> using a text field (like you get on the default Query All 
>>> page(ERMODQueryEntitiesPage) it works as expectd. Typing true, True or TRUE 
>>> all work just fine for searching. 
>>> 
>>> But if I use the D2WQueryBoolean or ERD2WQueryBooleanRadioList on the 
>>> normal Query page it doesn't work.
>>> 
>>> When searching for true, the DB query has: 
>>> When searching for false, the DB query has: WHERE t0."IS_DUPLICATED" = '0'
>>> 
>>> So it's converting the boolean to 0 and 1, and then searching in the DB for 
>>> that number as a string. Uhg.
>>> 
>>> When I do an update, it does: "IS_DUPLICATED" = 'true'
>>> And since that column is a locking column, the WHERE clause has:  
>>> "IS_DUPLICATED" = 'false'
>>> 
>>> So it appears that the D2WEditBoolean is properly converting the boolean to 
>>> a String. 
>>> 
>>> Why don't either D2WQueryBoolean or ERD2WQueryBooleanRadioList?
>>> 
>>> Is there a rule I'm missing?
>>> 
>>> Dave
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>> 
>>> This email sent to [email protected]
>> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to