Tuesday, August 21, 2012

ADF and Coloured tooltips - 2 [and its limitations]

Reference: I have simply incorporated the approach presented here in my ADF application and the solution involves a bit of JQuery
http://tutorialzine.com/2010/07/colortips-jquery-tooltip-plugin/

This post follows on my earlier sneak peek but as I eventually learnt, this is quite limited in use and you might need to find specific uses for this. Still, here's my 11.1.2.1.0 workspace that uses this in case someone can share other ideas...

Does look nice where it works though... 


In general, styling of ADF components should be accomplished using skins and one shouldn't rely on  the "generated output" (html) as this can change across ADF releases.
For more on the correct approach to skinning, please refer: https://blogs.oracle.com/jdevotnharvest/entry/how_to_learn_adf_skinning

Also, coloured tooltips (and other similar styling) would only work for some components (outputText, goLink, commandLink) whose HTML output is generated with the 'text' attribute. 

More complex components appear like this in page source 
new AdfRichInputText('it1',{'shortDesc':'Green','maximumLength':6,'converter':new TrNumberConverter(null,'number',null,null,false,false,null,null,null,null,null,null)})

so that's probably why the complete tooltip style never gets applied. 
Now, back to coloured (or colored) tooltips. 

The solution involves:
A 'base' tooltip style (defined in colortip-1.0-jquery.css) that is meant to get applied to every tooltip (unless you override it by supplying another tooltip styleclass)
I haven't made any changes to the one I downloaded, except for referencing it in the home.jspx page. 


No comments: