I am using a section stack as a navigation region, and there are a couple of sections that do not really have sub-sections. For these, I would like for the section headers to be used as links (such as Home and Logout)
I browsed the Javadocs and thought maybe I could use sectionHeaderClick(), but I couldn't figure out how to properly use that. I found a couple examples in the forums for it, but they applied to the Javascript version and not GWT version.
If I have a couple sections in the stack and want to handle an event when those sections are clicked, how can I do it? Do I use sectionHeaderClick(), and if so, can anyone provide a simple example in GWT?
For example, when someone clicks the header that reads "Home", instead of opening and displaying a listgrid (what I use for links), I would rather it simply do
History.newItem("home");
But if possible, I would prefer it to only do this on certain headers, not all of them. Or, at the very least, be able to perform a check to see if it is one of two section headers, and if so fire the history item, if not then use default expand / collapse behavior.
Any tips?
I browsed the Javadocs and thought maybe I could use sectionHeaderClick(), but I couldn't figure out how to properly use that. I found a couple examples in the forums for it, but they applied to the Javascript version and not GWT version.
If I have a couple sections in the stack and want to handle an event when those sections are clicked, how can I do it? Do I use sectionHeaderClick(), and if so, can anyone provide a simple example in GWT?
For example, when someone clicks the header that reads "Home", instead of opening and displaying a listgrid (what I use for links), I would rather it simply do
History.newItem("home");
But if possible, I would prefer it to only do this on certain headers, not all of them. Or, at the very least, be able to perform a check to see if it is one of two section headers, and if so fire the history item, if not then use default expand / collapse behavior.
Any tips?
Comment