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.
Well I'm futzing with adobe flex and it's REALLY HARD TO LEARN!!!! I'm using Flex Builder Pro 3 WITHOUT IB's Enable to see what I can do and I can't do much cuz it's REALLY HARD TO LEARN!!!! The syntax is intense!!!! But anyway, the point eventually is to have an HTML file with some Flex in it and update stuff OR have a Flex app that calls Webfocus to get data and update Flex components.
Sooooooooo................. Here's my newbie question. With an existing DataGrid on the Flex form, I want to get a couple of dates, press a button, have a fex run in the background and update the DataGrid with the XML results. Easy right? Well - let's forget about getting dates via a DateField component for now. I can fire off the fex but cannot get the DataGrid to display my updated results. I can get the DataGrid to load a pre-existing XML file's contents upon startup but that's it. Can anyone offer some direction here?
I use HTTP Services all the time. Here is a simple example, calls the WebFOCUS program carinst in the ibisamp folder. One of Many benefits with WebFOCUS Flex Enable, is that it parses the results and provides you with an ArrayCollection that can be easily used as a dataProvider.
var myHTTPService = new HTTPService();
myHTTPService.url = "/ibi_apps/WFServlet";
var parms:Object = new Object();
parms.IBIF_ex = "carinst";
parms.IBIAPP_app = "ibisamp";
parms.COUNTRY = "ENGLAND";
parms.RANDOM = Math.random();
myHTTPService.request = parms;
myHTTPService.method = "POST";
myHTTPService.resultFormat = "e4x";
myHTTPService.addEventListener(ResultEvent.RESULT, resultService);
myHTTPService.addEventListener(FaultEvent.FAULT, faultService);
myHTTPService.send();
Thank you gentlemen for the code snippets but it's just not coming together for me. Any chance that either of you could provide a complete mini application that loads a datadrid dynamically?
Waz - I am generating my own simple XML file that can be read properly. But I'm trying to press a button, run the fex, load the new XML into a datagrid. Seems pretty simple and straight forward but it ain't happening.... :-)
Is there a reason why you're NOT using the FlexEnable or you just haven't got to that part yet?
Stingray's snippet should work. But like Waz says, it returns a table - then you have to make that into something that flex can use.
However, going one step further into FlexEnable (they hide some of the difficult magic from you) It's really straightforward using a simple URL call. Here's an MXML snippet:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:ibi="http://www.informationbuilders.com" >
<mx:Script>
<![CDATA[
import mx.core.IUIComponent;
// Public Variables
public var fex:String="http://servername/ibi_apps/WFServlet?IBIF_ex=carxml&IBIAPP_temp=BASEAPP";
// Get data for policy
public function getFex():String {
var fex0:String = fex;
return fex0;
}
]]>
</mx:Script>
<ibi:ibiCanvas x="0" y="0" width="1086" height="780" id="ibicanvas">
<ibi:ibiDataGrid id="mainGrid" seturl="{getFex()}" ibiAddRandom="true" y="82" width="1038" x="24"/>
</ibi:ibiCanvas>
</mx:Application>
All it requires is a procedure (carxml) in baseapp that contains ON TABLE PCHOLD FORMAT XML at the end.
The magic is in the seturl property on the ibiDataGrid.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I am not using Flex Enable cuz we don't own it yet and I'm not sure that we will at the current cost. Sooooo......... I'm trying to make this work outside of Enable.
And it looks like IB has done a nice little encapsulation of the Flex mess but I'd like to pull this off without Enable if possible. I'm getting there:
The code above reads an XML file that I created using WebFocus and populates a data grid but I can't figure out how to pass the parameters in the fex URL or how to refresh the grid. That is, click a button which runs the fe with new parameters and loads the XML data.
:-(
I'm thinking that I'm over my head in this Flex stuff without the Enable piece.
After going through a big development project recently, it has been really nice to have the additional WF pieces available. But I also gained a better understanding of Flex without the WF pieces and realized that much of the additional functionality could be accomplished without FlexEnable.
That being said, you DO NOT gain any additional power / flexibility / speed / (put your common IBI response to the question here) by having it on a big server as opposed to a small server. The enablement of features is at the development tool level. So the pricing of the product is a little "out there."
However, I have loved working with FlexEnable and I'm glad we were able to swing the purchase. Many of the struggles that Norm has experienced I did not have to worry about, and the support from IBI has been excellent, although the documention is extremely sparse. Next version coming soon!!
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
We may get the product but it would nice if IB would provide a trial that you see the value of their offerings.
I've put about 7 days straight into this and find the code and web examples are too abstract to make the connections needed for Webfocus. I'm about ready to throw in the towel. I'm also looking at just using a javascript framework that has a ton of plug-ins like JQuery or something like that.
Wow!!! That is some serious code there. Thanks for posting such a complete example and with my data too!
There is stuff in there that I never would have figured out for a long time. I compiled the code and it does load the grid with my data. Woo Hoo!!! It does throw an Actionscript error but it appears in the little extra stuff you add related to the events/parameter lists. (Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.) No biggie to me as you certainly illustrated the process with your code in the "call" function and the datagrid.
I did come up with an alternative method to call the fex with user-input dates and populate the grid but yours is cleaner, I think. Please see below:
If you have time to briefly review the code I inserted I would appreciate your comments about why my solution sucks compared to yours.
Thanks so much. This was really helpful. Although I gotta say that Flex overall is kicking my arse. I wanna put all the cool things that I have been doing with WebFocus and Javascript into Flex but I'm thinking there are just too many moving parts for me to deal with. I'm wondering out loud how much Enable will really help out?
Thanks again,
NorbThis message has been edited. Last edited by: Norb Eckert,