CDE: Autocomplete components and prpt in an iframe
Preface: Love all the work that has went into CDE/CDF and I'm not trying to bust anyone's chops, but I always assume I'm doing something wrong first and it's been a real pain to do this correctly.
Ok, I decided to make a simple dashboard to do auto completes on our customer names and spit out a single page report on various data related to them including sales and trends.
So I created a CDE dashboard, created a row and two columns, named them, then created a datasource to retrieve the customer names, a text component to give the user a prompt and an "Auto complete component". I connected the component up to the data and all was fine except:
1. Alignment of the text component was vertical-align: top as was the auto complete box. Though the auto complete box actually extended outside the row at the top, cutting off the top border of the box.
2. So I created a css style and applied it to the row expecting it to be inherited, background-color was, that's about it.
3. Applied the style to the columns (divs) and received the same result.
4. Firebug showed me that my css class was having keys filtered out.
5. So I changed the text component to a simple html <p> with the class, instant fix for that. However the auto complete would not respond to any attempts to get it 'down'.
6. Created a spacer row with the same back color, that sort of fixed it, had to correct the text html (prompt) with different padding.
7. This screwed up the rounded corners however...so...I finally gave up and moved to the Simple Autocomplete Component
Simple Autocomplete Component
1. This looked better, though I had to change the datasource to accept the search parameter which made more sense to me.
2. Looking good. The thing played nicely in the column. Everything was looking good.
3. Created my report at this time and a simple parameter. Set the parameter in the Simple Autocomplete and set a listener in the PRPT component.
4. First issue was when I selected the item in the autocomplete before the accordian window closed the report tried to refresh, ie: the fireChange went off with the list out.
5. And because of this it was was sending only the letters typed into the box. ie: if I had typed "fed" and had selected "Federal Express" it was pushing "fed" into the
parameter and nothing was found.
6. I discovered this by unhiding the parameter box in the PRPT Component.
7. I was also expecting the additional customer ID number I had passed as part of the query not the display name, just as a regular dropdown would give me when the value was queried. This is probably not a bug just something that isn't part of the component.
8. So I removed the "parameter" from the autocomplete component, stuck in a PostExecute function, set the parameter variable to the getValue() of the autocomplete component and fired the change.
9. This did not work.
10. There is some problem with the report in an iframe wherein the parameter is getting initially ignored when the report refreshes. I haven't tried to debug it beyond noting that if I show the parameters in the PRPT component, the proper value shows up, but the report fails, however it DOES run after I hit the "View Report" button in the report viewer.
11. I removed the iFrame option from the PRPT component and now it just works sweet. Still alot of work and a great deal of sludging through web console to come up with a simple screen.
Hope this helps someone.
Btw: This is in the latest version of Firefox with 4.5 BI and the latest (I believe version of ctools)
I've 'fixed' my iframe issue with the PRPT component. Bleh, I had to execute the report at start otherwise I guess it isn't setup right. Must have something to do with the IFRAME code.