Hi,

I've some trouble in accessing asset using @IjectAsset annotation. I would like to use this method so I can skip the Home.page at all.

In my Home.java I've declared my asset this way:

public abstract class Home extends BasePage {
@InjectAsset("context:/img/first_2.gif")
   public abstract IAsset getFirstImage();

...
...


Then in my Home.html I'm trying to access this asset this way:
<img jwcid="@Image" image="asset:firstImage" src="img/first_2.gif" border="0" />

I get this error: Component Home does not contain an asset named 'firstImage'.

I've tried also this way:
<img jwcid="@Image" image="ognl:getFirstImage()" src="img/first_2.gif" border="0" />

but I get a differnt Error: Value for parameter 'image' in component Home/$Image is null, and a non-null value is required.


It works great if I use <asset> in Home.page specification file but I would like to use the Annotation way.

Where is my fault?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to