4 Replies Latest reply on Mar 5, 2010 7:19 AM by jimmyoneshot

    Setting include in layout to false if the value of an item in an array collection is empty

    jimmyoneshot

      At the moment I have an array collection which is populated via a http request to a remote xml file. One of the fields it gets from this xml file is 'productoptiona' which in the app populates the label field of a radio button. What I want is for this radio button to not be included in the app IF the field productoptiona doesn't have any text in it in the array collection/xml file i.e. the selected product doesn't have an option a. The name of my array collection retrieved from the xml file is 'productsAC' and 'choicesTilelist' is the tilelist that's populated by this array collection which users will use to select products from.

       

      I applied the following code to the radio button's inludeInLayout property and I can't for the life of me figure out why it isn't doing anything.

       

      includeInLayout="{

       

      choicesTilelist.selectedItem.productoptiona!==''}"

       

      This code as far as I can tell should mean that if the selected product's productoptiona is NOT blank then it should be included in the app but if it is blank it should be excluded yet when I run the app this radio button is included in the app whether the productoptiona field is blank or not.