myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mathias °ö° <Mathias.L...@statistik.sachsen.de>
Subject Re: how link svg file with jsf component
Date Thu, 12 Apr 2007 14:10:09 GMT

i have tested with <f:verbatim>:
at browser (ie and firefox) i see only a grey frame. the browser can´t load
the svg image.
(if i start the svg image from my file browser it will open.)

my next step i try with <a4j:mediaOutput> component , but im not sure which
attribute i must set.

<a4j:mediaOutput element="object" uriAttribute="href"
codetype="image/svg+xml" codebase="test.svg" />

but this code-snapshot does not work.

best regards


David Delbecq-2 wrote:
> 
> 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.
>>>>
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-link-svg-file-with-jsf-component-tf3559628.html#a9960210
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message