Delivering SVG images
Hello,
I'm using uiXML to deliver SVG images that I am storing as ORDSYS.OrdDOC in the database. I can create the appropriate tags in my document but the url that is pulled out doesn't work. It never returns the image. This seems more like a JDeveloper question but if not please let me know right away so I can post appropriately.
I'm assuming it's got something to do with the url that I'm pulling out of the interMedia object but I'm not too sure.
Thanks!
scott
Some details.....
here's how I get the url and content type:
<code>
<bc4j:viewObjectScope name="CustomArrayDataGraphsView">
<contents>
<bc4j:table alternateText="No Records">
<contents>
<bc4j:attrScope name="graph">
<contents>
<agy:object height="200"
width="300">
<boundAttribute name="data">
<bc4j:ordProperty name="url"/>
</boundAttribute>
<boundAttribute name="type">
<bc4j:ordProperty name="contentType"/>
</boundAttribute>
</agy:object>
</contents>
</bc4j:attrScope>
</contents>
</bc4j:table>
</contents>
</bc4j:viewObjectScope>
</code>
Here's the tag that is generated by my page:
<object type="image/svg-xml" width="300" height="200" data="ordDeliverMedia?appModID=ClonesApp&viewObjectName=ArrayModule.CustomArrayDataGraphsView&contentCol=graph&rowKey=000100000005393531313900000007000000F4E0384BFE&amConfig=null.null&cache=1051733825968"></object>
Well after digging through lots of interMedia, UIX and Jdev Documentation I finally figured out how to deliver SVG images. To most of you it will seem obvious but I thought for those of you that would like to use SVG but can't seem to get it working I'd post how I got it going within the UIX+BC4J. If anyone has a more elegant way of doing this please reply to this post.
As it turns out the problem was really during the file upload using sqlldr!
So here is all the info needed to get SVG images to display in your app.
Code examples index:
1. Sample SVG file
2. Sample DB Schema
3. Sample SQL*Loader control file
4. Sample SQL*Loader data file
5. Sample UIX file
1. Sample SVG file
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" [
<!ENTITY ff "font-family:">
<!ENTITY fs "font-size:">
<!ENTITY fw "font-weight:">
<!ENTITY fst "font-style:">
<!ENTITY sw "stroke-width:">
<!ENTITY as "text-anchor:start;">
<!ENTITY am "text-anchor:middle;">
<!ENTITY ae "text-anchor:end;">
]>
<!-- Generated by ploticus (http://ploticus.sourceforge.net/)
Title: ploticus-graphic
SVG Driver by B.Traill
-->
<svg viewBox="0 0 607.60 367.04">
<g transform="translate(-12.80,-180.16)" >
<g style="fill:#000000;stroke:#000000;&ff;Helvetica;">
<g style="&ff;Times-Roman;&sw;0.6;&fw;bold;&fs;20;&am;">
<text x="324.00" y="214.56" stroke="none">Item</text>
<path d="M172.8 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M223.2 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M273.6 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M324 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M374.4 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M424.8 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M475.2 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M525.6 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M122.4 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M172.8 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M223.2 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M273.6 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M324 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M374.4 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M424.8 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
<path d="M475.2 504l-50.4 0l0 -144l50.4 0z" fill="#e5d3c9" stroke="#e5d3c9"/>
</g><g style="&ff;Times-Roman;&sw;0.6;&fw;bold;&fs;16;&am;">
<text x="324.00" y="532.80" stroke="none">TimePoints(hr)</text>
</g><g style="&ff;Times-Roman;&sw;0.6;&fw;bold;&fs;10;&am;">
<text x="122.40" y="519.60" stroke="none">0.75</text>
</g><g style="&ff;Times-Roman;&sw;1.5;&fw;bold;&fs;10;&am;">
<path d="M122.4 507.6l0 -3.6" fill="none"/>
<text x="172.80" y="519.60" stroke="none">03</text>
<path d="M172.8 507.6l0 -3.6" fill="none"/>
<text x="223.20" y="519.60" stroke="none">06</text>
<path d="M223.2 507.6l0 -3.6" fill="none"/>
<text x="273.60" y="519.60" stroke="none">09</text>
<path d="M273.6 507.6l0 -3.6" fill="none"/>
<text x="324.00" y="519.60" stroke="none">12</text>
<path d="M324 507.6l0 -3.6" fill="none"/>
<text x="374.40" y="519.60" stroke="none">15</text>
<path d="M374.4 507.6l0 -3.6" fill="none"/>
<text x="424.80" y="519.60" stroke="none">18</text>
<path d="M424.8 507.6l0 -3.6" fill="none"/>
<text x="475.20" y="519.60" stroke="none">24</text>
<path d="M475.2 507.6l0 -3.6" fill="none"/>
<path d="M72 504l504 0" fill="none"/>
</g><g style="&ff;Times-Roman;&sw;1.5;&fw;bold;&fs;16;&am;">
<text x="43.20" y="360.00" stroke="none" transform="rotate(-90,43.20,360.00)" >axis data</text>
</g><g style="&ff;Times-Roman;&sw;0.5;&fw;bold;&fs;16;&am;">
<path d="M69.84 504l2.16 0" fill="none"/>
<path d="M69.84 496.8l2.16 0" fill="none"/>
<path d="M69.84 489.6l2.16 0" fill="none"/>
<path d="M69.84 482.4l2.16 0" fill="none"/>
<path d="M69.84 475.2l2.16 0" fill="none"/>
<path d="M69.84 468l2.16 0" fill="none"/>
<path d="M69.84 460.8l2.16 0" fill="none"/>
<path d="M69.84 453.6l2.16 0" fill="none"/>
<path d="M69.84 446.4l2.16 0" fill="none"/>
<path d="M69.84 439.2l2.16 0" fill="none"/>
<path d="M69.84 432l2.16 0" fill="none"/>
<path d="M69.84 424.8l2.16 0" fill="none"/>
<path d="M69.84 417.6l2.16 0" fill="none"/>
<path d="M69.84 410.4l2.16 0" fill="none"/>
<path d="M69.84 403.2l2.16 0" fill="none"/>
<path d="M69.84 396l2.16 0" fill="none"/>
<path d="M69.84 388.8l2.16 0" fill="none"/>
<path d="M69.84 381.6l2.16 0" fill="none"/>
<path d="M69.84 374.4l2.16 0" fill="none"/>
<path d="M69.84 367.2l2.16 0" fill="none"/>
<path d="M69.84 360l2.16 0" fill="none"/>
<path d="M69.84 352.8l2.16 0" fill="none"/>
<path d="M69.84 345.6l2.16 0" fill="none"/>
<path d="M69.84 338.4l2.16 0" fill="none"/>
<path d="M69.84 331.2l2.16 0" fill="none"/>
<path d="M69.84 324l2.16 0" fill="none"/>
<path d="M69.84 316.8l2.16 0" fill="none"/>
<path d="M69.84 309.6l2.16 0" fill="none"/>
<path d="M69.84 302.4l2.16 0" fill="none"/>
<path d="M69.84 295.2l2.16 0" fill="none"/>
<path d="M69.84 288l2.16 0" fill="none"/>
<path d="M69.84 280.8l2.16 0" fill="none"/>
<path d="M69.84 273.6l2.16 0" fill="none"/>
<path d="M69.84 266.4l2.16 0" fill="none"/>
<path d="M69.84 259.2l2.16 0" fill="none"/>
<path d="M69.84 252l2.16 0" fill="none"/>
<path d="M69.84 244.8l2.16 0" fill="none"/>
<path d="M69.84 237.6l2.16 0" fill="none"/>
<path d="M69.84 230.4l2.16 0" fill="none"/>
<path d="M69.84 223.2l2.16 0" fill="none"/>
</g><g style="&ff;Times-Roman;&sw;0.5;&fw;bold;&fs;10;&ae;">
<text x="61.20" y="507.60" stroke="none">0</text>
</g><g style="&ff;Times-Roman;&sw;1.5;&fw;bold;&fs;10;&ae;">
<path d="M62.64 504l9.36 0" fill="none"/>
<text x="61.20" y="363.60" stroke="none">1</text>
<path d="M62.64 360l9.36 0" fill="none"/>
<text x="61.20" y="219.60" stroke="none">2</text>
<path d="M62.64 216l9.36 0" fill="none"/>
<path d="M72 504l0 -288" fill="none"/>
</g><g style="&ff;Times-Roman;&sw;0.5;&fw;bold;&fs;10;&ae;">
<path d="M113.4 504l0 -148.3l18 0l0 148.3z" fill="#ff0000" stroke="#ff0000"/>
<path d="M113.4 504l0 -148.3l18 0l0 148.3l-18 0l0 -148.3" fill="none"/>
<path d="M163.8 504l0 -133.9l18 0l0 133.9z" fill="#ff0000" stroke="#ff0000"/>
<path d="M163.8 504l0 -133.9l18 0l0 133.9l-18 0l0 -133.9" fill="none"/>
<path d="M214.2 504l0 -129.6l18 0l0 129.6z" fill="#ff0000" stroke="#ff0000"/>
<path d="M214.2 504l0 -129.6l18 0l0 129.6l-18 0l0 -129.6" fill="none"/>
<path d="M264.6 504l0 -135.4l18 0l0 135.4z" fill="#ff0000" stroke="#ff0000"/>
<path d="M264.6 504l0 -135.4l18 0l0 135.4l-18 0l0 -135.4" fill="none"/>
<path d="M315 504l0 -126.7l18 0l0 126.7z" fill="#ff0000" stroke="#ff0000"/>
<path d="M315 504l0 -126.7l18 0l0 126.7l-18 0l0 -126.7" fill="none"/>
<path d="M365.4 504l0 -108l18 0l0 108z" fill="#ff0000" stroke="#ff0000"/>
<path d="M365.4 504l0 -108l18 0l0 108l-18 0l0 -108" fill="none"/>
<path d="M415.8 504l0 -144l18 0l0 144z" fill="#ff0000" stroke="#ff0000"/>
<path d="M415.8 504l0 -144l18 0l0 144l-18 0l0 -144" fill="none"/>
<path d="M466.2 504l0 -151.2l18 0l0 151.2z" fill="#ff0000" stroke="#ff0000"/>
<path d="M466.2 504l0 -151.2l18 0l0 151.2l-18 0l0 -151.2" fill="none"/>
<path d="M516.6 504l0 0l18 0l0 0z" fill="#ff0000" stroke="#ff0000"/>
<path d="M516.6 504l0 0l18 0l0 0l-18 0l0 0" fill="none"/>
</g><g style="&ff;Times-Roman;&sw;0.5;&fst;italic;&fs;10;&am;">
<text x="143.28" y="341.28" stroke="none">p=1</text>
<text x="193.68" y="355.68" stroke="none">p=0.9993</text>
<text x="244.08" y="360.00" stroke="none">p=0.9433</text>
<text x="294.48" y="354.24" stroke="none">p=0.9999</text>
<text x="344.88" y="362.88" stroke="none">p=0.4706</text>
<text x="395.28" y="381.60" stroke="none">p=0.0003</text>
<text x="445.68" y="345.60" stroke="none">p=1</text>
<text x="496.08" y="338.40" stroke="none">p=1</text>
<path d="M113.4 504l0 -148.3l18 0l0 148.3z" fill="#ff0000" stroke="#ff0000"/>
<path d="M113.4 504l0 -148.3l18 0l0 148.3l-18 0l0 -148.3" fill="none"/>
<path d="M163.8 504l0 -133.9l18 0l0 133.9z" fill="#ff0000" stroke="#ff0000"/>
<path d="M163.8 504l0 -133.9l18 0l0 133.9l-18 0l0 -133.9" fill="none"/>
<path d="M214.2 504l0 -129.6l18 0l0 129.6z" fill="#ff0000" stroke="#ff0000"/>
<path d="M214.2 504l0 -129.6l18 0l0 129.6l-18 0l0 -129.6" fill="none"/>
<path d="M264.6 504l0 -135.4l18 0l0 135.4z" fill="#ff0000" stroke="#ff0000"/>
<path d="M264.6 504l0 -135.4l18 0l0 135.4l-18 0l0 -135.4" fill="none"/>
<path d="M315 504l0 -126.7l18 0l0 126.7z" fill="#ff0000" stroke="#ff0000"/>
<path d="M315 504l0 -126.7l18 0l0 126.7l-18 0l0 -126.7" fill="none"/>
<path d="M365.4 504l0 -108l18 0l0 108z" fill="#ff0000" stroke="#ff0000"/>
<path d="M365.4 504l0 -108l18 0l0 108l-18 0l0 -108" fill="none"/>
<path d="M415.8 504l0 -144l18 0l0 144z" fill="#ff0000" stroke="#ff0000"/>
<path d="M415.8 504l0 -144l18 0l0 144l-18 0l0 -144" fill="none"/>
<path d="M466.2 504l0 -151.2l18 0l0 151.2z" fill="#ff0000" stroke="#ff0000"/>
<path d="M466.2 504l0 -151.2l18 0l0 151.2l-18 0l0 -151.2" fill="none"/>
<path d="M516.6 504l0 0l18 0l0 0z" fill="#ff0000" stroke="#ff0000"/>
<path d="M516.6 504l0 0l18 0l0 0l-18 0l0 0" fill="none"/>
</g><g style="&ff;Times-Roman;&sw;0.5;&fw;bold;&fs;10;&am;">
<text x="133.20" y="354.24" stroke="none">1.03</text>
<text x="183.60" y="368.64" stroke="none">0.93</text>
<text x="234.00" y="372.96" stroke="none">0.9</text>
<text x="284.40" y="367.20" stroke="none">0.94</text>
<text x="334.80" y="375.84" stroke="none">0.88</text>
<text x="385.20" y="394.56" stroke="none">0.75</text>
<text x="435.60" y="358.56" stroke="none">1</text>
<text x="486.00" y="351.36" stroke="none">1.05</text>
</g><g style="&ff;Times-Roman;&sw;0.8;&fw;bold;&fs;10;&am;">
<path d="M122.4 383l0 -54.72" fill="none"/>
<path d="M117 328.3l10.8 0" fill="none"/>
<path d="M117 383l10.8 0" fill="none"/>
<path d="M172.8 413.3l0 -86.4" fill="none"/>
<path d="M167.4 326.9l10.8 0" fill="none"/>
<path d="M167.4 413.3l10.8 0" fill="none"/>
<path d="M223.2 413.3l0 -77.76" fill="none"/>
<path d="M217.8 335.5l10.8 0" fill="none"/>
<path d="M217.8 413.3l10.8 0" fill="none"/>
<path d="M273.6 401.8l0 -66.24" fill="none"/>
<path d="M268.2 335.5l10.8 0" fill="none"/>
<path d="M268.2 401.8l10.8 0" fill="none"/>
<path d="M324 426.2l0 -97.92" fill="none"/>
<path d="M318.6 328.3l10.8 0" fill="none"/>
<path d="M318.6 426.2l10.8 0" fill="none"/>
<path d="M374.4 460.8l0 -129.6" fill="none"/>
<path d="M369 331.2l10.8 0" fill="none"/>
<path d="M369 460.8l10.8 0" fill="none"/>
<path d="M424.8 406.1l0 -92.16" fill="none"/>
<path d="M419.4 313.9l10.8 0" fill="none"/>
<path d="M419.4 406.1l10.8 0" fill="none"/>
<path d="M475.2 413.3l0 -121" fill="none"/>
<path d="M469.8 292.3l10.8 0" fill="none"/>
<path d="M469.8 413.3l10.8 0" fill="none"/>
<path d="M525.6 504l0 0" fill="none"/>
<path d="M520.2 504l10.8 0" fill="none"/>
<path d="M520.2 504l10.8 0" fill="none"/>
</g><g style="&ff;Times-Roman;&sw;0.8;&fs;10;&am;">
<path d="M525.6 228l0 -7.2l7.2 0l0 7.2z" fill="#e5d3c9" stroke="#e5d3c9"/>
</g><g style="&ff;Times-Roman;&sw;0.8;&fs;10;&as;">
<text x="540.00" y="228.00" stroke="none">data</text>
</g></g>
</g>
</svg>2. Sample DB Schema
CREATE TABLE SVG_TABLE (
SVG_ID NUMBER NOT NULL,
ANALYSIS_PARAM VARCHAR2 (255),
DESCRIPTION VARCHAR2 (4000),
SVG ORDSYS.ORDDOC,
CONSTRAINT SVGTABLE_PRIMARY_KEY_20
PRIMARY KEY ( SVG_ID ) ) ;
#This was created with TOAD get Script don't know if
#it'll work outa the box
CREATE SEQUENCE DEVOWNER.SVG_ID_SEQ
START WITH 24
NOMAXVALUE
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER;
CREATE OR REPLACE TRIGGER DEVOWNER.SVG_ID_TRIG
BEFORE INSERT
ON DEVOWNER.SVG_TABLE
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
begin
select SVG_ID_SEQ.nextval
into :new.SVG_ID
from dual;
end;3. Sample SQL*Loader control file
LOAD DATA
INFILE svgTableLoad.dat
INTO TABLE svg_table
TRUNCATE
FIELDS
analysis_param CHAR(255) TERMINATED BY '^',
description CHAR(255) TERMINATED BY '^',
svg column object (
source column object (
localdata_fname FILLER CHAR(256) TERMINATED BY '^',
localdata LOBFILE (svg.source.localdata_fname) TERMINATED BY EOF,
srcName char(100) TERMINATED BY '^'
mimetype CHAR(40) TERMINATED BY '^'
)4. Sample SQL*Loader data file
primary^Test one of svg support^svgOne.svg^svgOne.svg^image/svg+xml5. Sample UIX file
<?xml version="1.0" encoding="windows-1252" ?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
>
<bc4j:registryDef>
<bc4j:rootAppModuleDef name="SvgTableViewAppModule"
definition="SVG.TestModule"
releaseMode="stateful" >
<bc4j:viewObjectDef name="SvgTableView"
rangeSize="3" />
</bc4j:rootAppModuleDef>
</bc4j:registryDef>
<content>
<try xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui" >
<catch>
<displayException />
</catch>
<contents>
<pageLayout xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui"
xmlns:html="http://www.w3.org/TR/REC-html40"
title="SvgTableView View" >
<!-- Start of common pageLayout section. If you plan to expand this
example application, consider using a UIT template to specify the common
portions of your pageLayout -->
<productBranding>
<image source="tools_collage.gif" shortDesc="JDeveloper Product Logo"/>
</productBranding>
<corporateBranding>
<image source="oraclelogo.gif" shortDesc="Oracle Logo"/>
</corporateBranding>
<globalButtons>
<globalButtonBar>
<contents>
<globalButton source="www_home.gif"
text="Home"
destination="Main.uix" />
<globalButton source="www_contact.gif"
text="Contact Us"
destination="http://www.oracle.com" />
<globalButton source="www_help.gif"
text="Help"
destination="http://otn.oracle.com/products/jdev/content.html" />
</contents>
</globalButtonBar>
</globalButtons>
<copyright>Copyright 2002 Oracle Corporation. All Rights Reserved.</copyright>
<privacy>
<link text="Privacy Statement" destination="http://www.oracle.com"/>
</privacy>
<!-- End of common pageLayout section -->
<contents>
<!-- this will contain any validation errors after form
submission -->
<messageBox automatic="true" />
<bc4j:rootAppModuleScope name="SvgTableViewAppModule" >
<contents>
<header text="Search" >
<contents>
<form name="search" method="POST" >
<contents>
<inlineMessage prompt="Search" vAlign="middle" >
<contents>
<flowLayout>
<contents>
<choice name="attrName"
data:selectedValue="attrName@ctrl:page"
shortDesc="Search Column">
<contents>
<option text="SvgId" value="SvgId" />
<option text="AnalysisParam" value="AnalysisParam" />
<option text="Description" value="Description" />
<option text="Svg" value="Svg" />
</contents>
</choice>
<textInput name="attrValue" columns="20"
data:text="attrValue@ctrl:page"
shortDesc="Search"/>
</contents>
</flowLayout>
</contents>
<end>
<submitButton text="Go" ctrl:event="search" />
</end>
</inlineMessage>
</contents>
</form>
</contents>
</header>
<header text="Results" >
<contents>
<form name="viewForm" method="POST" >
<contents>
<tableLayout>
<contents>
<bc4j:viewObjectScope name="SvgTableView" >
<contents>
<bc4j:table name="viewTable" width="80%"
alternateText="No rows found">
<tableSelection>
<!-- single selection for each row in the table -->
<singleSelection selectedIndex="0" shortDesc="Select Row">
<contents>
<!-- the update button causes the currently selected
row to be sent to the update page -->
<submitButton text="Update"
ctrl:event="update" />
<!-- the delete button causes the currently selected
row to be removed -->
<submitButton text="Delete"
ctrl:event="delete" />
</contents>
</singleSelection>
</tableSelection>
<!-- the key identifying the current row in the table -->
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
<contents>
<!-- A bc4j:column element is added for each attribute
in the ViewObject. -->
<bc4j:column attrName="SvgId">
<columnHeader>
<bc4j:sortableHeader/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="AnalysisParam">
<columnHeader>
<bc4j:sortableHeader/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="Description">
<columnHeader>
<bc4j:sortableHeader/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="Svg">
<columnHeader>
<bc4j:sortableHeader/>
</columnHeader>
<contents>
<flowLayout>
<contents>
<html:object width="200" height="200">
<boundAttribute name="data">
<bc4j:ordProperty name="url"/>
</boundAttribute>
<boundAttribute name="type">
<bc4j:ordProperty name="contentType"/>
</boundAttribute>
</html:object>
<bc4j:input readOnly="true"/>
</contents>
</flowLayout>
</contents>
</bc4j:column>
</contents>
</bc4j:table>
</contents>
</bc4j:viewObjectScope>
</contents>
</tableLayout>
</contents>
</form>
</contents>
</header>
</contents>
</bc4j:rootAppModuleScope>
</contents>
<contentFooter>
<!-- the create button redirects to the create page -->
<button text="Create" ctrl:event="create" />
</contentFooter>
</pageLayout>
</contents>
</try>
</content>
<handlers>
<event name="search" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="SvgTableViewAppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="SvgTableView" >
<!-- search for the view criteria -->
<bc4j:findByExample>
<bc4j:exampleRow ignoreCase="true" >
<bc4j:exampleAttribute>
<bc4j:nameBinding><bc4j:parameter name="attrName" /></bc4j:nameBinding>
<bc4j:valueBinding><bc4j:parameter name="attrValue" /></bc4j:valueBinding>
</bc4j:exampleAttribute>
</bc4j:exampleRow>
</bc4j:findByExample>
<bc4j:executeQuery/>
<!-- store the current search criteria as page properties -->
<bc4j:setPageProperty name="attrName" >
<bc4j:parameter name="attrName" />
</bc4j:setPageProperty>
<bc4j:setPageProperty name="attrValue" >
<bc4j:parameter name="attrValue" />
</bc4j:setPageProperty>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="sort" source="viewTable" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="SvgTableViewAppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="SvgTableView" >
<!-- sort by the submitted attribute name -->
<bc4j:sort/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="goto" source="viewTable" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="SvgTableViewAppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="SvgTableView" >
<!-- navigate to the submitted range -->
<bc4j:goto/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="create" >
<!-- forward to the create page -->
<ctrl:go name="SvgTableView_Create" redirect="true" />
</event>
<event name="update" >
<!-- forward to the update page, passing the selected key
as a page property -->
<ctrl:go name="SvgTableView_Update" redirect="true" >
<ctrl:property name="key" >
<ctrl:selection name="viewTable" key="key" />
</ctrl:property>
</ctrl:go>
</event>
<event name="delete" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="SvgTableViewAppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="SvgTableView" >
<!-- find the selected Row -->
<bc4j:findRowByKey>
<bc4j:keyBinding>
<bc4j:selectionKey name="viewTable" key="key" />
</bc4j:keyBinding>
<bc4j:handlers>
<!-- remove the selected ViewObject row -->
<bc4j:removeRow />
<!-- execute the query to eliminate dead row access -->
<bc4j:executeQuery/>
</bc4j:handlers>
</bc4j:findRowByKey>
</bc4j:findViewObject>
<!-- commit the transaction, forwards to self automatically -->
<bc4j:commit/>
</bc4j:findRootAppModule>
</event>
</handlers>
</page>
Similar Messages
-
SVG image does not appear in mobile version but does in desktop version
Hi,
I am new to using Muse and have created only one site before in Muse. I have taken screenshots to show the problem I am having.
I have used Illustrator to create the following logo image that I save out as an SVG file:
As you've probably guessed, I have used clipping mask to insert the marbly purple image into the shapes and text (this may be relevant to the problem, I don't know).
I then save it out as an SVG with the following details as advised by Adobe:
Then moving into Muse, I File > Place the SVG file. 'Unable to generate thumbnail' comes up in both desktop and phone versions:
Regardless, I uploaded to FTP post to my website. While the SVG appears perfectly on my desktop browser, it does not show at all on my phone browser:
This is not only happening on my phone, I have visited the same website on multiple phone devices and still the SVG image does not appear. Any ideas why this is happening?
Have I totally missed something about file formats for mobile browser versions in Muse?
Also- in illustrator, I saved the SVG logo for the mobile version as a SMALLER SVG than the one I saved for the desktop version.
ThanksUse a PNG file. I see nothing in your logo that would warrant using anything else. You're not scaling it, there is no interaction and all you are doing is masking out some data that is pixels already. Pardon me, but using an SVG makes no sense at all. Beyond that one would need to see the file, but my guess would be that the "responsive" setting once again embeds some garbage data. Wouldn't be the first time...
Mylenium -
Adobe Edge Animate CC crashes when using big SVG images
Hi!
When I import SVG files to Edge Animate it freezes and I can't do something with that.
I tried to import one file at a time and it worked fine but when I save project and close program and then open my project again Edge Animate just crashes.
Also I tried to import very small images (100px x 100px) and then scale them to size I need and it causing app crash too.
I'm using Mac OS X 10.9.4I already found cause of this problem.
When you import SVG to Edge Animate it gives your SVG width and height 10 times more then original size of image and transform: scale(0.1). So when you import 5 SVG images 500x500 Adobe Edge makes them 5000x5000.
So that's cause app freezing and bad SVG displaying in browsers.
Always change scale(0.1) to scale(1) and reduce size from 5000px to 500px for example.
Best regards,
Alexey Prilovski. -
How to place SVG image in web page?
Attempting to use an SVG image for first time, saved out of
Illustrator CS3. When I try to place it on a web page in
Dreamweaver CS3, .svg file is greyed out. Dragging it onto page in
design view just makes a text link to the image, that has to be
clicked to display the SVG. What I really want to do is use SVG
file as a background image (800 x 600 px) that scales to fill
browser window - is that possible?
System: Mac OS X 10.4.11There is no reliable way to size an 800 x 600 background
image up or down
according to viewport size. You could center the page. Thus
your BG image
would move to center with page color appearing on either side
on wider
displays.
800 x 600 background image is quite large by web standards.
Most web
designers prefer to use small images or slices and then tile
or repeat them
horizontally and/or vertically.
Examples here:
http://alt-web.com/Backgrounds.shtml
--Nancy O.
Alt-Web Design & Publishing
www.alt-web.com
"driprint" <[email protected]> wrote in
message
news:fsk89k$e83$[email protected]..
> Attempting to use an SVG image for first time, saved out
of Illustrator
CS3.
> When I try to place it on a web page in Dreamweaver CS3,
.svg file is
greyed
> out. Dragging it onto page in design view just makes a
text link to the
image,
> that has to be clicked to display the SVG. What I really
want to do is use
SVG
> file as a background image (800 x 600 px) that scales to
fill browser
window -
> is that possible?
> System: Mac OS X 10.4.11
>
>
> -
White lines in *.SVG-images
When I'm placing a *.SVG-image in Muse, I get a thick white line in the bottom and a thinner white line to the right in the placed image. These lines kan not be removed in Muse. What do I do wrong?
For now the only fix is this choice:
1. Register for Adobe's beta program, sign a NDA and then see if the beta of Muse fixes SVG issues.
2. Wait for the next official point release of Muse.
Muse 2014.2 was released in early October. I'm wondering when "2014.3" will be released. Previously a lot of the point releases came every 2 or maybe 3 months. We're now at four months and counting between point releases. That's kind of a long time to wait for getting a pretty obvious bug fixed, such as the white underline problem in SVG images. I thought Adobe's engineers would have addressed that one pretty quickly.
Sidetrack:
I can only guess what's going on behind the scenes at Adobe. Perhaps they're making some pretty big, fundamental changes to Muse to make the application a whole lot better. I hope Adobe's engineers aren't getting sidetracked by armchair quarterback nonsense coming from stock investors. Creative Cloud subscription numbers are rising, but Adobe's margins have been shrinking, in part because of lots of research & development (good for us users). So lots of stock buyers are telling Adobe what they need to do, and some are suggesting they put a lot more of their resources behind sales and marketing tools. Adobe announced a $2 billion stock buy-back program in January (after finishing the previous one). Investors are very impatient. They're complaining about the hit to revenue over the transition from boxed perpetual license software to a subscription only model. The investors don't understand creative professionals are literally going to get forced onto Creative Cloud as they get rid of older, slower computers. They also don't seem privy to Adobe's growth in some other niches, like video. Premiere Pro has been surging in popularity at the expense of Final Cut and Avid. It reminds me of how InDesign rose to dominate Quark Xpress.
I don't like having to pay a subscription for Adobe applications, but for my work I am stuck with it. Adobe doesn't have enough credible competition to change that. And Adobe's competitors are trying to jump on the subscription model too. -
SVG-Images in Reports 11g?
Hi all,
does Reports 11g support the SVG images?
I get the follwing errors;
REP-606: Internal error writing the image null
REP-0606: Link file C:\Temp\test.svg cannot be read.
The file C:\Temp\test.svg exists.
RegardsHi,
for clarification purposes. SVG image format is only supported as output for reports graphs. If trying to link or use a SVG image in a report it wont work as that format is only supported for graph outputs.
Something to have in mind when running reports with graphs and using OUTPUTGRAPHFORMAT=svg. If using SVG in uppercase it wont run and fail with the following errors
REP-62204: Internal error writing the image null
REP-0069: An internal error occurred
If running in lower case OUTPUTGRAPHFORMAT=svg it will work as expected and you will get a svg image for your graph.
Hope it helps, Roberto -
My MIDlet cant accept SVG image Created with Inkscape and Adope Illustrator
Hi I am a kenyan Mobile application developer, I have made acouple of Midlets that call SVG images that I developed ysing inkscape 0.45 and finished in Adope illustrator. What can be the matter? or what SVG creator should I use? Pliz help.
Thanxif your target device(s) support [JSR 226 J2ME SVG|http://www.jcp.org/en/jsr/detail?id=226|specification here] API, then it should be capable to +"...load and render external 2D vector images, stored in the *W3C SVG Tiny* format..."+
-
Hi,
I am using an SVG image to be displayed on a pdf file.But the quality of image on pdf is not very clear.I had took printout of SVG object and pdf file and checked for the difference.SVG object printout is crystal clear and pdf printout is dotted and blurred.Is there anyway i can improve the quality of the image so generated on PDF?
regards,
Ravi Kumar.Hi Rick,Sacha
Actually my SVG image doesn't possess any embedded images.It just consists of a text and a barcode which is to be displayed on a pdf file.I am observing the quality of the pdf to be very low after rendering.It's showing in the form of close dots.But the size of dots are huge enough to be noticed.(Pdf printout is not getting printed properly).
I had tried converting into .png and .jpeg format and observed the images.It's showing up in the same way.It may be due to sharp changes in contrast as Sacha mentioned.Is there any way in which i can improve the quality of image.I don't mine if i get the output in other format but it should be in a good printable format?
Regards,
Ravi Kumar. -
Hello,
I need to run an SVG file from a servlet so I embedded it like this:
out.println("<HTML>");
out.println("<embed src=\"draw_objects1.svg\" width=\"350\" height=\"176\" type=\"image/svg+xml\">");
out.println("</HTML>");
and I am using:
res.setContentType("text/html");
When I try to run my servlet as localhost:80/servlet/draw_svg I am only getting an empty box defined by width and height but I don't see the actual svg image. Does anybody know what the problem could be? I put the 'draw_objects1.svg' where my servlet class is but I still can't see the image. Please help.
Thank you,
Victor.Hello,
I've solved the problem. It worked when I embedded my svg using url source
out.println("<embed src=\"http://localhost:8081/draw_objects1.svg\" width=\"350\" height=\"176\" type=\"image/svg+xml\">");
Thank you,
Victor. -
How does Firefox handle xml:base when generating GET requests for SVG image elements?
I am loading an SVG image at the following URL:
http://localhost/howl/svg/id/543
The source for this SVG code is:
<svg xml:base="/howl/">
<svg width="535" height="325" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="file/id/532" />
</svg>
</svg>
As you can see, the SVG code is located at one path, but the <image> is relative to the root, hence the wrapping xml:base attribute.
The actual requests in Firefox, according to Tomcat Logging are:
GET /howl/svg/id/543
GET /howl/file/id/532
However, Firebug's Net tab shows these requests:
GET /howl/svg/id/543
GET /howl/svg/id/file/id/532 (Incorrect, doesn't happen)
GET /howl/file/id/532
When I test the same thing in Safari and Chrome, all three GET requests actually happen, the incorrect one resolving in a 404.
I suspect that Firefox is generating all three requests, but discarding the incorrect one and Firebug is not aware of this. As a result, Firebug shows all three requests, but the incorrect one never resolves.
So, I'm curious about the behavior or whether I am doing this incorrectly.
Thanks!A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
The helpers at that forum are more knowledgeable about web development issues.<br />
You need to register at the mozillaZine forum site in order to post at that forum.<br />
See http://forums.mozillazine.org/viewforum.php?f=25 -
Making a TTF font file from set of SVG images
Hi,
I produced a large set of Egyptian Hieroglyph outlines in SVG file format and I would like to produce a TTF font file using these images ( http://www.qsl.net/5b4az/pages/egypt.html ).
Is there an application or some other way to consolidate these SVG image files into a TTF font file please? Without having to import them one at a time? (there is 1070 of these!)
My thanks in advance.thisoldman wrote:I've looked into this and there is no easy way to be found. But I did find this python script: http://tinkerhouse.net/log/python-fontf … a-godsend/.
Thank you, I will see if I can modify it for my needs.
For fonts with good selections of Egyptian hieroglyphs, you might look at NewGardiner.ttf, http://www.cs.st-andrews.ac.uk/~mjn/egy … diner.html, and Aegyptus.otf, http://users.teilar.gr/~g1951d/.
I actually produced all these hieroglyph images by extracting the glyphs from Aegypus.otf into individual pgm image files and editing in the Gimp. I did this for the basic Gardiner set and the extra hieroglyphs suggested in the NewGardiner font. But as I put a lot of effort into retouching all these images, I would like to assemble them into a ttf font file. Just a thought..... -
Error during "Save as XML" - SVG Image
Hi,
I am trying to save the book as XML (File à Save as XML), but its showing the attached error (FMError.PNG). FrameMaker created a error log and am pasting its header contents below.
=== Header Begin ===
Internal Error: 9004, 6920492, 9676798, 0
FrameMaker 9.0.0 for Intel
Build: 9.0p237
Window System: MSWindows
Operating System: Windows NT 6.1 (major.minor.build: 6.1.7600 )
Generated on: Wednesday, September 08, 2010 2:14:40 PM
To file: C:\Users\30088130\AppData\Roaming\Adobe\FrameMaker\9\FrameLog_10.09.08_14.14.40.txt
=== Header End ===
This errors occurs only if SVG images are present on the fm files.
Please help me on this.I just tested with a small sample SVG file (from here:
http://www.w3schools.com/svg/tryit.asp?filename=ellipse1&type=svg )
and FM didn't crash when I did Save as XML. I put the SVG inside an anchored frame.
Could you test using that specific image and see if you get the crash or whether it's OK?
Unfortunately FM did clip the right side of the image when the image is displayed, and also when the image is saved to XML (it was converted to GIF in the export).
Googling for "svg framemaker" brought up some old Framers list references to other issues with FM's SVG handling.
I also notice that in the maker.ini there is a commented out reference to an SVG import filter in the APIClients section:
;SVG Import=FileToFileGFXImport, SVG, FrameImage, SVG, ORBL, SVG, SVG, filters\svgfilter.dll,all,^.svg
SVG Import=FileToFileGFXImport, SVG, PDF, SVG, ORBL, SVG, SVG, filters\svg2pdf.dll,all,^.svg
What it seems to be changing is that the second line will automatically convert SVG to PDF on import, so
you might try the other filter:
save a backup copy of the maker.ini, open the makier.ini in a text editor, then switch the semi-colon to the next line, save, and test to see whether you get any better results.
Have you been able to successfully export any files with SVG, or does the problem only occur with some files?
Also, exactly how are you importing the problem SVG file into FM? Referenced or embedded, is it on a body page, master page, in an anchored graphic frame or not, etc? Do you know what application was used to create the SVG files?
Sheila -
Hello everybody,
I would like to reopen the following discussion: Show SVG-Image in WebView (JavaFX 8)
In our IDE (Eclipse Luna) running with jdk1.8.0_25 we load a html page into the webengine. The html page contains <img> tags with '.png' and '.svg' as src. Everything looks fine.
But if we execute the programm with java -jar, the WebEngine doesn't display the svg-files. Instead it shows the 'File not find'-Icon. The .png files still work
The files are definitly included into the jar and will be displayed if we link to them via <a href="someSvg.svg"></a>
So actually we have no idea why it doesn't work.
Any ideas ?
Greatings
JulianOften the cause of things working in an IDE where things aren't packaged into a JAR but not working outside the IDE when things are packaged in JARs:
1. The relevant files aren't included in the JARs (based on the info in your question, this is not the case for you).
2. Your application is coded to use a file protocol or the File class rather than using getResource (again from the info in your question this is probably not the case for you).
3. You are using relative parent links (such as ..) in relative path references - these don't work inside Jar files - all references must be absolute, or relative to the current resource location or a child of that (e.g. ../myimage.svg won't work, but /myimage.svg or myimage.svg or /imgs/myimage.svg or imgs/myimage.svg will as long as the image is in the correct location). This is probably too internally for things as well (for example if your html or svg file has an external reference).
So perhaps none of the above are your actual issues, just mentioning them in case. -
How to display dynamically generated SVG image
Hello, I need some help on this issue...
I need my page to display programmatically generated SVG image. but if i directly pass SVG string to the page like <h:outputText value="#{MyBean.SVGresult}"/> it will pop up a download dialog box. what should i do to properly include my svg into the page by using embed tag??The h:graphicImage does not appear to handle svg; maybe it should be extended. I'm still looking for the best way to do it. I don't know if I have the right solution but here is what I have done so far. This will throw up a x, y polyline graph.
Put a panelGrid as place holder in the jsp
<h:panelGrid title="Report" style="color=black" border="0" id="dataReports" columns="1" binding="#{dataAnalysis.dataReport}">
</h:panelGrid>Then take a 'template' svg and fill it in with the dynamic additions and changes in the backing bean. In a submit action
generateSVGGraph(twothetaArray, intensityArray);
UIColumn c=new UIColumn();
HtmlOutputText op=new HtmlOutputText();
op.getAttributes().put("style","color=black");
op.setTitle("header text");
op.setValue("header text");
c.setHeader(op);
//c.getFacets().put()
//c.getChildren().add("<embed src=\"../phase.svg\" align=\"left\" width=\"500\" height=\"500\" type=\"image/svg+xml\"/>");
//javax.faces.webapp.UIComponentBodyTag embed=new javax.faces.webapp.UIComponentBodyTag();
//javax.servlet.jsp.tagext.TagAdapter;
com.hypernex.jsf.ext.html.HtmlEmbedGraphic embedGraphic=new com.hypernex.jsf.ext.html.HtmlEmbedGraphic();
//embedGraphic.
embedGraphic.getAttributes().put("src","../session/phase"+phaseGraphCount+".svg");
embedGraphic.getAttributes().put("align","left");
embedGraphic.getAttributes().put("width","600");
embedGraphic.getAttributes().put("height","500");
embedGraphic.getAttributes().put("type","image/svg+xml");
c.getChildren().add(embedGraphic);
dataReport.getChildren().add(c);
c=new UIColumn();
op=new HtmlOutputText();
op.getAttributes().put("style","color=black");
op.setTitle("header text");
op.setValue("header text");
c.setHeader(op);
HtmlOutputText out=new HtmlOutputText();
out.getAttributes().put("style","color=black");
//out.setTitle("Figure 1. Powder intensity as dependent on 2θ.");
out.setValue("Figure "+phaseGraphCount+". Powder intensity as dependent on 2Theta.");
c.getChildren().add(out);
dataReport.getChildren().add(c);
...generateSVGGraph
protected void generateSVGGraph(double[] x, double[] y)
//FacesContext context = FacesContext.getCurrentInstance();
//context.
//Create an svg graph of the equation.
org.apache.batik.dom.svg.SAXSVGDocumentFactory svgFactory=new org.apache.batik.dom.svg.SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser");
org.apache.batik.dom.svg.SVGDOMImplementation svgDOMImplementation=new org.apache.batik.dom.svg.SVGDOMImplementation();
org.w3c.dom.DocumentType dt=null;//svgDOMImplementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN",f.toURI().toString());
//System.out.println(dt);
org.w3c.dom.svg.SVGDocument svgOMDocument=null;
try
System.out.println("dir "+(new java.io.File(".")).toURI().toString());
svgOMDocument=(org.w3c.dom.svg.SVGDocument)svgFactory.createDocument((new java.io.File("../webapps/jsf-wita/siteadmin/templates/graph-template.svg")).toURI().toString(), new java.io.FileInputStream(new java.io.File("../webapps/jsf-wita/siteadmin/templates/graph-template.svg")));//new org.apache.batik.dom.svg.SVGOMDocument(dt, (org.w3c.dom.DOMImplementation)svgDOMImplementation);
org.w3c.dom.svg.SVGSVGElement root=svgOMDocument.getRootElement();
org.apache.batik.dom.svg.SVGOMGElement primary_g=new org.apache.batik.dom.svg.SVGOMGElement("", (org.apache.batik.dom.AbstractDocument)svgOMDocument);
primary_g.setAttribute("style","stroke:black; fill:none; stroke-width:1");
root.appendChild(primary_g);
//double[] x=new double[4*90];
//double[] y=new double[x.length];
//x[0]=(double)(1)/4.0;
//methodArgs[0]=new Double(Math.toRadians(x[0]));
//y[0]=((Double)method.invoke(mathmlObject, methodArgs)).doubleValue();
double xMin=x[0];
double yMin=y[0];
double xMax=x[x.length-1];
double yMax=xMax;
double xOfyMax=yMin;
StringBuffer points=new StringBuffer();
for(int index=0;index<x.length-1;index++)
//System.out.println(x[index]+" "+y[index]);
//x[index]=(double)(index+1)/4.0;
//methodArgs[0]=new Double(Math.toRadians(x[index]));
//y[index]=((Double)method.invoke(mathmlObject, methodArgs)).doubleValue();
double cx=x[index];
double cy=y[index];
//if(xMin>cx)xMin=cx;
if(yMin>cy)yMin=cy;
//if(xMax<cx)xMax=cx;
if(yMax<cy)
xOfyMax=cx;
yMax=cy;
org.w3c.dom.svg.SVGTextElement xLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("xLabel");
xLabel.getFirstChild().setNodeValue("2?");//?");
org.w3c.dom.svg.SVGTextElement xMinimumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("xMinimumLabel");
xMinimumLabel.getFirstChild().setNodeValue(ddf.format(xMin,4).toString());
org.w3c.dom.svg.SVGTextElement xMaximumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("xMaximumLabel");
xMaximumLabel.getFirstChild().setNodeValue(ddf.format(xMax,4).toString());
org.w3c.dom.svg.SVGTextElement yMinimumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("yMinimumLabel");
yMinimumLabel.getFirstChild().setNodeValue(ddf.format(yMin,4).toString());
org.w3c.dom.svg.SVGTextElement yMaximumLabel=(org.w3c.dom.svg.SVGTextElement)svgOMDocument.getElementById("yMaximumLabel");
yMaximumLabel.getFirstChild().setNodeValue(ddf.format(yMax,4).toString());
for(int index=0;index<x.length-1;index++)
points.append((x[index]-xMin)*500/(xMax-xMin));
points.append(",");
points.append((y[index]-yMin)*500/(yMax-yMin));
points.append(" ");
//System.out.println(points);
org.apache.batik.dom.svg.SVGOMGElement g=new org.apache.batik.dom.svg.SVGOMGElement("", (org.apache.batik.dom.AbstractDocument)svgOMDocument);
g.setAttribute("id",(String)"data");
g.setAttribute("transform", "translate(100, 550)");
g.setAttribute("style","stroke:black; fill:none; stroke-width:1");
org.apache.batik.dom.svg.SVGOMPolylineElement polyLine=new org.apache.batik.dom.svg.SVGOMPolylineElement("", (org.apache.batik.dom.AbstractDocument)svgOMDocument);
polyLine.setAttribute("fill", "none");
polyLine.setAttribute("stroke", "blue");
polyLine.setAttribute("transform", "scale(1, -1)");
polyLine.setAttribute("stroke-width", "1");
polyLine.setAttribute("points", points.toString());
g.appendChild(polyLine);
primary_g.appendChild(g);
javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer intermediateTransformer=tFactory.newTransformer(new javax.xml.transform.stream.StreamSource("../webapps/jsf-wita/stylesheets/identity.xsl"));
intermediateTransformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
intermediateTransformer.setOutputProperty(OutputKeys.INDENT, "yes");
intermediateTransformer.transform(new javax.xml.transform.dom.DOMSource(svgOMDocument), new javax.xml.transform.stream.StreamResult(new java.io.FileOutputStream("../webapps/jsf-wita/session/phase"+phaseGraphCount+".svg")));
catch(javax.xml.transform.TransformerConfigurationException tce)
System.out.println("tce err: "+tce.getMessage());
catch(javax.xml.transform.TransformerException te)
System.out.println("te err: "+te.getMessage());
catch(java.io.FileNotFoundException fnfe)
System.out.println("fnfe:"+fnfe.getMessage());
catch(java.io.IOException ioe)
System.out.println("io:"+ioe.getMessage());
HtmlEmbedGraphic.java
* HtmlEmbedGraphic.java
* Created on May 16, 2004, 8:12 AM
package com.hypernex.jsf.ext.html;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
* @author hyperdev
public class HtmlEmbedGraphic extends javax.faces.component.UIComponentBase
/** Creates a new instance of HtmlEmbedGraphic */
public HtmlEmbedGraphic()
super();
public String getFamily()
return "javax.faces.Data";
public boolean isRendered()
return true;
public void encodeBegin(FacesContext context,
UIComponent component) throws java.io.IOException {
if ((context == null) || (component == null)){
System.out.println("encodeBegin NullPointerException "+context);
throw new NullPointerException();
System.out.println("encodeBegin "+context+" "+component);
//MapComponent map=(MapComponent) component;
ResponseWriter writer = context.getResponseWriter();
writer.startElement("embed", this);
writer.writeAttribute("src", getAttributes().get("src"),"id");
public void encodeEnd(FacesContext context) throws java.io.IOException {
if ((context == null)){
throw new NullPointerException();
//MapComponent map = (MapComponent) component;
ResponseWriter writer = context.getResponseWriter();
writer.startElement("embed", this);
writer.writeAttribute("src", getAttributes().get("src"),"id");
writer.writeAttribute("align", getAttributes().get("align"),"id");
writer.writeAttribute("width", getAttributes().get("width"),"id");
writer.writeAttribute("height", getAttributes().get("height"),"id");
writer.writeAttribute("type", getAttributes().get("type"),"id");
writer.endElement("embed");
}graph-template.svg - More static parts of the graphic can be put in here.
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="text/ecmascript" width="100%" zoomAndPan="magnify" contentStyleType="text/css" viewBox="0 0 600% 600%" height="100%" preserveAspectRatio="xMidYMid meet" version="1.0">
<g style="stroke:black; fill:none; stroke-width:1">
<g id="visuals" style="stroke:black; fill:none; stroke-width:1" transform="translate(100, 550)">
<rect id="box" transform="scale(1, -1)" x="1" y="1" width="500" height="500" fill="none" stroke="black" stroke-width="1.5"/>
<g id="labels" transform="scale(1, 1)">
<text id="xLabel" x="250" y="50" text-anchor="middle"
font-family="Verdana" font-size="24" fill="blue" >x label</text>
<text id="xMinimumLabel" x="0" y="20" text-anchor="middle"
font-family="Verdana" font-size="18" fill="blue" >0.0</text>
<text id="xMaximumLabel" x="500" y="20" text-anchor="middle"
font-family="Verdana" font-size="18" fill="blue" >100.0</text>
<text id="yMinimumLabel" x="-3" y="-3" text-anchor="end"
font-family="Verdana" font-size="18" fill="blue" >0.0</text>
<text id="yMaximumLabel" x="-3" y="-500" text-anchor="end"
font-family="Verdana" font-size="18" fill="blue" >100.0</text>
</g>
</g>
<g id="data" style="stroke:black; fill:none; stroke-width:1" transform="translate(10, 550)">
</g>
</g>
</svg> -
Create Xcursor Theme with SVG Images?
Is it possible to create an xcursor theme with SVG images instead of PNG images?
An unproductive Google search is making me guess that the answer is "No." Also, I've downloaded a few from the AUR, and none of them use SVG images (unless they're being used as examples). Does anyone know if this is possible?view > edit slide master
delete all the slide masters except the master you want to use
File > Save Theme and add to theme chooser
select the default theme when opening Keynote: Keynote preferences > General > For new documents; select use theme > change theme
Maybe you are looking for
-
DVI to VGA or DVI to Component?
I just purchased a new 26" LCD tv. I've notice whenever I connect anything to it via VGA (e.g: Macbook Pro, iMac, or my Xbox360) the colors are somewhat washed out, there's a great deal of pixilation, as well as poor black levels. Yet when I watch th
-
Broken links on FOSS open hardware page
Hi, Some of the links on the FOSS open hardware documentation page seem broken (http://wikis.sun.com/display/FOSSdocs/Home). For example, there is a link for Tomatillo to http://www.sun.com/processors/manuals/PIO_ref_manual.pdf but no PDF document ap
-
Lenovo U410 - Win8 / Unable to access OS + BIOS on statup
Hi Guys, I hope that someone can provide some assitance for me please? About 1 week ago, I was using my Lenovo U410 ultrabook without any issues when I decided to power off as normal. I did this but it wouldn't power off automatically, as the screen
-
Activating Flash Professional CS3
I have a business need to reactivate Flash CS3 on a few machines. As far as I can tell from adobe, the authentication servers haven't been shut down. But when I try and activate; I get an 'Activation - No Connection' error. I would assume my inter
-
3D printing - How do you create a dual colored print?
I have a FlashForge 3D printer, its a dual extruder, and I have some designs that I want to print in two colors. Is there a way to create this in PS?