james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Carrasco MoƱino <man...@apache.org>
Subject Re: hupa questions
Date Thu, 12 Jul 2012 13:11:51 GMT
Gwt Anchor widget is thought to maintain the user in the same page so as
the app is not replaced accidentally. So the correct code is:
    Anchor a = new Anchor("click me");
    a.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        Window.open("/show_attachments/", "_blank", "");
      }
    });
    your_panel.add(a);

If you want to add html code to the view you can use the HTML widget, but
you have to be aware about what you do.

    HTML h = new HTML("<a href='/your_url' target='_blank'>click me</a>");
    your_panel.add(h);


- Manolo

On Thu, Jul 12, 2012 at 9:52 AM, <gzsombor@gmail.com> wrote:

> Hi,
>
> &nbsp;I've recently started using hupa, and it's awesome, with a couple of
> glitches. For example, it is impossible to subscribe to this mail list
> using hupa, because of the email address validation regexp ;) But it was
> easy to fix. I've tried to implement a 'View attachment' functionality for
> attachments (the servlet related parts was simple - skip the
> 'content-disposition' header), I've stucked on creating a 'View' link with
> target="_blank". It seems that, I can create Anchor object with
> setTarget("_blank"), and I can add it to the container - and in that case I
> can still see the generated html is correct, but in the browser, that
> attribute is removed. Do you know any functionality which could adjust the
> html ? It seems a bit overkill to have click handler on it, and call
> Window.open(...), instead of using the builtin html functionality.
> &nbsp;Other question, I see, there are git mirror repositories of apache
> softwares at http://git.apache.org , but there is no repo for hupa - can
> you create one ? With a github mirror would be awesome ;)
>
> Thanks
> &nbsp;Zsombor
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message