I want to implement online (context) help for my primefaces pages. I am considering the id of a component as the context_id and for each context Id, help text is available in the database. When user wants help on a component, focus should be there in the component and user has to
Method 1. Press F1-key
Method 2. Move mouse on to a (help) icon
Then help text from the database for the context id as per the currently focused component id will be picked and shown on screen.
How can we get the currently focused component id without using javascript / jQuery ?
Following jQuery is the solution for my problem. This Updates a hidden inputText on visiting each component (but skips this on click of help button itself). On click of help button, the id of the active component is obtained from the hidden inputText and help is extracted for that ID from resource bundle (My resource bundle is created from database having the help text for each component ID)