Wicket
  1. Wicket
  2. WICKET-4837

SmartLinkMultiLineLabel does not display email addresses or web URLs as hyperlinks

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8, 6.2.0
    • Fix Version/s: 1.5.9, 6.3.0
    • Component/s: wicket-extensions
    • Labels:
      None

      Description

      SmartLinkLabel seems to be working just fine:
      add(new SmartLinkLabel("smartLinkLabel1", "test@domain.com")); // OK
      add(new SmartLinkLabel("smartLinkLabel2", "http://domain.com")); // OK
      add(new SmartLinkLabel("smartLinkLabel3", "https://domain.com")); // OK
      add(new SmartLinkLabel("smartLinkLabel4", "ftp://domain.com")); // OK
      add(new SmartLinkLabel("smartLinkLabel5", "Email: test@domain.com")); // OK

      SmartLinkMultiLineLabel does not seem to detect email addresses or URLs:
      add(new SmartLinkMultiLineLabel("smartLinkMultiLineLabel1", "test@domain.com")); // NO HYPERLINK
      add(new SmartLinkMultiLineLabel("smartLinkMultiLineLabel2", "http://domain.com")); // NO HYPERLINK
      add(new SmartLinkMultiLineLabel("smartLinkMultiLineLabel3", "https://domain.com")); // NO HYPERLINK
      add(new SmartLinkMultiLineLabel("smartLinkMultiLineLabel4", "ftp://domain.com")); // NO HYPERLINK
      add(new SmartLinkMultiLineLabel("smartLinkMultiLineLabel5", "test@domain.com\nhttp://domain.com")); // NO HYPERLINK
      add(new SmartLinkMultiLineLabel("smartLinkMultiLineLabel6", "Email: test@domain.com")); // NO HYPERLINK

      Tested using Wicket QuickStart (http://wicket.apache.org/start/quickstart.html):

      • Version 1.5.8: SmartLinkMultiLineLabel not working.
      • Version 6.2.0: SmartLinkMultiLineLabel not working either.
      1. HomePage.html
        1 kB
        Monica Nguon
      2. HomePage.java
        1 kB
        Monica Nguon
      3. Screenshot1.png
        41 kB
        Monica Nguon

        Issue Links

          Activity

          Hide
          Monica Nguon added a comment -

          Steps to reproduce:

          mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.8 -DgroupId=com.mycompany -DartifactId=myproject158 -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false

          Modify the POM to uncomment the "wicket-extensions" dependency.

          Modify HomePage.java and associated markup (see attached files).

          mvn jetty:run

          Go to http://localhost:8080/ to visualize the result (see attached screenshot).

          Show
          Monica Nguon added a comment - Steps to reproduce: mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.8 -DgroupId=com.mycompany -DartifactId=myproject158 -DarchetypeRepository= https://repository.apache.org/ -DinteractiveMode=false Modify the POM to uncomment the "wicket-extensions" dependency. Modify HomePage.java and associated markup (see attached files). mvn jetty:run Go to http://localhost:8080/ to visualize the result (see attached screenshot).
          Hide
          Martin Grigorov added a comment -

          Please attach the modified quickstart.

          Show
          Martin Grigorov added a comment - Please attach the modified quickstart.
          Hide
          Sven Meier added a comment -

          Text is now parsed for links first and then line breaks are handled

          Show
          Sven Meier added a comment - Text is now parsed for links first and then line breaks are handled
          Hide
          rack jackson added a comment -

          If you have email addresses or web URLs in the data that you are displaying, then you can automatically display those pieces of data as hyperlinks, you will not have to take any action to convert that data.

          Email addresses will be wrapped with a <a href="mailto:xxx">xxx</a> tag, where "xxx" is the email address that was detected.

          Web URLs will be wrapped with a <a href="http://www.bigrock.in/transfer/domain-transfer.php">http://www.bigrock.in/transfer/domain-transfer.php</a> tag, where "xxx" is the URL that was detected (it can be any valid URL type, http://, https://, ftp://, etc...)

          Show
          rack jackson added a comment - If you have email addresses or web URLs in the data that you are displaying, then you can automatically display those pieces of data as hyperlinks, you will not have to take any action to convert that data. Email addresses will be wrapped with a <a href="mailto:xxx">xxx</a> tag, where "xxx" is the email address that was detected. Web URLs will be wrapped with a <a href="http://www.bigrock.in/transfer/domain-transfer.php"> http://www.bigrock.in/transfer/domain-transfer.php </a> tag, where "xxx" is the URL that was detected (it can be any valid URL type, http:// , https:// , ftp:// , etc...)

            People

            • Assignee:
              Sven Meier
              Reporter:
              Monica Nguon
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development