Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED by case] question about linking/nesting flex enable controls

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED by case] question about linking/nesting flex enable controls
 Login/Join
 
Silver Member
posted
Hi all,

I'm using Flash Builder and Flex Enable to create a dashboard.

I have a fex data source the I'm bringing into a datagrid. The datagrid has three columns: Segment, Application and Product. This is a hierarchy. Choose a particular Segment and you get certain items in Application, choose an Application and you get certain products.

I have three ibicomboboxes, one for each column. cbSegment (the top of the hierarchy) points to the datagrid as the ibiParent and displays Segment only, cbApplication is also pointed to the datagrid with ibiParent, but also has cbSegment as the ibiFilterParent. These two controls work fine. You change the segment and the items in application are changed.

My problem is with the third combobox, cbProducts. It also points to the datagrid as ibiParent, and has cbApplication as the ibiFilterParent. This control filters properly IF you make a change to cbApplication, but on load of the application, and when you change cbSegment the cbProduct shows ALL the items for the SEGMENT, not filtered by Application.

http://tinypic.com/view.php?pic=sn02h1&s=7

Here's a screenshot that might make it more clear. You can see that the cbProduct which should ONLY be listing 2-Wheel Tractors, is listing ALL Products for that segment.

Here's my code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1000" minHeight="540" height="540" maxHeight="540" maxWidth="1000" width="1000" xmlns:ibi="http://www.informationbuilders.com">
	<ibi:ibiCanvas left="0" top="0" bottom="0" right="0" id="mainCanvas" backgroundColor="#FFFFFF">
		<mx:TabNavigator top="10" left="10" bottom="0" right="0" id="mainTabNavigator" backgroundColor="#a0a0a0" dropShadowEnabled="true" shadowDistance="4">
			<mx:Canvas label="OEM Data" width="100%" height="100%" id="tabOEMData">
				<ibi:ibiDataGrid x="31" y="158" width="702" id="mainDataGrid" visible="true" ibiGroupBy="SEGMENT,APPLICATION,PRODUCT" ibiUseColumns="SEGMENT,APPLICATION,PRODUCT" ibiUseFiltered="true" height="323">
					<ibi:seturl><![CDATA[https:url to fex]]></ibi:seturl>
				</ibi:ibiDataGrid>
				<ibi:ibiComboBox x="10" y="25" ibiParent="mainDataGrid" ibiUseColumns="SEGMENT" ibiGroupBy="SEGMENT" ibiColumn="SEGMENT" ibiFilterShowALL="false" id="cbSegment" ibiFilterAble="true" width="180"/>
				<ibi:ibiComboBox x="206" y="25" ibiParent="mainDataGrid" ibiUseColumns="APPLICATION" ibiGroupBy="APPLICATION" ibiColumn="APPLICATION" ibiFilterShowALL="false" id="cbApplication" ibiFilterParent="cbSegment" ibiFilterAble="true" width="210" ibiFilterCond="EQ" ibiUseFiltered="true"/>
				<ibi:ibiComboBox x="430" y="25" ibiParent="mainDataGrid" ibiUseColumns="PRODUCT" ibiGroupBy="PRODUCT" ibiColumn="PRODUCT" ibiFilterShowALL="false" id="cbProduct" ibiFilterParent="cbApplication" width="210" ibiFilterCond="EQ" ibiFilterAble="true" ibiUseFiltered="true"/>
				<mx:Label x="51" y="6" text="Segment"/>
				<mx:Label x="244" y="6" text="Application"/>
				<mx:Label x="457" y="6" text="Product"/>
			</mx:Canvas>
			<mx:Canvas label="Regional Data" width="100%" height="100%">
			</mx:Canvas>
			<mx:Canvas label="Trends" width="100%" height="100%">
			</mx:Canvas>
		</mx:TabNavigator>
	</ibi:ibiCanvas>
	
</mx:Application>

  

Thanks for any help.

This message has been edited. Last edited by: Kerry,


7.7.2, Windows, html
 
Posts: 34 | Location: Minnesota | Registered: September 03, 2010Report This Post
Gold member
posted Hide Post
Try setting the ibiFilterDefault for each of the combo boxes. Second, for Segment, set the ibiFilterSibling to Application and for Product, set it to Segment.



Windows: WF 7.6.2: SQL Server 2008 R2
 
Posts: 86 | Location: Chicago | Registered: August 03, 2007Report This Post
Silver Member
posted Hide Post
What should I set ibiFilterDefault to?

Leaving ibiFilterDefault blank I tried setting the ibiFilter siblings as you said and the application crashes.

Thanks for your help.


7.7.2, Windows, html
 
Posts: 34 | Location: Minnesota | Registered: September 03, 2010Report This Post
Silver Member
posted Hide Post
I was incorrect in my first post, both the second and third combobox controls list ALL items in Segment. They only filter when you make a selection from the upstream control. Example: on load Segment lists all segment items (as it should), Application lists All application items in ALL Segments (not what I want) and Product lists ALL Product item for ALL Segments.

If you change Segment, Application correctly lists application items for ONLY that segment. Product changes to show the first item in the Application list, but when you click the pulldown it is showing ALL items in the selected Segment.

I have tried using the various ibiFilter options with no success. I could use some actionscript code, but it seems like these controls SHOULD be able to be chained natively, without writing code. Maybe that's wrong...


7.7.2, Windows, html
 
Posts: 34 | Location: Minnesota | Registered: September 03, 2010Report This Post
Gold member
posted Hide Post
ibiFilterDefault would be used to set the default filter for the combo box - eg ENGLAND if you wanted ENGLAND to be the default country when it opened. If you are not interested in using the ibiFilterDefault, then make sure the attribute is not set as part of the ibiComboBox.

Where you are wanting to nest the filters (chained), then you would want to use ibiFilterParent instead of ibiFilterSibling.

Here is an example.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" 
				xmlns:ibi="http://www.informationbuilders.com"
				applicationComplete="init()">
	
	<mx:Script>
		<![CDATA[
			[Bindable]
			public var fex:String;
			
			public function init():void
			{
				fex = "TABLE FILE CAR SUM SALES BY COUNTRY BY CAR BY MODEL\n";
				fex += "ON TABLE PCHOLD FORMAT XML\n";
				fex += "END\n";
				fex = encodeURI(fex);
			}
		]]>
	</mx:Script>
	<ibi:ibiCanvas width="887" height="559">
		<ibi:ibiDataGrid id="CARDATA" seturl="http://localhost/ibi_apps/WFServlet?IBIF_adhocfex={fex}" x="44" y="72"/>
		<ibi:ibiComboBox x="44" y="42" id="cmbCountry" ibiParent="CARDATA" ibiColumn="COUNTRY" ibiFilterAble="true"/>
		<ibi:ibiComboBox x="212" y="42" id="cmbCar" ibiParent="CARDATA" ibiColumn="CAR" ibiFilterAble="true" ibiFilterParent="cmbCountry"/>
		<ibi:ibiComboBox x="380" y="42" id="cmbModel" ibiParent="CARDATA" ibiColumn="MODEL" ibiFilterAble="true" ibiFilterParent="cmbCar"/>
	</ibi:ibiCanvas>
</mx:Application>



Windows: WF 7.6.2: SQL Server 2008 R2
 
Posts: 86 | Location: Chicago | Registered: August 03, 2007Report This Post
Silver Member
posted Hide Post
Received this code from IBI and this solves my issue.

If you wait for the data to finish loading using ibiDataEvent listener, then call doFilter method on the parent combo box, the filter should be properly applied to the nested combo box children because now it will wait for everything to be ready to apply the filter. The following is the sample code. You need to call this init function in creationComplete property on mx:Application.

private var initialFilterSet:Boolean = false;

private function init():void
{
this.addEventListener(ibiDataEvent.DATA_LOADED, ibiDataLoadedHandler);
}

private function ibiDataLoadedHandler(e:ibiDataEvent):void
{
if( e.componentID == 'mainDataGrid' ){
/*
Prevent endless looping by checking initialFilterSet variable.

*/
if( !initialFilterSet ){
initialFilterSet = true;
mainCanvas.doFilter('cbSegment');
mainCanvas.doFilter('cbApplication');
}
}
}

With this code my comboboxes now filter correctly. This is something that is supposed to be fixed in a later version of Flex Enable, but this workaround solves the problem until it's fixed.


7.7.2, Windows, html
 
Posts: 34 | Location: Minnesota | Registered: September 03, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED by case] question about linking/nesting flex enable controls

Copyright © 1996-2020 Information Builders