Dynamic dropdown menu Hi,
Let me put my work briefly -
My JS class extends DwtComposite. During instantiation it renders the HTML using a template. Rendering method adds DwtButton and calls for menu AjxCallback. This callback creates dropdown menu which then be set to DwtButton.
Problem is - this callback gets a call only once. If I add a button listener to DwtButton then menu callback doesn't work.Thus I can either add menu AjxCallback or a button listener not both.
Is there any way to add a listener which will help to render the udpated HTML everytime user clicks on the menu button. What I am looking for is - to have a server call everytime user clicks on menubutton, fetch udpated data and display it in menu.
Any pointers, examples on this are highly appreciated.
Thanks! |