problem with upload button in ops3.5.1

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

problem with upload button in ops3.5.1

Laxmi Narayana-3
Hi all ,
I  designed upload button on ops 3.5.1.
i want to manually not enter any value into uploadbutton.
I kept validation like below:
<xforms:bind nodeset="//file/@size"  constraint="string-length(.)!=0"/>
or
<xforms:bind nodeset="//file" constraint=". != ''"/>
it is not allowing to enter  manually anyvalue into upload button that is fine .but I upload anyclass through upload button and i click on submit button submission is not happening.
 
mycontrol code is like:

<instance>
    <job-class><xsl:value-of select="filename"/></job-class> 
    <file filename="" mediatype="" size=""></file> 

  </instance>
  

    <xforms:upload ref="instance('main-instance')/file">
                <xforms:filename ref="@filename"></xforms:filename>
               <xforms:mediatype ref="@mediatype"/>
                <xxforms:size ref="@size"/>
          </xforms:upload>

               plz help me this is urgent requirement for our project.

thanks in advance,

Laxminarayana

 



--
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: problem with upload button in ops3.5.1

Alessandro Vernet
Administrator
Laxmi,

On Tue, May 20, 2008 at 4:57 AM, Laxmi Narayana <[hidden email]> wrote:
> i want to manually not enter any value into uploadbutton.
> I kept validation like below:
> <xforms:bind nodeset="//file/@size"  constraint="string-length(.)!=0"/>
> or
> <xforms:bind nodeset="//file" constraint=". != ''"/>
> it is not allowing to enter  manually anyvalue into upload button that is
> fine .but I upload anyclass through upload button and i click on submit
> button submission is not happening.

Is your intent to make sure user select a file before they submit the
form? This is a little tricky, as the file will only be uploaded to
the server when the form is submitted. So until it is submitted, the
file isn't sent to the server; the server won't know that a file was
selected; and the submission will fail because the server thinks no
file has been selected.

I think that one way around this is to create a "dummy" submission
with validate="false", replace="none" to a XPL that doesn't do
anything with the submitted data. You run this submission upon
xforms-select on the file control. This way the server will "know"
about the file as soon as it is selected.

If you get a chance to try this, you'll let us know how this works for you.

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