Has anyone noticed UI rendering inconsistencies within Flex applications. I am having issues with radio buttons and text controls inside a repeater. Below is a sample…
What would cause such inconsistencies? Computer performance, internet speed?
The repeater below has an XML web service acting as a data provider, using Flex's e4x support. Is there a threshold of data that can be rendered in a given Flex app?
Note that most of the time Flex renders the app ok, but most of the time is not good enough in this application.
Thanks.
alt text http://img87.imageshack.us/img87/1435/error3b.jpg
MXML Code below, as requested:
<mx:Repeater id="rpQuestions" width="100%" height="100%" dataProvider="{srv.lastResult..Question}">
<mx:Box backgroundColor="#FFFF99" width="100%">
<mx:Text styleName="questionText" text ="{rpQuestions.currentIndex+1 +': ' +rpQuestions.currentItem.@QuestionText}" fontSize ="12" width="100%" selectable="false" />
</mx:Box>
<mx:HBox visible="{rpQuestions.currentItem..Image.length() > 0}" includeInLayout="{rpQuestions.currentItem..Image.length() > 0}">
<mx:Repeater id="rpImages" dataProvider=quot;{rpQuestions.currentItem..Image}" >
<mx:Image source="{rpImages.currentItem.@Path}" width="350" height="250" />
</mx:Repeater>
</mx:HBox>
<mx:Repeater id="rpAnswers" dataProvider="{rpQuestions.currentItem..Answer}" width="75%" height="75%">
<mx:HBox>
<mx:Spacer width="12" />
<!-- NOTE: the RadioButton's label property is not used because long text won't wrap. Instead we use a Text control. -->
<mx:RadioButton
groupName="{rpQuestions.currentItem.@QuestionID}"
value="{rpAnswers.currentItem.@AnswerID}"
click="_questionAnswerd(event)"
selected="{rpAnswers.currentItem.@Selected == '1'}"
/>
<mx:Text text="{rpAnswers.currentItem.@Answer}" width="600" selectable="false" />
<!-- End-->
</mx:HBox>
</mx:Repeater>
</mx:Repeater>
Best Answer
I would try to make sure that the hbox's inside the repeaters have a percentage set for the height (say 100% for the one with the radio buttons, its repeater which is set to 75%).
Or you could try to invalidate the display/size after the repeaters have finished creating the subcomponents ('repeatEnd' event).