You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Richard Hart <ri...@ur-ban.com> on 2005/08/28 03:53:43 UTC

How do I create a mailto link?

Hello,
 
I have only started playing around with Tapestry in the last few days and am
really enjoying but I am totally stumpped as to how I can create a "mailto"
link. I have searched through the documentation but haven't found it very
helpful as to how to create links of any kind. 
 
I have set up a BasePage class with, for example, a variable containing the
email address. I just don't understand how to embed that into a link?
 
Any help is appreciated.
 
Regards,
 
Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: How do I create a mailto link?

Posted by Pierre-Yves Nicolas <py...@gmail.com>.
2005/8/29, Tomáš Drenčák <to...@gmail.com>:
> Btw is it possible to create dynamic checkbox through Any component?
> I'd like to show some state for every item in the list which could be
> set or not set. But the problem is to set "checked" attribute of
> checkbox when the state is set. I've done this through conditional
> block inside Table component with checked checkbox in "true" and not
> checked checkbox in "false". But I think it's too much code for simple
> thing....

You can simply use the Checkbox component and its attribute
("selected" in Tapestry 3, "value" in Tapestry 4) :
http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReference/Checkbox.html
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/Checkbox.html

If you want to use Any, you can try something like :
<input type="checkbox" jwcid="@Any" checked='ognl:state?"true":"false"'/>
But this will always output a "checked" attribute, which is not a good
thing in your case...

Re: How do I create a mailto link?

Posted by Tomáš Drenčák <to...@gmail.com>.
Btw is it possible to create dynamic checkbox through Any component?
I'd like to show some state for every item in the list which could be
set or not set. But the problem is to set "checked" attribute of
checkbox when the state is set. I've done this through conditional
block inside Table component with checked checkbox in "true" and not
checked checkbox in "false". But I think it's too much code for simple
thing....

Thanks 
        tomas

2005/8/29, Nick Westgate <ni...@key-planning.co.jp>:
> Hi Richard.
> 
> Robert probably should have also mentioned that there's a component
> in his Tassel repository called "EncodedMailLink" if you need to
> hide the email address from mail harvesters etc:
> http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SEncodedMailLink
> 
> Cheers,
> Nick.
> 
> 
> Richard Hart wrote:
> > Thanks for the help guys! Your replies have actually cleared a lot of
> > confusion I've been having over Tapestry! :)
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: How do I create a mailto link?

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Hi Richard.

Robert probably should have also mentioned that there's a component
in his Tassel repository called "EncodedMailLink" if you need to
hide the email address from mail harvesters etc:
http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SEncodedMailLink

Cheers,
Nick.


Richard Hart wrote:
> Thanks for the help guys! Your replies have actually cleared a lot of
> confusion I've been having over Tapestry! :) 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: How do I create a mailto link?

Posted by Richard Hart <ri...@ur-ban.com>.
Thanks for the help guys! Your replies have actually cleared a lot of
confusion I've been having over Tapestry! :) 

> -----Original Message-----
> From: Filip S. Adamsen [mailto:filip@stubkjaer-adamsen.dk] 
> Sent: 28 August 2005 03:07
> To: Tapestry users
> Subject: Re: How do I create a mailto link?
> 
> Hi Richard,
> 
> You could use the GenericLink component to create the mailto link.
> 
> http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReferenc
> e/GenericLink.html
> 
> As to how to embed the link, perhaps something like
> 
>    <a jwcid="@GenericLink" href="ognl:'mailto:' + 
> emailAddress">email</a>
> 
> would do the trick. Depending on how much you know about 
> Tapestry already, this might be total gibberish to you, or not.
> 
> Or you could create a getEmail method in your Java class and 
> have it assemble the link, then use something like
> 
>    <a jwcid="@GenericLink" href="ognl:email">email</a>
> 
> instead.
> 
> Well, I hope that cleared things up a bit... If you have any 
> other questions - or if my answer doesn't make any sense to 
> you - please ask. 
> I won't stay awake for much longer - it's 4am here - but 
> surely someone else will be here.
> 
> -Filip
> 
> Richard Hart wrote:
> > Hello,
> >  
> > I have only started playing around with Tapestry in the 
> last few days 
> > and am really enjoying but I am totally stumpped as to how 
> I can create a "mailto"
> > link. I have searched through the documentation but haven't 
> found it 
> > very helpful as to how to create links of any kind.
> >  
> > I have set up a BasePage class with, for example, a variable 
> > containing the email address. I just don't understand how 
> to embed that into a link?
> >  
> > Any help is appreciated.
> >  
> > Regards,
> >  
> > Richard
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> > 
> > 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: How do I create a mailto link?

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Hi Richard,

You could use the GenericLink component to create the mailto link.

http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReference/GenericLink.html

As to how to embed the link, perhaps something like

   <a jwcid="@GenericLink" href="ognl:'mailto:' + emailAddress">email</a>

would do the trick. Depending on how much you know about Tapestry 
already, this might be total gibberish to you, or not.

Or you could create a getEmail method in your Java class and have it 
assemble the link, then use something like

   <a jwcid="@GenericLink" href="ognl:email">email</a>

instead.

Well, I hope that cleared things up a bit... If you have any other 
questions - or if my answer doesn't make any sense to you - please ask. 
I won't stay awake for much longer - it's 4am here - but surely someone 
else will be here.

-Filip

Richard Hart wrote:
> Hello,
>  
> I have only started playing around with Tapestry in the last few days and am
> really enjoying but I am totally stumpped as to how I can create a "mailto"
> link. I have searched through the documentation but haven't found it very
> helpful as to how to create links of any kind. 
>  
> I have set up a BasePage class with, for example, a variable containing the
> email address. I just don't understand how to embed that into a link?
>  
> Any help is appreciated.
>  
> Regards,
>  
> Richard
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 

Re: How do I create a mailto link?

Posted by Robert Zeigler <ro...@scazdl.org>.
All you want is the mailto link?
Couldn't you do:
<a href="ognl:'mailto:' + address" jwcid="@Any">Mail to Wherever</a>
?
(replace address above with the appropriate variable name).
Robert

Richard Hart wrote:
> Hello,
>  
> I have only started playing around with Tapestry in the last few days and am
> really enjoying but I am totally stumpped as to how I can create a "mailto"
> link. I have searched through the documentation but haven't found it very
> helpful as to how to create links of any kind. 
>  
> I have set up a BasePage class with, for example, a variable containing the
> email address. I just don't understand how to embed that into a link?
>  
> Any help is appreciated.
>  
> Regards,
>  
> Richard
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org