Simply problem with save

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Simply problem with save

simone123456
Help me I don't be able to simply save maybe  save maybe I do one simply error that I don't see the code is this one:

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" 
          xmlns:xs="http://www.w3.org/2001/XMLSchema" 
          xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" 
          xmlns="http://www.w3.org/1999/xhtml" 
          xmlns:xforms="http://www.w3.org/2002/xforms" 
          xmlns:ev="http://www.w3.org/2001/xml-events">

<xhtml:head>
        <xforms:model>

 <xforms:send ev:event="xforms-ready" submission="save-file"/>
           
               

                <xforms:instance id="instance-rubrica"
                src="oxf:/apps/tirocinio/salvare/rubrica.xml" />
   
    <xforms:instance id="instance-modifica-rubrica">
        <modifica xmlns="">
                <name value="francy"/>
           
        </modifica>
</xforms:instance>



     
                <xforms:submission id="save-file" ref="instance(instance-rubrica)"
         action="oxf:/apps/tirocinio/salvare/rubrica.xml"
            method="put" replace="instance"/>
   
   
   
    </xforms:model>
   
</xhtml:head>

<title>salva su file</title>


<xhtml:body>

        <xforms:trigger>
        <xforms:label>insert</xforms:label>
    <xforms:action ev:event="DOMActivate" >
                                <xforms:insert  context="instance('instance-rubrica')" nodeset="page"
            origin="instance('instance-modifica-rubrica')/name"/>
                        </xforms:action>
                </xforms:trigger>

           
           

<xforms:submit submission="save-file">
        <xforms:label>save</xforms:label>
</xforms:submit>
 
<widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/>

</xhtml:body>
</xhtml:html>

the text in rubrica.xml is this one:
<config >

   
        <name value="simon"/>
        <name value="andrew"/>
       
       

</config>
Reply | Threaded
Open this post in threaded view
|

Re: Simply problem with save

Alessandro Vernet
Administrator
Simone,

On Wed, Jul 30, 2008 at 5:39 AM, simone123456 <[hidden email]> wrote:
>                <xforms:submission id="save-file" ref="instance(instance-rubrica)"
>         action="oxf:/apps/tirocinio/salvare/rubrica.xml"
>            method="put" replace="instance"/>

Thank you for the example. The issue is with the submission above.
Using a URL oxf:/ as the target of a PUT is not supported. It would be
nice to support it, but since this is something that you most likely
would pretty much only use for testing (not in production), we just
never got to do it.

For now, if you want to write a file to disk, you need to implement a
service (XPL with an entry in the page flow) that uses the file
serializer.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Simply problem with save

simone123456
Thanks, but now I'm trying to implement a
service xpl, but don't save:
the code is:
      code xhtml(simplify respect the other):
          <html
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:xforms="http://www.w3.org/2002/xforms"
   xmlns:ev="http://www.w3.org/2001/xml-events">
   <head>
      <title>XForms Submit Example</title>
      <xforms:model>
        <xforms:instance id="instance-name">
        <modify xmlns="">
                <nomi>
                  <nome>simon</nome>
                  <nome>andrew</nome>
                </nomi>               
         
        </modify>
                </xforms:instance>
           
 <xforms:submission id="save" ref="instance('instance-name')" method="post" action="/xforms-controls/save" replace="none"/>       
</xforms:model>
   </head>
   <body>
   
       <xforms:submit submission="save">
         <xforms:label>Save</xforms:label>
      </xforms:submit>
     
     
   </body>
</html>

the xpl code:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
        xmlns:oxf="http://www.orbeon.com/oxf/processors">

        <p:param name="instance" type="input"/>
       
                       
        <p:processor name="oxf:xml-converter">
            <p:input name="config">
                <config>
                    <encoding>utf-8</encoding>
                </config>
            </p:input>
            <p:input name="data" href="#instance"/>
            <p:output name="data" id="converted"/>
        </p:processor>
                       
        <p:processor name="oxf:file-serializer">
            <p:input name="config">
                <config>
                    <content-type>text/xml</content-type>
                    <directory>c:/temp</directory>
                   
                    <file>test.xml</file>
                    <append>false</append>
                </config>
            </p:input>
            <p:input name="data" href="#converted"/>
        </p:processor>

    </p:config>
in the page-flow I have:
<page path-info="/xforms-controls/save">
      <action action="framework/save-instance-action.xpl"/>
    </page> 

I don't understand where is the proplem because for orbeon is all ok but don't save




Alessandro Vernet wrote
Simone,

On Wed, Jul 30, 2008 at 5:39 AM, simone123456 <alien1982@libero.it> wrote:
>                <xforms:submission id="save-file" ref="instance(instance-rubrica)"
>         action="oxf:/apps/tirocinio/salvare/rubrica.xml"
>            method="put" replace="instance"/>

Thank you for the example. The issue is with the submission above.
Using a URL oxf:/ as the target of a PUT is not supported. It would be
nice to support it, but since this is something that you most likely
would pretty much only use for testing (not in production), we just
never got to do it.

For now, if you want to write a file to disk, you need to implement a
service (XPL with an entry in the page flow) that uses the file
serializer.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: Re: Simply problem with save

Alessandro Vernet
Administrator
On Mon, Aug 18, 2008 at 3:38 AM, simone123456 <[hidden email]> wrote:
> Thanks, but now I'm trying to implement a
> service xpl, but don't save:
> the code is: [...]

Is the XPL called? You can put a debug="..." on the instance input of
the XPL to see what you get there. If the XPL is called, the document
the XPL gets will be logged in orbeon.log. You should be able to learn
more about what is wrong by looking at orbeon.log; if the submission
fails, you should have some information there telling you why.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Simply problem with save

simone123456
thanks I have found the error there are some error in the path-info
Alex wrote
>Is the XPL called? You can put a debug="..." on the instance input of
>the XPL to see what you get there. If the XPL is called, the document
>the XPL gets will be logged in orbeon.log. You should be able to learn
>more about what is wrong by looking at orbeon.log; if the submission
>fails, you should have some information there telling you why.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/