So to elaborate on what we said before, we don't have a solution for adding native HTML links outside widgets that does not involve a deep dive into native browser behavior, and if you were to go that direction, it's way outside of our charter to help.
And we also would not recommend spending effort on this approach. Enterprise applications tend to build up a lot of useful context in a page, and it's a focus on SmartGWT to re-use already loaded data wherever possible, for the best performance and scalability. Popping other browser tabs and browser windows works against this performance advantage.
If you want a tabbed interface, use a TabSet at the top level and provide normal SGWT menus to allow things to be opened in new tabs.
Announcement
Collapse
No announcement yet.
X
-
Originally posted by IsomorphicWhat are your expectations for further responses?
If I give up the hope that the current interactive behavior can be kept, and just want to add a plain, simple HTML link to a button (not just the title, but the whole button), how can I do that? (I understand that with this, the default event handling will be displaced, so the click handler would not be called.)
Leave a comment:
-
What are your expectations for further responses? Your questions have been answered, please read over the responses again.
Leave a comment:
-
Originally posted by IsomorphicDo you have a particular set of users in mind who are used to middle-clicking? Not too many people know about that browser, operating system and hardware-specific shortcut.
Leave a comment:
-
Originally posted by IsomorphicIHow you would handle event bubbling would most likely involve browser specific JS code added to the <a> - it could be rather involved
What causes the problem here? (Again, I am not really into browser internals, so I am aware that I might be really ignorant about this.)
Leave a comment:
-
OK, so going back one step:
1. From the current set of SGWT features, what is the closest thing to a true HTML link? I add a context click handler, pop up a menu, show an option to open this in new tab? That's it?
2. If I give up the hope that the current interactive behavior can be kept, and just want to add a plain, simple HTML link to a button (not just the title, but the whole button), how can I do that? (I understand that with this, the default event handling will be displaced, so the click handler would not be called.)
Leave a comment:
-
Do you have a particular set of users in mind who are used to middle-clicking? Not too many people know about that browser, operating system and hardware-specific shortcut.
Given that there is an alternative of creating normal SGWT UI elements for doing this, and given that embedding true links without somehow damaging normal interactivity could well be a deep dive into browser quirks and an ongoing maintenance nightmare, this would be an unlikely qualifier for feature sponsorship, sorry.
Leave a comment:
-
Originally posted by IsomorphicIn all these cases you can add HTML to the title attribute (button, tab) or add it via formatter APIs (grids), so you could add your own <a HREF> element.
How you would handle event bubbling would most likely involve browser specific JS code added to the <a> - it could be rather involved,
and you might be better off just adding SGWT-based menu options to spawn a new browser window / tab.
Popping up a menu and having the user choose an option (from the list of one) feels too cumbersome to me. Directly adding the "open in new tab" function to the context click button would be confusing, because user expects this function to be on the middle click, and a menu on the right click.
Leave a comment:
-
There was a typo in the previous post, try re-reading it now that we've edited it and clarified.
As far as event bubbling, something unspecified would happen in both cases.
Leave a comment:
-
Originally posted by Isomorphicyou can add HTML to the title attribute as add it via formatter APIs,
How you would handle event bubbling would most likely involve browser specific JS code
(As I have mentioned, it's also acceptable for me if the link takes over the previous behavior, because the same effect can be reached via other codepath, too.)Last edited by csillag; 12 Feb 2010, 16:42.
Leave a comment:
-
In all these cases you can add HTML to the title attribute (button, tab) or add it via formatter APIs (grids), so you could add your own <a HREF> element. How you would handle event bubbling would most likely involve browser specific JS code added to the <a> - it could be rather involved, and you might be better off just adding SGWT-based menu options to spawn a new browser window / tab.Last edited by Isomorphic; 12 Feb 2010, 16:58.
Leave a comment:
-
Originally posted by IsomorphicI think we follow now. Would you expect the user to right click on the link and pick "Copy link location" to grab a link to spawn a new instance of the application?
Because while that could work, it would prevent you using context clicks for other purposes (eg, it's fairly common to put a context menu on a tab).
I would like to add links to the following components:
- IButton
- TabSet tabs
- ListGrid records
- TreeGrid records
Leave a comment:
-
I think we follow now. Would you expect the user to right click on the link and pick "Copy link location" to grab a link to spawn a new instance of the application? Because while that could work, it would prevent you using context clicks for other purposes (eg, it's fairly common to put a context menu on a tab).
Leave a comment:
-
Originally posted by IsomorphicWhat's the purpose here? Solely to populate the browser status bar with a link that cannot be copied/pasted until the user clicks the button? Why do this?
That's exactly the point: using the link, the user should be able to open a new window with a new copy of the application, where the new copy of the application would automatically go to the same state where the current copy would go, would the button be pressed.
Are you talking about a link *in addition to* the button or tab title, or making the existing title into a link? If the latter, since you say you don't want to change current behavior, what would click do: both switch the tab and pop up a separate window?
That's the ideal case. If this is not possible, it's also acceptable if the link just acts as a simple link: when clicked, takes the current window where it points to. (Since the application reacts to the history token changes, this would eventually result in the same behavior, as far as the user is concerned.)
However, in this case, the button basically stops being a button, which I do not really want, or need.
* * *
Please excuse me that I can not properly explain what I want; when I am ready, I will show you the working application, so you can see what I mean.
Leave a comment:
Leave a comment: