Hi

You can use assets in your page using @Path annotation.

@Inject
@Path("context:images/tapestry_banner.gif")
private Asset banner;

Read more about it at

http://tapestry.apache.org/assets.html

regards
Taha

On 08-Apr-2013, at 12:28 PM, Alberto Fernández <afernan...@easis.es> wrote:

> Context is already working on my .tml classes, but I would like to invoke
> it from .java
> 
> Alberto Fernández
> 
> Consultoría Informática EASIS, SL <http://www.easis.es/>
> Email: afernan...@easis.es <conta...@easis.es>
> 
> 
> 2013/4/7 Dmitry Gusev <dmitry.gu...@gmail.com>
> 
>> Hi,
>> 
>> "context" is a binding prefix, your code should be:
>> 
>> <img src="${context:CSS/images/modify.png}" />
>> 
>> Look here:
>> http://tapestry.apache.org/assets.html
>> 
>> 
>> 
>> On Sun, Apr 7, 2013 at 7:44 PM, Alberto Fernández <afernan...@easis.es
>>> wrote:
>> 
>>> Hi everybody,
>>> 
>>> From .tml classes I can get my images url usring context. For example:
>>> 
>>> <img src="${context:}/CSS/images/modify.png" />
>>> 
>>> But now I need the context in my .java class
>>> 
>>> Are there a way to call context from here?
>>> 
>>> Thanks a lot
>>> 
>> 
>> 
>> 
>> --
>> Dmitry Gusev
>> 
>> AnjLab Team
>> http://anjlab.com
>> 

Reply via email to