[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Model and Display Boolean Attributes



<<
I'm modeling my boolean attribute in EOModler as an NSNumber in Obj-C
with Integer as the internal data type. Now, how do I get Direct to Web
to display the value as YES or NO (or a check mark)
>>

your modeling is correct; Unfortunately at this time, there are no
built-in components for boolean values in D2W; for what it's worth, this
will be corrected in 4.1.

Here is a work-around for the display problem: if you are using custom
EOs, then add a custom method called say 'boolImage' which return
"yes.gif" if the bool is value is !=0 or "no.gif" if it is 0. Add a
couple of graphics called yes.gif and no.gif in your project. Next go to
the Assistant, and ask to add 'boolImage' as a custom key to your list
page and tell the Assistant to use DisplayImage (or
DisplayImageFromPath, I can't remember which is which) for that key.
That should do the trick.. For query and edit, I'm afraid you will have
to wait for 4.1 ..

  hope this helps,

		-P