You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by angelochen <an...@yahoo.com.hk> on 2011/12/06 07:18:55 UTC

t5.3 upgrade

AliasContribution is gone from 5.3, so i change baseURLservice to following,
seems not working, not got called, Am I missing something here? THanks.

@Contribute(ServiceOverride.class)
   public static void contributeAlias(MappedConfiguration<Class, Object>
configuration, @Value("${domainname}") final String
           domain_name) {
       BaseURLSource source = new BaseURLSource() {
           public String getBaseURL(boolean secure) {
            
               String protocol = secure ? "https" : "http";
               int port = secure ? 8443 : 8080;
               return String.format("%s://www.%s", protocol, domain_name);
           }
       };

       //  configuration.add(AliasContribution.create(BaseURLSource.class,
source));
       configuration.add(BaseURLSource.class, source);
   }

--
View this message in context: http://tapestry.1045711.n5.nabble.com/t5-3-upgrade-tp5051120p5051120.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: t5.3 upgrade

Posted by angelochen <an...@yahoo.com.hk>.
that's what I do now, but seems not working, the code was quoted above.


Thiago H de Paula Figueiredo wrote
> 
> On Tue, 06 Dec 2011 04:18:55 -0200, angelochen  
> &lt;angelochen960@.com&gt; wrote:
> 
>> AliasContribution is gone from 5.3, so i change baseURLservice to  
>> following, seems not working, not got called, Am I missing something  
>> here? THanks.
> 
> Use service overriding instead. It exists in Tapestry-IoC at least since  
> 5.1.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@.apache
> For additional commands, e-mail: users-help@.apache
> 


--
View this message in context: http://tapestry.1045711.n5.nabble.com/t5-3-upgrade-tp5051120p5051974.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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