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> </instance> <xforms:upload ref="instance('main-instance')/file"> 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 |
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 |
Free forum by Nabble | Edit this page |