myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <delbd+jaka...@oma.be>
Subject Re: how link svg file with jsf component
Date Thu, 12 Apr 2007 13:22:07 GMT
Indeed, now you say this, am not sure the tomahwak htmlTag component
accepts attributes other than the default uioutput ones.
maybe something along this?
<f:verbatim>
<object data="test.svg" type="image/svg+xml"
width="400" height="300">
</object>
</f:verbatim>


In facelets i would simply make, without verbatim

<object data="#{someBean.someSvgUrl}" type="image/svg+xml"
width="#{someBean.someSvgWidth}" height="#{someBean.someSvgWidth}">
</object>

but won't work in JSP. Also the media tag of ajax4jsf is made to ouput
'media' in various tags (object, a, img, iframe), if you can afford an
additionnal library...


En l'instant précis du 12/04/07 10:40, mathias °ö° s'exprimait en ces
termes:
>
> 2. use htmTag component
> <t:htmlTag value="object">
> <f:attribute name="data" value="Test.svg" />
> <f:attribute name="width" value="500" />
> <f:attribute name="height" value="500" />
> <f:attribute name="type" value="image/svg+xml" />
> </t:htmlTag>
>
> but is does not work. how i handle htmlTag Attributes?
>
> best regards
> mathias °ö°
>
>
> David Delbecq-2 wrote:
>   
>> graphicImage renders a   tag. Svgs are not supposed to be
>> included with such tags. It's like trying to use a img tag to show a
>> flash object.
>>
>> See here how to include svg in your page:
>> http://wiki.svg.org/SVG_and_HTML
>>
>> When you have understand this, you can use either the ajx4jsf 'media'
>> component or use the tomahawk 'htmlTag'  component to render your object
>> tag.
>>
>> Also don't forget to setup your mimetype in your web.xml for svg
>> ressources.
>>
>> En l'instant précis du 11/04/07 16:14, mathias °ö° s'exprimait en ces
>> termes:
>>     
>>> hi
>>>
>>> how link an extern svg-file with jsf component.
>>> with
>>> <h:graphicImage url="http://www.***/file.svg" />
>>> it does not work.
>>>
>>>   
>>>       
>>
>>     
>
>   


Mime
View raw message