Re: [Xsltforms-support] applet-based local save/load using file://
Brought to you by:
alain-couthures
From: ac <ac...@hy...> - 2011-03-05 23:36:31
|
Hi Alain, Sometime, the simplest things ... I checked the version number and it was and is still 487. I went to the SVN repo (http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/branches/dataisland/build/) and picked up every file updated in the last 10 days, including the xsltforms.js, xsltforms.xsl, and xsltforms.jar Still using Firefox v3.6.14, and having reset the cache, I got this error, on pressing the "Local Save" button: XSLTForms Exception -------------------------- Error initializing : ((void 0),"UTF-8","string","XSLTForms Java Saver","<stratml:PerformancePlanOrReport xmlns:stratml=\"http://www.stratml.net/PerformancePlanOrReport\" Type=\"Strategic_Plan\"><stratml:Name>Plan Name Goes Here</stratml:Name><stratml:Description/><stratml:OtherInformation/><stratml:StrategicPlanCore><stratml:Organization><stratml:Name/><stratml:Acronym/><stratml:Identifier/><stratml:Description/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder></stratml:Organization><stratml:Vision><stratml:Description/><stratml:Identifier/></stratml:Vision><stratml:Mission><stratml:Description/><stratml:Identifier/></stratml:Mission><stratml:Value><stratml:Name/><stratml:Description/></stratml:Value><stratml:Goal><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:Objective><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:PerformanceIndicator ValueChainStage=\"\" IndicatorType=\"\"><stratml:MeasurementDimension/><stratml:UnitOfMeasurement/><stratml:Identifier/><stratml:OtherInformation/><stratml:Relationship RelationshipType=\"\"><stratml:Name/><stratml:Description/><stratml:Identifier/></stratml:Relationship><stratml:MeasurementInstance><stratml:TargetResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:TargetResult><stratml:ActualResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:ActualResult></stratml:MeasurementInstance></stratml:PerformanceIndicator></stratml:Objective></stratml:Goal></stratml:StrategicPlanCore><stratml:AdministrativeInformation><stratml:StartDate/><stratml:EndDate/><stratml:PublicationDate/><stratml:Source/></stratml:AdministrativeInformation><stratml:Submitter><stratml:FirstName/><stratml:LastName/><stratml:PhoneNumber/><stratml:EmailAddress/></stratml:Submitter></stratml:PerformancePlanOrReport>")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:341 ("","UTF-8","string","XSLTForms Java Saver","<stratml:PerformancePlanOrReport xmlns:stratml=\"http://www.stratml.net/PerformancePlanOrReport\" Type=\"Strategic_Plan\"><stratml:Name>Plan Name Goes Here</stratml:Name><stratml:Description/><stratml:OtherInformation/><stratml:StrategicPlanCore><stratml:Organization><stratml:Name/><stratml:Acronym/><stratml:Identifier/><stratml:Description/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder></stratml:Organization><stratml:Vision><stratml:Description/><stratml:Identifier/></stratml:Vision><stratml:Mission><stratml:Description/><stratml:Identifier/></stratml:Mission><stratml:Value><stratml:Name/><stratml:Description/></stratml:Value><stratml:Goal><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:Objective><stratml:Name/><stratml:Description/><stratml:Identifier/><stratml:SequenceIndicator/><stratml:OtherInformation/><stratml:Stakeholder><stratml:Name/><stratml:Description/><stratml:Role><stratml:Name/><stratml:Description/><stratml:RoleType/></stratml:Role></stratml:Stakeholder><stratml:PerformanceIndicator ValueChainStage=\"\" IndicatorType=\"\"><stratml:MeasurementDimension/><stratml:UnitOfMeasurement/><stratml:Identifier/><stratml:OtherInformation/><stratml:Relationship RelationshipType=\"\"><stratml:Name/><stratml:Description/><stratml:Identifier/></stratml:Relationship><stratml:MeasurementInstance><stratml:TargetResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:TargetResult><stratml:ActualResult><stratml:Description/><stratml:NumberOfUnits/><stratml:StartDate/><stratml:EndDate/></stratml:ActualResult></stratml:MeasurementInstance></stratml:PerformanceIndicator></stratml:Objective></stratml:Goal></stratml:StrategicPlanCore><stratml:AdministrativeInformation><stratml:StartDate/><stratml:EndDate/><stratml:PublicationDate/><stratml:Source/></stratml:AdministrativeInformation><stratml:Submitter><stratml:FirstName/><stratml:LastName/><stratml:PhoneNumber/><stratml:EmailAddress/></stratml:Submitter></stratml:PerformancePlanOrReport>")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:355 ()@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:2659 ([object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:7387 ([object HTMLSpanElement],"xforms-submit")@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:7285 ([object HTMLSpanElement],[object Element],[object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3280 ([object HTMLSpanElement],[object Element],[object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3141 ([object HTMLSpanElement],[object Element],[object Event])@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:3126 (2)@http://localhost:8080/library/hyperform/stratml/asset/xml/xsltforms/xsltforms.js:1319 TypeError document.applets.xsltforms.writeFile is not a function Line 341 in xsltforms.js is indeed return document.applets["xsltforms"].writeFile(fname, encoding, xsdtype, title, content) == 1; So it seems that there was an improvement, but I must still have something wrong. Any light that you could shed would be still much appreciated. Thank you. Regards, Andre > Hi André, > > The message you obtained comes from an older version than Beta3 which > was indeed released on 2011-02-27. > > Please check the first line in the xsltforms.js file. > > Thanks! > > -Alain > > Le 04/03/2011 19:19, Andre Cusson a écrit : >> Hi Alain, >> >> Using RC3 from 2011-02-27, I tried getting the applet-based saving >> and loading but I must have missed something as I am getting this >> message when I either try to load or save: >> >> XSLTForms Submission >> --------------------------- >> >> file:// >> >> file:// is not supported for security reasons. >> >> Contents copied instead in clipboard if possible >> and displayed by the browser. >> >> >> In the model, I used >> >> <xf:submission id="save" method="put" replace="none" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> <xf:submission id="load" method="get" serialization="none" >> replace="instance" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> >> and in the form I have: >> >> <xf:submit submission="save"> >> <xf:label>Save to local disk</xf:label> >> </xf:submit> >> <xf:submit submission="load"> >> <xf:label>Restore from local disk</xf:label> >> </xf:submit> >> >> >> What must I be doing wrong this time :)? >> >> Thank you. >> >> Rgards, >> Andre >> >> >> >> >> Hello, >> >> I have added"file://" support in submission allowing users to save and >> restore data instances on local disk with regular files. >> >> This is based on a Java applet. There are some integrated security >> restrictions such as forbidden file extensions (.exe,...) and maximum >> size (100 Mo). BOM is not yet supported. >> >> Each time, a Java file dialog is displayed to allow the user to select >> the folder and to enter the file shortname. This dialog is initialized >> with the path after"file://", if any. >> >> I have tested this successfully on Windows with FireFox, IE and Chrome >> (there were some errors before accepting the applet, maybe wait >> instructions (1 or 2 seconds) might help...) but it doesn't work yet >> with Opera. Please find my test case below. >> >> Thank you for your feedbacks! >> >> -Alain >> ------------------------------------------------------------------------ >> <?xml version="1.0" encoding="UTF-8"?> >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> >> <html xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xf="http://www.w3.org/2002/xforms"> >> <head> >> <title>Address Form</title> >> <xf:model> >> <xf:instance> >> <Address xmlns=""> >> <LocationStreetFullText/> >> <LocationCityName/> >> <LocationStateName/> >> <LocationPostalID/> >> </Address> >> </xf:instance> >> <xf:submission id="save" method="put" replace="none" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> <xf:submission id="load" method="get" serialization="none" >> replace="instance" action="file://"> >> <xf:message level="modeless" ev:event="xforms-submit-error">Submit >> error.</xf:message> >> </xf:submission> >> </xf:model> >> </head> >> <body> >> <xf:group ref="/Address"> >> <fieldset> >> <legend>Mailing Address</legend> >> <xf:input ref="LocationStreetFullText"> >> <xf:label>Street:</xf:label> >> </xf:input> >> <br/> >> <xf:input ref="LocationCityName"> >> <xf:label>City:</xf:label> >> </xf:input> >> <br/> >> <xf:input ref="LocationStateName"> >> <xf:label>State:</xf:label> >> </xf:input> >> <br/> >> <xf:input ref="LocationPostalID"> >> <xf:label>Postal Code:</xf:label> >> </xf:input> >> </fieldset> >> </xf:group> >> <xf:submit submission="save"> >> <xf:label>Save to local disk</xf:label> >> </xf:submit> >> <xf:submit submission="load"> >> <xf:label>Restore from local disk</xf:label> >> </xf:submit> >> </body> >> </html> >> >> > > > ------------------------------------------------------------------------------ > What You Don't Know About Data Connectivity CAN Hurt You > This paper provides an overview of data connectivity, details > its effect on application quality, and explores various alternative > solutions. http://p.sf.net/sfu/progress-d2d > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |