On generality of name/library: I gave two examples:
<h:graphicImage id="imageName" /> <h:graphicImage name="imageName.jpg" /> and question: "What will be rendered on client"? All answers for the second case were - guess what - "a HTML image element with attribute name="imageName.jpg". That is why I don't like much such generic names. But this can be only case of ours develepers (they are very HTML and Spring-"infected" - both those technologies have 'name' attribute as a type of identifier). It is interesting that VLD https://javaserverfaces.dev.java.net/nonav/docs/2.0/pdldocs/facelets/h/graphicImage.html says: name - The resourceName for this resource. library - The libraryName for this resource. String 'resourceName' is even highlithed - why wasn't it chosen as attribute name as well ? (I don't know) Regards, Martin Matthias Wessendorf píše v Út 20. 10. 2009 v 13:23 -0700: > On Fri, Oct 16, 2009 at 8:25 AM, Martin Kočí <[email protected]> wrote: > > Hi, > > > > please review simple patch > > https://issues.apache.org/jira/browse/TRINIDAD-1596. > > > > More question about Resource support in trinidad2: > > > > 1) JSF 2 introduced "name" and "library" as an alternative to "src", > > "image" or "icon" for example. According to tag library documentation > > there is support only on h:graphicImage, but surprisingly it works with > > h:commandButton too (and maybe other). > > I see name/library on outputScript/Stylesheet as well. > > > > > Should trinidad support name and library with tr:image (an alternative > > to h:graphicImage)? > > hrm. I'd think so. > > > > > If a component has exactly one image attribute ("icon" in trinidad) > > interpret name/library as alternative to it ? I think "name" and > > "library" are too generic - they should be named "iconName" and > > "iconLibrary" or something like that. > > we should use name/libray! > > On things like script you'd have to have a different syntax > (scriptName/scriptLib), which would make things more weird, > I guess > > > > > > Folowing components have icon attribute: > > CoreInputListOfValues > > CorePanelBox > > CorePanelHeader > > CorePanelPopup > > CoreShowDetailHeader > > CoreCommandButton > > CoreCommandNavigationItem > > CoreGoButton > > > > I dont really understand if name/library concept was intended for > > components without behaviour from 'resource' family like image or CSS. > > I think it makes sense. Like one "corp" folder which has 3 images and 2 files > library="corp" name => foo.png OR bar.js" > > -Matthias > > > 2) HTML head section > > There are h:outputStylesheet and h:outputScript in JSF 2.0 . Both > > support name and library attrs too. If we will rework trinidad2 to > > Resource API is there any reason why add to trh:styleSheeet > > name/library support? > > I think trh: tags can remain for JSP/old application and without > > name/library attrs and for new trinidad2/Facelets based application > > users can use new tags from JSF 2.0 > > > > Note: name/library are only a option to #{resource} implicit object. > > > > > > Regards, > > > > Martin > >
