class staticimage extends webcomponent {
public staticimage(string id, imodel model) {
super(id, model);
}
protected void oncomponenttag(tag) {
checkcomponenttag(tag, "img");
tag.put("src", getModelObjectAsString());
}
}
-igor
On 12/18/06,
I mean root of the app. i don't want to harcode the button image in html
I know we can use packageResource.get(scope,path) for ImageButton class,
i.e. new ImageButton("sbutton", packageResource.get(A.class,"a.gif") )
this needs images to be put into java class package and i want it in
web app ro
what do you mean with:
"i have shared resources at root /sharedResources/Images/a.gif ,"?
root of the web app?
or root in a classes/jar?
if in webapp then you can just point to it in the html.
if in the classes then i don't know directly upfront how it goes with the
ButtonFactory (don't use i