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 Fri, 13 Apr 2007 09:53:54 GMT
firefow can load svg using <object> tag, so you should check the the
object tag is correct and the the pointed svg file is at proper location.

En l'instant précis du 12/04/07 16:10, mathias °ö° s'exprimait en ces
termes:
> 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.
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Mime
View raw message