Jonathan Locke wrote:

Gili wrote:


I think that is absolutely fine. Most of the time, I think I would personally expect and want my images to be scoped related to the component they are in. One exception I had in mind would be the round corner border component. To a certain degree it makes sense to share corner images across the entire application so you don't have to rerender them for different pages with identical borders corners.


if your border component has markup, it will be scoped to the component (the markupcontainer), not the page. that's why i carefully said the resource is scoped: "by the class associated with the markup that contained it".

That's even better. So if I understand this correctly: it is application-wide sharing but visible only within the scope of my component. Is that correct?


what do you care? just be sure to name the image based on its attributes. for example, if you have a color, you might want to name the upper left round corner "upper-left-ccbe3f" or something. this way you can have green round corners and red ones in the same app and even on the same page.

I never know the corner color ahead of time. My markup has names such as "topLeftCorner" but you won't find the corner size or color anywhere in the name because I don't know it ahead of time. Are you saying that with the new scheme, I'd have to use an AttributeModifier to change the "src" attribute per <img> tag depending upon its parameters to ensure that different corner images end up with different filenames? I mean... with the change you just made... now people have to watch out that images with the same filename are always identical because they get shared whereas before you wouldn't have to worry about this necessarily because the image name would get scoped related to the component *instance* (if I understand correctly). So say my Page had two components: 1) redBorder 2) blueBorder and both had images with the same names, there would be no conflict because the filename would get prefixed with redBorder or blueBorder. Now, I'd have to proactively use AttributeModifier to fix up "src". Am I understanding this correctly?


Gili


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to