• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Boolean bindings in API files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Boolean bindings in API files


  • Subject: Re: Boolean bindings in API files
  • From: Pascal Robert <email@hidden>
  • Date: Fri, 11 Nov 2011 10:14:19 -0500

Le 2011-11-09 à 09:40, Kieran Kelleher a écrit :

> Try this:
>
> <wo:AvailableParts isSubPart="$false" isNewBuild="$true" spec="$someObject" />

That works.

> On Nov 9, 2011, at 8:52 AM, Pascal Robert wrote:
>
>> I have a question about boolean bindings in API files. If I add a binding with a Boolean type, when I call the component with that binding, the binding should not have quotes, e.g.:
>>
>> <wo:AvailableParts isSubPart=false isNewBuild=true spec="$someObject" />
>>
>> If I add quotes, I get:
>>
>> While trying to set the field "isSubPart" on an object of type com.obzerv.fragments.AvailableParts we expected a boolean but received a java.lang.String with a value of   false. This often happens if you forget to use a formatter.
>>
>> Problem is: bindings of bundled WO components, like WOConditional, works fine with quotes. And the biggest problem is that reformatting the component in WOLips adds quotes, so I'm getting the exception if I forgot to remove the quotes.
>>
>> So, why it works for bundled WO components but not for my own bindings? My API file content is this:
>>
>> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>> <wodefinitions>
>>   <wo class="AvailableParts" wocomponentcontent="false">    <binding name="spec"/>
>>       <validation message="'spec' is a required binding.">
>>           <unbound name="spec"/>
>>       </validation>
>>   <binding defaults="Boolean" name="isNewBuild"/>
>>       <validation message="'isNewBuild' is a required binding.">
>>           <unbound name="isNewBuild"/>
>>       </validation>
>>   <binding name="transactionsForBuild"/>
>>   <binding defaults="Boolean" name="isSubPart"/>
>>       <validation message="'isSubPart' is a required binding.">
>>           <unbound name="isSubPart"/>
>>       </validation>
>>   </wo>
>> </wodefinitions>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Boolean bindings in API files (From: Pascal Robert <email@hidden>)
 >Re: Boolean bindings in API files (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: Raw SQL with bindings
  • Next by Date: Problem with the WebObjects, WOLips and Wonder Tutorial, Part 1
  • Previous by thread: Re: Boolean bindings in API files
  • Next by thread: Cheat sheet for D2W to EXCEL?
  • Index(es):
    • Date
    • Thread