2 Replies Latest reply on Jun 20, 2012 11:42 AM by croco

    Open default mail server using <a4j:commandLink

    sandeepgowda

      HI,

        i am trying to open my system default mail(gmail) box. can you please help me how to go about it.

       

      What has be the action method?.

       

      IN .xhtml page on client side.

       

      <a4j:commandLink id="strEmailAddress" action="#"
                                      style="width:200px;" value="#{RegistrationBean.strEmailAddressLink}"></a4j:commandLink>

       

       

      bean class:

       

      public String getStrEmailAddressLink() {
              return strEmailAddressLink = "mailto:+mb.sandeepgowda@gmail.com";
          }

       

          public void setStrEmailAddressLink(String strEmailAddressLink) {
              this.strEmailAddressLink = strEmailAddressLink;
          }

       

      regards

      Sandeep

        • 1. Re: Open default mail server using <a4j:commandLink
          nbelaevski

          Hi,

           

          Is this what you need:

           

          <a href="mailto:#{RegistrationBean.strEmailAddressLink}">#{RegistrationBean.strEmailAddressLink}</a>
          

          ?

          • 2. Re: Open default mail server using <a4j:commandLink
            croco

            I'm having the same problem except I would like to trigger an action, open a default email client and rerender some components.

             

            How I have:

            <a4j:commandLink action="seamComponent.action()" rendered="seamComponent.canRender()" reRender="div1, div2">

               <span>#{messages['trigger.action']}</span>

            </a4j:commandLink>

             

            Now I would like that oncomplete attribute would be something like this: set href="#{seamComponent.readReceiverEmailSubjectAndBody()}" and open this href.

             

            Regards,

            Matija