Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Question: How to show the link target in the browser for a ListGridField hover

    Hi Isomorphic,

    when I use a LinkItem (which can show a link in Read Only mode) this shows the link target before click in the browser lower left like any plain <a href=...> link, even though the link is opened in the end with js (I assume). This is nice.

    I now have "links" in some of my ListGrid columns, where I show the content with an underline and have a addRecordClickHandler() that in the end uses com.google.gwt.user.client.Window.open to open a new window.
    How can I show the link target before click in the browser lower left like in LinkItem, so that I can simulate the <a href=...> behaviour even better?
    I can't use it like in grid_datatypes_link_text sample, because these are mail addresses or telephone numbers and I need to manually add a mailto: or tel: in front of the data.

    Thank you & Best regards
    Blama

    #2
    I just saw there is ListGridFieldType.PHONENUMBER, but no equivalent for mail addresses. If you could add this, this would be nice, although the question in general is then still open, as one could also have skype: links or similar.

    Best regards
    Blama

    Comment


      #3
      You can write to the window status bar with JavaScript window.status = "something" or GWT (not SmartGWT) Window.setStatus().

      Note that if you just use a formatter to output a native HTML <a> tag, you should get the status hover automatically.

      Also, some browsers seem to be moving away from allowing programatic changes to the status bar, precisely because it allows you to simulate the behavior of mousing over a link, and end users may think that seeing the status message guarantees the content is actually a link, and be fooled by something else.

      As far as automatically writing out links similar to LinkItem, we have tentative plans to offer several more SimpleTypes (including things like phoneNumber) in a post-13.0 release.

      Comment


        #4
        Hi Isomorphic,

        thanks, using setCellFormatter() to write out my own <a> tag worked fine and I could get rid of addRecordClickHandler().
        I agree that modifying window.status is actually very sneaky. CellFormatter is clearly the cleaner solution.

        Thank you & Best regards
        Blama
        Last edited by Blama; 25 Feb 2021, 03:58.

        Comment

        Working...
        X