Hi guys below is my xml
<xtimekey>
<xphysicians xphysname="john">
<xschedule xactivity="FOLLOW-UP" xdate="2009-05-26"/>
<xschedule xactivity="FOLLOW-UP" xdate="2009-05-26"/>
</xphysicians>
<xphysicians xphysname="karthik">
<xschedule xactivity="ANNUAL PHYSICAL" xdate="2009-05-26"/>
<xschedule xactivity="ANNUAL PHYSICAL" xdate="2009-05-26" />
</xphysicians>
</xtimekey>
my req is "mjohnsons" should be the title and two "FOLLOW-UP" and
"2009-05-26" should be the child i.e one below the other
and in the next column "karthik" should be the title and two "ANNUAL
PHYSICAL" and "2009-05-26" should be the child
the problem i am facing is if i put xphysicians as "xphysicians1" and
"xphysicians2" i am getting the required output
but my client needs in above format
my itemRenderer is
package comp
{
import mx.containers.HBox;
import mx.containers.VBox;
import mx.controls.Text;
import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.listClasses.BaseListData;
import mx.controls.listClasses.IDropInListItemRenderer;
public class TimeRenderer extends VBox implements
IDropInListItemRenderer
{
private var _listData:DataGridListData;
private var timeData:Text=new Text();
public function TimeRenderer()
{
super();
}
public function get listData():BaseListData
{
return _listData;
}
public function set listData(value:BaseListData):void
{
_listData = DataGridListData(value);
}
override public function set data(value:Object):void
{
this.removeAllChildren()
super.data=value;
var listXml:XMLList = data[_listData.dataField]..xschedule;
for each(var node:XML in listXml){
var hb:HBox = new HBox();
var timeText:Text = new Text();
var textData:Text=new Text();
timeText.text = no...@xtime;
// trace(" timeText.text", timeText.text);
timeText.toolTip="Last Name: "+no...@xlastname+"\n Physician:
"+no...@xphysician+"\n Duration: "+no...@xduration;
textdata.text=no...@xactivity;
textData.toolTip="Last Name: "+no...@xlastname+"\n Physician:
"+no...@xphysician+"\n Duration: "+no...@xduration;
if(textData.text=="FOLLOW-UP")
{
textData.styleName="firstHeaderTextColor";
timeText.styleName="firstHeaderTextColor";
}
if(textData.text=="ANNUAL PHYSICAL")
{
textData.styleName="restHeaderTextColor";
timeText.styleName="restHeaderTextColor";
}
hb.addChild(timeText);
hb.addChild(textData);
this.addChild(hb);
// trace("textData.text",textData.text)
}
}
}
}
any idea
--
Karthik.k
Mobile - +91-9894991640
http://kkarthikresume.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---